From: greg@kroah.com Date: Thu, 11 Dec 2003 16:12:29 +0000 (-0800) Subject: [PATCH] tweak the config file generation portion of the Makefile a bit. X-Git-Tag: 009~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71896b56ee03a8f31c89263bbf5f4cb7201666be;p=systemd [PATCH] tweak the config file generation portion of the Makefile a bit. --- diff --git a/Makefile b/Makefile index cdee7ac8..9415e1ec 100644 --- a/Makefile +++ b/Makefile @@ -203,6 +203,14 @@ udev_version.h: @echo \#define UDEV_RULES_FILE \"$(configdir)\udev.rules\" >> $@ @echo \#define UDEV_PERMISSION_FILE \"$(configdir)\udev.permissions\" >> $@ +# config files automatically generated +GEN_CONFIGS = udev.conf + +# Rules on how to create the generated config files +udev.conf: + sed -e "s-@udevdir@-$(udevdir)-" < udev.conf.in > $@ + + $(OBJS): $(GEN_HEADERS) $(ROOT): $(OBJS) @@ -212,7 +220,7 @@ $(ROOT): $(OBJS) clean: -find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \ | xargs rm -f - -rm -f core $(ROOT) $(GEN_HEADERS) udev.conf + -rm -f core $(ROOT) $(GEN_HEADERS) $(GEN_CONFIGS) $(MAKE) -C klibc clean @for target in $(EXTRAS) ; do \ echo $$target ; \ @@ -265,13 +273,12 @@ uninstall-dbus-policy: - endif -install: install-dbus-policy all +install: install-dbus-policy all $(GEN_CONFIGS) $(INSTALL) -d $(DESTDIR)$(udevdir) $(INSTALL) -d $(DESTDIR)$(configdir) $(INSTALL) -d $(DESTDIR)$(hotplugdir) $(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT) $(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8 - sed -e "s-@udevdir@-$(udevdir)-" < udev.conf.in > udev.conf $(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir) $(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir) $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir)