From 064360cde8f35d8ac6faf418ddfa39b9f3da4347 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 15 Mar 2008 00:02:39 +0100 Subject: [PATCH] Makefile: do not require GNU install --- Makefile | 16 +++++++++------- extras/ata_id/Makefile | 4 +++- extras/cdrom_id/Makefile | 9 ++++++--- extras/collect/Makefile | 3 ++- extras/edd_id/Makefile | 9 ++++++--- extras/firmware/Makefile | 3 ++- extras/floppy/Makefile | 6 ++++-- extras/path_id/Makefile | 6 ++++-- extras/rule_generator/Makefile | 12 +++++++----- extras/scsi_id/Makefile | 12 ++++++++---- extras/usb_id/Makefile | 3 ++- extras/volume_id/Makefile | 6 ++++-- extras/volume_id/lib/Makefile | 11 +++++++---- 13 files changed, 64 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 6c7f139e..2fcc4247 100644 --- a/Makefile +++ b/Makefile @@ -236,9 +236,11 @@ install-config: .PHONY: install-config install-man: - $(INSTALL_DATA) -D udev.7 $(DESTDIR)$(mandir)/man7/udev.7 - $(INSTALL_DATA) -D udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8 - $(INSTALL_DATA) -D udevadm.8 $(DESTDIR)$(mandir)/man8/udevadm.8 + $(INSTALL) -d $(DESTDIR)$(mandir)/man7 + $(INSTALL_DATA) udev.7 $(DESTDIR)$(mandir)/man7/udev.7 + $(INSTALL) -d $(DESTDIR)$(mandir)/man8 + $(INSTALL_DATA) udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8 + $(INSTALL_DATA) udevadm.8 $(DESTDIR)$(mandir)/man8/udevadm.8 ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevinfo.8 ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevtest.8 ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevtrigger.8 @@ -266,13 +268,13 @@ uninstall-man: .PHONY: uninstall-man install-bin: - $(INSTALL) -d $(DESTDIR)$(udevdir) - $(INSTALL_PROGRAM) -D udevd $(DESTDIR)$(sbindir)/udevd - $(INSTALL_PROGRAM) -D udevadm $(DESTDIR)$(sbindir)/udevadm + $(INSTALL) -d $(DESTDIR)$(sbindir) + $(INSTALL_PROGRAM) udevd $(DESTDIR)$(sbindir)/udevd + $(INSTALL_PROGRAM) udevadm $(DESTDIR)$(sbindir)/udevadm ln -f -s udevadm $(DESTDIR)$(sbindir)/udevtrigger ln -f -s udevadm $(DESTDIR)$(sbindir)/udevsettle ln -f -s udevadm $(DESTDIR)$(sbindir)/udevcontrol - mkdir -p -m 0755 $(DESTDIR)$(usrsbindir) + $(INSTALL) -d $(DESTDIR)$(usrsbindir) ln -f -s $(sbindir)/udevadm $(DESTDIR)$(usrsbindir)/udevmonitor mkdir -p -m 0755 $(DESTDIR)$(usrbindir) ln -f -s $(sbindir)/udevadm $(DESTDIR)$(usrbindir)/udevinfo diff --git a/extras/ata_id/Makefile b/extras/ata_id/Makefile index c9691da1..bab49a25 100644 --- a/extras/ata_id/Makefile +++ b/extras/ata_id/Makefile @@ -49,7 +49,8 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) .PHONY: install-bin uninstall-bin: @@ -57,6 +58,7 @@ uninstall-bin: .PHONY: uninstall-bin install-man: + $(INSTALL) -d $(DESTDIR)$(mandir)/man8 $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 .PHONY: install-man diff --git a/extras/cdrom_id/Makefile b/extras/cdrom_id/Makefile index 7cd7c1d7..caab2bea 100644 --- a/extras/cdrom_id/Makefile +++ b/extras/cdrom_id/Makefile @@ -49,8 +49,10 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) - $(INSTALL_DATA) -D 60-cdrom_id.rules $(DESTDIR)$(configdir)/rules.d/60-cdrom_id.rules + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(configdir)/rules.d + $(INSTALL_DATA) 60-cdrom_id.rules $(DESTDIR)$(configdir)/rules.d/60-cdrom_id.rules .PHONY: install-bin uninstall-bin: @@ -59,7 +61,8 @@ uninstall-bin: .PHONY: uninstall-bin install-man: - $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 + $(INSTALL) -d $(DESTDIR)$(mandir)/man8 + $(INSTALL_DATA) $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 .PHONY: install-man uninstall-man: diff --git a/extras/collect/Makefile b/extras/collect/Makefile index 6168a8b8..76487017 100644 --- a/extras/collect/Makefile +++ b/extras/collect/Makefile @@ -44,7 +44,8 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) .PHONY: install-bin uninstall-bin: diff --git a/extras/edd_id/Makefile b/extras/edd_id/Makefile index f52c3bc3..f17a5b8c 100644 --- a/extras/edd_id/Makefile +++ b/extras/edd_id/Makefile @@ -49,8 +49,10 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) - $(INSTALL_DATA) -D 61-persistent-storage-edd.rules $(DESTDIR)$(configdir)/rules.d/61-persistent-storage-edd.rules + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(configdir)/rules.d/ + $(INSTALL_DATA) 61-persistent-storage-edd.rules $(DESTDIR)$(configdir)/rules.d/61-persistent-storage-edd.rules .PHONY: install-bin uninstall-bin: @@ -59,7 +61,8 @@ uninstall-bin: .PHONY: uninstall-bin install-man: - $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 + $(INSTALL) -d $(DESTDIR)$(mandir)/man8 + $(INSTALL_DATA) $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 .PHONY: install-man uninstall-man: diff --git a/extras/firmware/Makefile b/extras/firmware/Makefile index c187b476..5e84acb1 100644 --- a/extras/firmware/Makefile +++ b/extras/firmware/Makefile @@ -37,7 +37,8 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_SCRIPT) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_SCRIPT) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) .PHONY: install-bin uninstall-bin: diff --git a/extras/floppy/Makefile b/extras/floppy/Makefile index 784464a8..0adc373c 100644 --- a/extras/floppy/Makefile +++ b/extras/floppy/Makefile @@ -49,7 +49,8 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) .PHONY: install-bin uninstall-bin: @@ -57,7 +58,8 @@ uninstall-bin: .PHONY: uninstall-bin install-man: - $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 + $(INSTALL) -d $(DESTDIR)$(mandir)/man8/ + $(INSTALL_DATA) $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 .PHONY: install-man uninstall-man: diff --git a/extras/path_id/Makefile b/extras/path_id/Makefile index d8efe641..2f0b882e 100644 --- a/extras/path_id/Makefile +++ b/extras/path_id/Makefile @@ -37,7 +37,8 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_SCRIPT) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_SCRIPT) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) .PHONY: install-bin uninstall-bin: @@ -45,7 +46,8 @@ uninstall-bin: .PHONY: uninstall-bin install-man: - $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 + $(INSTALL) -d $(DESTDIR)$(mandir)/man8/ + $(INSTALL_DATA) $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 .PHONY: install-man uninstall-man: diff --git a/extras/rule_generator/Makefile b/extras/rule_generator/Makefile index cc6fe056..d6f1265e 100644 --- a/extras/rule_generator/Makefile +++ b/extras/rule_generator/Makefile @@ -37,12 +37,14 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_DATA) -D rule_generator.functions $(DESTDIR)$(libudevdir)/rule_generator.functions - $(INSTALL_SCRIPT) -D write_cd_rules $(DESTDIR)$(libudevdir)/write_cd_rules - $(INSTALL_SCRIPT) -D write_net_rules $(DESTDIR)$(libudevdir)/write_net_rules - $(INSTALL_DATA) -D 75-cd-aliases-generator.rules \ + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_DATA) rule_generator.functions $(DESTDIR)$(libudevdir)/rule_generator.functions + $(INSTALL_SCRIPT) write_cd_rules $(DESTDIR)$(libudevdir)/write_cd_rules + $(INSTALL_SCRIPT) write_net_rules $(DESTDIR)$(libudevdir)/write_net_rules + $(INSTALL) -d $(DESTDIR)$(configdir)/rules.d + $(INSTALL_DATA) 75-cd-aliases-generator.rules \ $(DESTDIR)$(configdir)/rules.d/75-cd-aliases-generator.rules - $(INSTALL_DATA) -D 75-persistent-net-generator.rules \ + $(INSTALL_DATA) 75-persistent-net-generator.rules \ $(DESTDIR)$(configdir)/rules.d/75-persistent-net-generator.rules .PHONY: install-bin diff --git a/extras/scsi_id/Makefile b/extras/scsi_id/Makefile index 349eeef1..870296a6 100644 --- a/extras/scsi_id/Makefile +++ b/extras/scsi_id/Makefile @@ -58,7 +58,8 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) .PHONY: install-bin uninstall-bin: @@ -66,7 +67,8 @@ uninstall-bin: .PHONY: uninstall-bin install-man: - $(INSTALL_DATA) -D scsi_id.8 $(DESTDIR)$(mandir)/man8/scsi_id.8 + $(INSTALL) -d $(DESTDIR)$(mandir)/man8 + $(INSTALL_DATA) scsi_id.8 $(DESTDIR)$(mandir)/man8/scsi_id.8 .PHONY: install-man uninstall-man: @@ -75,8 +77,10 @@ uninstall-man: install-config: @ if [ ! -r $(DESTDIR)$(etcdir)/scsi_id.config ]; then \ - echo $(INSTALL_DATA) -D ./scsi_id.config $(DESTDIR)$(etcdir); \ - $(INSTALL_DATA) -D ./scsi_id.config $(DESTDIR)$(etcdir)/scsi_id.config; \ + echo $(INSTALL) -d $(DESTDIR)$(etcdir); \ + echo $(INSTALL_DATA) ./scsi_id.config $(DESTDIR)$(etcdir); \ + $(INSTALL) -d $(DESTDIR)$(etcdir); \ + $(INSTALL_DATA) ./scsi_id.config $(DESTDIR)$(etcdir)/scsi_id.config; \ fi .PHONY: install-config diff --git a/extras/usb_id/Makefile b/extras/usb_id/Makefile index 7787161b..09496049 100644 --- a/extras/usb_id/Makefile +++ b/extras/usb_id/Makefile @@ -49,7 +49,8 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) .PHONY: install-bin uninstall-bin: diff --git a/extras/volume_id/Makefile b/extras/volume_id/Makefile index 6e500659..50d5e338 100644 --- a/extras/volume_id/Makefile +++ b/extras/volume_id/Makefile @@ -60,7 +60,8 @@ clean: .PHONY: clean install-bin: all - $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + $(INSTALL) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) $(MAKE) -C lib install .PHONY: install-bin @@ -70,7 +71,8 @@ uninstall-bin: .PHONY: uninstall-bin install-man: - $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 + $(INSTALL) -d $(DESTDIR)$(mandir)/man8 + $(INSTALL_DATA) $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 .PHONY: install-man uninstall-man: diff --git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile index 105549a9..c0905f4a 100644 --- a/extras/volume_id/lib/Makefile +++ b/extras/volume_id/lib/Makefile @@ -103,16 +103,19 @@ libvolume_id.pc: $(Q) echo "Cflags: -I\$${includedir}" >> $@ install: all - $(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h - $(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) - mkdir -p $(DESTDIR)$(usrlibdir)/ + $(INSTALL) -d $(DESTDIR)$(includedir) + $(INSTALL_DATA) libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h + $(INSTALL) -d $(DESTDIR)$(libdir) + $(INSTALL_LIB) $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) + $(INSTALL) -d $(DESTDIR)$(usrlibdir) ln -sf $(SHLIB) $(DESTDIR)$(libdir)/libvolume_id.so.$(SHLIB_CUR) ifeq ($(libdir),$(usrlibdir)) ln -sf $(SHLIB) $(DESTDIR)$(usrlibdir)/libvolume_id.so else ln -sf $(libdir)/$(SHLIB) $(DESTDIR)$(usrlibdir)/libvolume_id.so endif - $(INSTALL_DATA) -D libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc + $(INSTALL) -d $(DESTDIR)$(usrlibdir)/pkgconfig + $(INSTALL_DATA) libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc .PHONY: install uninstall: -- 2.39.5