Generate comedi/comedi_kbuild.inc at configure time instead of make time.
authorIan Abbott <abbotti@mev.co.uk>
Tue, 24 Jul 2007 11:37:08 +0000 (11:37 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Tue, 24 Jul 2007 11:37:08 +0000 (11:37 +0000)
comedi/Makefile.am
comedi/comedi_kbuild.inc.in [new file with mode: 0644]
configure.ac

index f749618f99dac337c9daf7a7a69e06a1282f10ba..d251c592ee436a398b2d90f3e89645653386f882 100644 (file)
@@ -7,14 +7,14 @@ if CONFIG_KBUILD
 module_PROGRAMS =
 #ignore errors from kernel's make modules in all-local, to avoid failure of make install
 #on nfs filesystem with root_squash
-all-local: comedi_kbuild.inc
+all-local:
        -$(MAKE) -I@abs_builddir@ -C $(LINUX_DIR) M=@abs_builddir@ CC="$(LINUX_CC) -I@abs_top_srcdir@/ \
                -I@abs_top_srcdir@/include $(RTAI_CFLAGS) $(RTLINUX_CFLAGS)" V=1 modules
-install-data-local: comedi_kbuild.inc
+install-data-local:
        $(MAKE) -I@abs_builddir@ -C $(LINUX_DIR) M=@abs_builddir@ CC="$(LINUX_CC) -I@abs_top_srcdir@/ \
                -I@abs_top_srcdir@/include $(RTAI_CFLAGS) $(RTLINUX_CFLAGS)" INSTALL_MOD_DIR="comedi" \
                V=1 modules_install
-clean-local: comedi_kbuild.inc
+clean-local:
        $(MAKE) -I@abs_builddir@ -C $(LINUX_DIR) M=@abs_builddir@ CC="$(LINUX_CC) -I@abs_top_srcdir@/ \
                -I@abs_top_srcdir@/include $(RTAI_CFLAGS) $(RTLINUX_CFLAGS)" V=1 clean
 else
@@ -52,16 +52,3 @@ comedi_ko_LINK = $(top_builddir)/modtool --link -o $@
 clean-modulePROGRAMS:
        -test -z "$(module_PROGRAMS)" || rm -f $(module_PROGRAMS)
        -rm -rf .mods
-
-comedi_kbuild.inc: Makefile
-       echo > $@
-if CONFIG_COMEDI_RT
-       echo CONFIG_COMEDI_RT=y >> $@
-       echo CONFIG_COMEDI_RT_MODULES=m >> $@
-endif
-if CONFIG_PCMCIA
-       echo CONFIG_COMEDI_PCMCIA_MODULES=m >> $@
-endif
-if CONFIG_USB
-       echo CONFIG_COMEDI_USB_MODULES=m >> $@
-endif
diff --git a/comedi/comedi_kbuild.inc.in b/comedi/comedi_kbuild.inc.in
new file mode 100644 (file)
index 0000000..4be976f
--- /dev/null
@@ -0,0 +1,4 @@
+@CONFIG_COMEDI_RT_TRUE@CONFIG_COMEDI_RT=y
+@CONFIG_COMEDI_RT_TRUE@CONFIG_COMEDI_RT_MODULES=m
+@CONFIG_PCMCIA_TRUE@CONFIG_COMEDI_PCMCIA_MODULES=m
+@CONFIG_USB_TRUE@CONFIG_COMEDI_USB_MODULES=m
index db9bead4960698f64117549c23f4dd1278452e08..58a93e228199680e2abfab4040ea56b2fcfa80ec 100644 (file)
@@ -100,6 +100,7 @@ AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
 AC_CONFIG_FILES([
 Makefile
 comedi/Makefile
+comedi/comedi_kbuild.inc
 comedi/drivers/Makefile
 comedi/drivers/addi-data/Makefile
 comedi/kcomedilib/Makefile