From: Vassilis Virvilis Date: Fri, 20 May 2005 11:34:47 +0000 Subject: patch udev: static linking and DESTDIR Message-Id: <428DCB57.6020201@iit.demokritos.gr> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------040107080706090008040500" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------040107080706090008040500 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch does two things 1) Note: klcc builds statically by default so I don't see the reason to explicitly state it. However if somebody changes the default behavior of klcc (like me) it will lost considerable time trying to find out why hotplug (and udev) doesn't build statically (like me). 2) I am building hotplug (and udev) for an initramfs image. I have specified DESTDIR to be ~/src/embed/root-initramfs and the defines as they are now are pointing to DESTDIR which is wrong since that directory will be the root upon boot and udev cannot find the ~/src/embed/root-initramfs/sbin/udev staff. Note the klibc works around this by introducing INSTALLROOT and INSTALLDIR Makefile variables. Maybe something like this is a good idea? Also note that the INSTALL_DIR variable in udev makefile is useless as it is not referenced anywhere. Would you accept a patch to clean it up as it is distracting... .bill --------------040107080706090008040500 Content-Type: text/plain; name="patch-udev" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-udev" diff -ur orig/udev-057/Makefile udev-057/Makefile --- orig/udev-057/Makefile 2005-04-15 00:39:34.000000000 +0300 +++ udev-057/Makefile 2005-05-19 18:43:43.000000000 +0300 @@ -178,7 +178,7 @@ KLCC = $(KLIBC_INSTALL)/bin/klcc CC = $(KLCC) LD = $(KLCC) - LDFLAGS += -static + #LDFLAGS += -static else CFLAGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations endif @@ -250,8 +250,8 @@ @echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@ @echo \#define UDEV_CONFIG_FILE \"$(configdir)/udev.conf\" >> $@ @echo \#define UDEV_RULES_FILE \"$(configdir)/rules.d\" >> $@ - @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@ - @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@ + @echo \#define UDEV_BIN \"$(sbindir)/udev\" >> $@ + @echo \#define UDEVD_BIN \"$(sbindir)/udevd\" >> $@ # Rules on how to create the generated config files $(LOCAL_CFG_DIR)/udev.conf: --------------040107080706090008040500-- ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel