From 9be9a1fb362794171778909e15248754dd6d19f5 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 14 Dec 2001 19:25:14 +0000 Subject: [PATCH] Fix Makefile.modbuild to delete Makefiles on distclean, CFLAGS not to 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 | 3 ++- scripts/dep.rtai | 6 ++++-- scripts/dep.rtlinux | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile.modbuild b/Makefile.modbuild index 86b51f13..5d7c20f7 100644 --- a/Makefile.modbuild +++ b/Makefile.modbuild @@ -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 diff --git a/scripts/dep.rtai b/scripts/dep.rtai index b46880eb..7e13864e 100755 --- a/scripts/dep.rtai +++ b/scripts/dep.rtai @@ -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 diff --git a/scripts/dep.rtlinux b/scripts/dep.rtlinux index 27d349f6..bf330ff1 100755 --- a/scripts/dep.rtlinux +++ b/scripts/dep.rtlinux @@ -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 -- 2.26.2