[zaptel-commits] tzafrir: branch 1.2 r4117 - /branches/1.2/Makefile

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon Mar 31 18:57:06 CDT 2008


Author: tzafrir
Date: Mon Mar 31 18:57:06 2008
New Revision: 4117

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4117
Log:
Fix 'make clean' when there's no kernel tree. Partial backport of r4082
from 1.4.

Modified:
    branches/1.2/Makefile

Modified: branches/1.2/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.2/Makefile?view=diff&rev=4117&r1=4116&r2=4117
==============================================================================
--- branches/1.2/Makefile (original)
+++ branches/1.2/Makefile Mon Mar 31 18:57:06 2008
@@ -40,6 +40,16 @@
   endif
 endif
 KINCLUDES:=$(KSRC)/include
+
+# We use the kernel's .config file as an indication that the KSRC
+# directory is indeed a valid and configured kernel source (or partial
+# source) directory.
+KCONFIG:=$(KSRC)/.config
+ifneq (,$(wildcard $(KCONFIG)))
+  HAS_KSRC=yes
+else
+  HAS_KSRC=no
+endif
 
 ifeq (2.6,$(shell echo $(KVERS) | cut -d. -f1-2))
   BUILDVER:=linux26
@@ -556,7 +566,9 @@
 	rm -f patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
 	rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
 	rm -f $(TZOBJS) $(LIBTONEZONE_SO) *.lo
+ifeq (yes,$(HAS_KSRC))
 	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) clean
+endif
 	$(MAKE) -C wct4xxp clean
 	$(MAKE) -C wctc4xxp clean
 	rm -rf .tmp_versions




More information about the zaptel-commits mailing list