summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-12-11 08:12:29 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:07 -0700
commit71896b56ee03a8f31c89263bbf5f4cb7201666be (patch)
treeb3356bb9acc176cdedc1943a88621364a7a6e808 /Makefile
parent18a0d6522d06338c76d7706f4a246a37e232f31c (diff)
[PATCH] tweak the config file generation portion of the Makefile a bit.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cdee7ac812..9415e1ec97 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)