[zaptel-commits] tzafrir: branch 1.4 r3976 - /branches/1.4/Makefile
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Sun Mar 9 09:30:23 CDT 2008
Author: tzafrir
Date: Sun Mar 9 09:30:23 2008
New Revision: 3976
URL: http://svn.digium.com/view/zaptel?view=rev&rev=3976
Log:
The main Makefile now knows if we don't have kernel source.
* Nicer handling of situations where we don't have kernel source and
don't really need it ('make clean', mainly).
* The test for hotplug firmware is now from the same .config file. No
more strange message about autoconf.h .
Modified:
branches/1.4/Makefile
Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/Makefile?view=diff&rev=3976&r1=3975&r2=3976
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Sun Mar 9 09:30:23 2008
@@ -41,6 +41,13 @@
KVERS_MAJ:=$(shell echo $(KVERS) | cut -d. -f1-2)
KINCLUDES:=$(KSRC)/include
+KCONFIG:=$(KSRC)/.config
+ifneq (,$(wildcard $(KCONFIG)))
+ HAS_KSRC=yes
+else
+ HAS_KSRC=no
+endif
+
ifeq ($(KVERS_MAJ),2.4)
BUILDVER:=linux24
else
@@ -54,7 +61,9 @@
DYNFS=yes
UDEVRULES=yes
endif
- HOTPLUG_FIRMWARE:=$(shell if grep CONFIG_FW_LOADER $(KINCLUDES)/linux/autoconf.h | grep -q undef; then echo "no"; else echo "yes"; fi)
+ ifeq (yes,$(HAS_KSRC))
+ HOTPLUG_FIRMWARE:=$(shell if grep '^CONFIG_FW_LOADER=[ym]' $(KCONFIG); then echo "no"; else echo "yes"; fi)
+ endif
endif
# If the file .zaptel.makeopts is present in your home directory, you can
@@ -276,7 +285,10 @@
utils: $(BINS) utils-subdirs
modules: prereq
- @if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
+ifeq (no,$(HAS_KSRC))
+ echo "You do not appear to have the sources for the $(KVERS) kernel installed."
+ exit 1
+endif
$(KMAKE) modules
version.h:
@@ -555,7 +567,9 @@
rm -f $(BINS)
rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
rm -f $(LTZ_SO) $(LTZ_A) *.lo
+ifeq (yes,$(HAS_KSRC))
$(KMAKE) clean
+endif
@for dir in $(SUBDIRS_UTILS_ALL); do \
$(MAKE) -C $$dir clean; \
done
More information about the zaptel-commits
mailing list