Fix Makefile.modbuild to delete Makefiles on distclean, CFLAGS not to
authorDavid Schleef <ds@schleef.org>
Fri, 14 Dec 2001 19:25:14 +0000 (19:25 +0000)
committerDavid Schleef <ds@schleef.org>
Fri, 14 Dec 2001 19:25:14 +0000 (19:25 +0000)
duplicate kernel flags. Fix scripts/dep.* to not add to CFLAGS if
the RTAI/RTLinux include directories don't exist.  (Might not be an
error -- otherwise it's difficult to compile for a real-time patched
kernel without the RTAI/RTLinux source.)

Makefile.modbuild
scripts/dep.rtai
scripts/dep.rtlinux

index 86b51f131777fa7cd9ad9e10589fd37c310b8bb6..5d7c20f76e9e626649f0b20a9253d916207faf5c 100644 (file)
@@ -41,7 +41,7 @@ export MODLIB
 
 export FLAT_MODULES
 
-CFLAGS := -I $(TOPDIR)/include -D__KERNEL__ -I $(LINUXDIR)/include $(CFLAGS) 
+CFLAGS := -I $(TOPDIR)/include $(CFLAGS) 
 
 CFLAGS += -nostdinc -I $(shell $(CC) -print-search-dirs|grep ^install:|sed 's/^install: //')include
 
@@ -110,6 +110,7 @@ distclean:  clean
        rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
                -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS
+       rm -f `find comedi -name Makefile -print`
        -rm -rf modules
        rm -f .config .config.old
        rm -f include/config.h include/version.h
index b46880eb0fdf794d4ff6fb73f7b690bde1764a2f..7e13864e7848c5642fe8f02e856ddf0b9629804d 100755 (executable)
@@ -10,8 +10,10 @@ if [ "$CONFIG_RTHAL" != "" ];then
                read RTAIDIR
        fi
        : ${RTAIDIR:=${default}}
-       echo RTAIDIR=$RTAIDIR >>.buildvars
-       echo CFLAGS += -I $RTAIDIR/include >>.buildvars
+       if [ -d ${RTAIDIR}/include ];then
+               echo RTAIDIR=$RTAIDIR >>.buildvars
+               echo CFLAGS += -I $RTAIDIR/include >>.buildvars
+       fi
        export RTAIDIR
 fi
 
index 27d349f6338286ec26626baa6caac49a3dc6b500..bf330ff102770621fefd6c3bbdb12acba2785a93 100755 (executable)
@@ -15,7 +15,9 @@ if [ "$CONFIG_RTL" != "" -o "$CONFIG_RTL_V1" = "y" ]; then
                read RTLDIR
        fi
        : ${RTLDIR:=$default}
-       echo RTLDIR=$RTLDIR >>.buildvars
-       echo CFLAGS += -I $RTLDIR/include -I $RTLDIR/include/compat -I $RTLDIR/include/posix -D__RT__ >>.buildvars
+       if [ -d ${RTLDIR}/include ];then
+               echo RTLDIR=$RTLDIR >>.buildvars
+               echo CFLAGS += -I $RTLDIR/include -I $RTLDIR/include/compat -I $RTLDIR/include/posix -D__RT__ >>.buildvars
+       fi
        export RTLDIR
 fi