linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix install/uninstall paths for cross compilation
@ 2005-10-26  5:38 Aras Vaichas
  2005-10-26 14:57 ` Kay Sievers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Aras Vaichas @ 2005-10-26  5:38 UTC (permalink / raw)
  To: linux-hotplug

This patch fixes some problems with installing EXTRAS and uninstalling binaries 
and man pages when DESTDIR has been set e.g. for cross compilation, or creating 
an initrd

regards,

Aras Vaichas


--- Makefile.orig       2005-10-26 13:49:47.000000000 +1000
+++ Makefile    2005-10-26 15:21:35.000000000 +1000
@@ -123,7 +123,7 @@
  sbindir =      ${exec_prefix}/sbin
  usrbindir =    ${exec_prefix}/usr/bin
  usrsbindir =   ${exec_prefix}/usr/sbin
-mandir =       ${prefix}/usr/share/man
+mandir =       ${DESTDIR}/usr/share/man
  configdir =    ${etcdir}/udev
  udevdir =      /dev
  udevdb =       ${udevdir}/.udevdb
@@ -390,31 +390,41 @@
         $(INSTALL_PROGRAM) -D udevstart $(DESTDIR)$(sbindir)/udevstart
         @extras="$(EXTRAS)"; for target in $$extras; do \
                 echo $$target; \
-               $(MAKE) prefix=$(prefix) -C $$target $@; \
+               $(MAKE) DESTDIR=$(DESTDIR) prefix=$(prefix) -C $$target $@; \
         done;
  ifndef DESTDIR
         - killall udevd
         - rm -rf $(udevdb)
         - $(sbindir)/udevd --daemon
+else
+       @echo; \
+       echo "You will have to manually restart udevd on the target"; \
+       echo
  endif
  .PHONY: install-bin

  uninstall-bin:
-       - rm -f $(sbindir)/udev
-       - rm -f $(sbindir)/udevd
-       - rm -f $(sbindir)/udevsend
-       - rm -f $(sbindir)/udevinitsend
-       - rm -f $(sbindir)/udeveventrecoreder
-       - rm -f $(sbindir)/udevcontrol
-       - rm -f $(sbindir)/udevstart
-       - rm -f $(usrsbindir)/udevmonitor
-       - rm -f $(usrbindir)/udevinfo
-       - rm -f $(usrbindir)/udevtest
-       - rm -rf $(udevdb)
+       - rm -f $(DESTDIR)$(sbindir)/udev
+       - rm -f $(DESTDIR)$(sbindir)/udevd
+       - rm -f $(DESTDIR)$(sbindir)/udevsend
+       - rm -f $(DESTDIR)$(sbindir)/udevinitsend
+       - rm -f $(DESTDIR)$(sbindir)/udeveventrecoreder
+       - rm -f $(DESTDIR)$(sbindir)/udevcontrol
+       - rm -f $(DESTDIR)$(sbindir)/udevstart
+       - rm -f $(DESTDIR)$(usrsbindir)/udevmonitor
+       - rm -f $(DESTDIR)$(usrbindir)/udevinfo
+       - rm -f $(DESTDIR)$(usrbindir)/udevtest
+       - rm -rf $(DESTDIR)$(udevdb)
+ifndef DESTDIR
         - killall udevd
+else
+       @echo; \
+       echo "You will have to manually stop udevd on the target"; \
+       echo
+endif
         @extras="$(EXTRAS)"; for target in $$extras; do \
                 echo $$target; \
-               $(MAKE) prefix=$(prefix) -C $$target $@; \
+               $(MAKE) DESTDIR=$(DESTDIR) prefix=$(prefix) -C $$target $@; \
         done;
  .PHONY: uninstall-bin


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-31  4:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-26  5:38 [PATCH] fix install/uninstall paths for cross compilation Aras Vaichas
2005-10-26 14:57 ` Kay Sievers
2005-10-27  0:59 ` Aras Vaichas
2005-10-31  1:56 ` Kay Sievers
2005-10-31  4:08 ` Aras Vaichas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).