Got rid of use of $(builddir), since it isn't defined by some versions
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 2 Aug 2007 14:06:36 +0000 (14:06 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 2 Aug 2007 14:06:36 +0000 (14:06 +0000)
of auto* tools.  Tweaked some obscure rules (used some gnu make extensions,
but I don't really care).

Makefile.am

index eeab18c2ff952a3397db7c217fbb72fc82698e0e..d50573d5f5ca5a93547cc3f68b42ab4b63b2f758 100644 (file)
@@ -36,17 +36,24 @@ dev:
                mknod -m 666 /dev/comedi$$i c 98 $$i \
                ; \
        done;
+.PHONY: dev
 
-Documentation/comedi/drivers.txt Documentation/comedi/devices.txt:
-       (for each in `find $(srcdir)/comedi/drivers -name "*\.c" | $(GREP) -v mod\.c | sort`;do $(srcdir)/scripts/dump_doc $$each;\
-               done >$(builddir)/Documentation/comedi/drivers.txt)
-       $(srcdir)/scripts/doc_devlist $(builddir)/Documentation/comedi/drivers.txt | sort >\
-               $(builddir)/Documentation/comedi/devices.txt
+COMEDI_DRIVER_FILES := $(shell find $(srcdir)/comedi/drivers -name '*\.c' | grep -v mod\.c | sort)
 
-moo:
-       (for each in `find $(srcdir)/comedi/drivers -name "*\.c" | $(GREP) -v mod\.c`;\
-               do $(srcdir)/scripts/check_driver $$each;done >$(builddir)/drivers.check)
-       ($(GREP) '^.:' $(builddir)/drivers.check >$(builddir)/drivers.summary)
+Documentation/comedi/drivers.txt: $(COMEDI_DRIVER_FILES)
+       for each in $(COMEDI_DRIVER_FILES); do $(srcdir)/scripts/dump_doc $$each;\
+               done >Documentation/comedi/drivers.txt
+
+Documentation/comedi/devices.txt: Documentation/comedi/drivers.txt
+       $(srcdir)/scripts/doc_devlist Documentation/comedi/drivers.txt | sort >\
+               Documentation/comedi/devices.txt
+
+drivers.check: $(COMEDI_DRIVER_FILES)
+       for each in $(COMEDI_DRIVER_FILES);\
+               do $(srcdir)/scripts/check_driver $$each;done >drivers.check
+
+drivers.summary: drivers.check
+       $(GREP) '^.:' drivers.check >drivers.summary
 
 DISTCLEANFILES = modtool