chiark / gitweb /
replace fancy silent build program by simple kernel build like logic
[elogind.git] / extras / run_directory / Makefile
index 8444c3ba63ddc8d72185ad45ea7494a569960658..0b52326a9a5b77472e3763588a9035248e5cedc3 100644 (file)
@@ -11,14 +11,13 @@ GEN_HEADERS =
 MAN_PAGES =
 
 prefix =
-exec_prefix =  ${prefix}
 etcdir =       ${prefix}/etc
-sbindir =      ${exec_prefix}/sbin
-usrbindir =    ${exec_prefix}/usr/bin
-usrsbindir =   ${exec_prefix}/usr/sbin
+sbindir =      ${prefix}/sbin
+usrbindir =    ${prefix}/usr/bin
+usrsbindir =   ${prefix}/usr/sbin
+libudevdir =   ${prefix}/lib/udev
 mandir =       ${prefix}/usr/share/man
 configdir =    ${etcdir}/udev/
-srcdir = .
 
 INSTALL = /usr/bin/install -c
 INSTALL_PROGRAM = ${INSTALL}
@@ -30,29 +29,36 @@ all: $(PROG) $(MAN_PAGES)
 .DEFAULT: all
 
 %.o: %.c $(GEN_HEADERS)
-       $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
+       $(E) "  CC      " $@
+       $(Q) $(CC) -c $(CFLAGS) $< -o $@
 
 $(PROG): %: $(HEADERS) %.o $(OBJS)
-       $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
-       $(QUIET) $(STRIPCMD) $@
+       $(E) "  LD      " $@
+       $(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
+ifneq ($(strip $(STRIPCMD)),)
+       $(E) "  STRIP   " $@
+       $(Q) $(STRIPCMD) $@
+endif
 
 # man pages
 %.8: %.xml
-       xmlto man $?
+       $(E) "  XMLTO   " $@
+       $(Q) xmlto man $?
 .PRECIOUS: %.8
 
 clean:
-       rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+       $(E) "  CLEAN   "
+       $(Q) rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
 .PHONY: clean
 
 install-bin: all
-       $(INSTALL_PROGRAM) udev_run_devd $(DESTDIR)$(sbindir)/udev_run_devd
-       $(INSTALL_PROGRAM) udev_run_devd $(DESTDIR)$(sbindir)/udev_run_hotplugd
+       $(INSTALL_PROGRAM) -D udev_run_devd $(DESTDIR)$(libudevdir)/udev_run_devd
+       $(INSTALL_PROGRAM) -D udev_run_hotplugd $(DESTDIR)$(libudevdir)/udev_run_hotplugd
 .PHONY: install-bin
 
 uninstall-bin:
-       - rm $(DESTDIR)$(sbindir)/udev_run_devd
-       - rm $(DESTDIR)$(sbindir)/udev_run_hotplugd
+       - rm $(DESTDIR)$(libudevdir)/udev_run_devd
+       - rm $(DESTDIR)$(libudevdir)/udev_run_hotplugd
 .PHONY: uninstall-bin
 
 install-man: