[svn-commits] tzafrir: branch tzafrir/kernelmove_14 r2691 - in /team/tzafrir/kernelmove_14:...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 4 15:26:18 CDT 2007


Author: tzafrir
Date: Wed Jul  4 15:26:17 2007
New Revision: 2691

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2691
Log:
* Reverting autoconf changes (r2651).
* On with the quest to make wct{,c}4xxp build.

Modified:
    team/tzafrir/kernelmove_14/Makefile
    team/tzafrir/kernelmove_14/TODO
    team/tzafrir/kernelmove_14/configure
    team/tzafrir/kernelmove_14/configure.ac
    team/tzafrir/kernelmove_14/kernel/wct4xxp/Makefile.kernel26
    team/tzafrir/kernelmove_14/kernel/wctc4xxp/Makefile.kernel26
    team/tzafrir/kernelmove_14/kernel/xpp/utils/Makefile
    team/tzafrir/kernelmove_14/makeopts.in

Modified: team/tzafrir/kernelmove_14/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_14/Makefile?view=diff&rev=2691&r1=2690&r2=2691
==============================================================================
--- team/tzafrir/kernelmove_14/Makefile (original)
+++ team/tzafrir/kernelmove_14/Makefile Wed Jul  4 15:26:17 2007
@@ -9,8 +9,6 @@
 PWD:=$(shell pwd)
 endif
 
-include makeopts
-
 ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
 
 ifeq ($(DEB_HOST_GNU_TYPE),)
@@ -19,6 +17,18 @@
 UNAME_M:=$(DEB_HOST_GNU_TYPE)
 endif
 
+# If you want to build for a kernel other than the current kernel, set KVERS
+ifndef KVERS
+KVERS:=$(shell uname -r)
+endif
+ifndef KSRC
+  ifneq (,$(wildcard /lib/modules/$(KVERS)/build))
+    KSRC:=/lib/modules/$(KVERS)/build
+  else
+    KSRC_SEARCH_PATH:=/usr/src/linux-2.4 /usr/src/linux
+    KSRC:=$(shell for dir in $(KSRC_SEARCH_PATH); do if [ -d $$dir ]; then echo $$dir; break; fi; done)
+  endif
+endif
 KVERS_MAJ:=$(shell echo $(KVERS) | cut -d. -f1-2)
 KINCLUDES:=$(KSRC)/include
 
@@ -28,7 +38,6 @@
   BUILDVER:=linux26
 endif
 
-# FIXME: get this from autoconf (as it sources the .config)
 # Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support
 # if it is enabled in the kernel.
 ifeq ($(BUILDVER),linux26)
@@ -46,6 +55,39 @@
   CFLAGS+=-DHOTPLUG_FIRMWARE
 endif
 
+# If the file .zaptel.makeopts is present in your home directory, you can
+# include all of your favorite menuselect options so that every time you download
+# a new version of Asterisk, you don't have to run menuselect to set them.
+# The file /etc/zaptel.makeopts will also be included but can be overridden
+# by the file in your home directory.
+
+GLOBAL_MAKEOPTS=$(wildcard /etc/zaptel.makeopts)
+USER_MAKEOPTS=$(wildcard ~/.zaptel.makeopts)
+
+ifeq ($(strip $(foreach var,clean distclean dist-clean update,$(findstring $(var),$(MAKECMDGOALS)))),)
+ ifneq ($(wildcard menuselect.makeopts),)
+  include menuselect.makeopts
+ endif
+endif
+
+ifeq ($(strip $(foreach var,clean distclean dist-clean update,$(findstring $(var),$(MAKECMDGOALS)))),)
+ ifneq ($(wildcard makeopts),)
+  include makeopts
+ endif
+endif
+
+MODULES		:= pciradio tor2 torisa wcfxo wct1xxp wctdm wctdm24xxp \
+  		   wcte11xp wcusb zaptel ztd-eth ztd-loc ztdummy ztdynamic \
+		   zttranscode
+MODULES:=$(filter-out $(MENUSELECT_MODULES),$(MODULES))
+
+ZAP_SUBDIRS	:= xpp wctc4xxp wct4xxp
+ZAP_SUBDIRS	:= $(filter-out $(MENUSELECT_MODULES),$(ZAP_SUBDIRS))
+
+ifeq ($(findstring xpp,$(MENUSELECT_MODULES)),)
+  BUILD_XPP:=yes
+endif
+
 CFLAGS+=-g -Wall -DSTANDALONE_ZAPATA -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
 ifneq (,$(findstring ppc,$(UNAME_M)))
 CFLAGS_PPC:=-fsigned-char
@@ -63,18 +105,16 @@
 MODULE_ALIASES=wcfxs wctdm8xxp wct2xxp
 
 KMAKE		:= $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)/kernel \
-		   MODULES="$(MOD_NAMES)" ZAP_SUBDIRS="$(MOD_DIRS)"
+		   MODULES="$(MODULES)" ZAP_SUBDIRS="$(ZAP_SUBDIRS)"
 KMAKE_INST = $(KMAKE) \
   INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install
 
-# FIXME: use $prefix from autoconf
 ROOT_PREFIX=
 INSTALL_PREFIX=$(DESTDIR)
 
 CONFIG_FILE=$(INSTALL_PREFIX)/etc/zaptel.conf
 CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
 
-# FIXME: check in autoconf
 CHKCONFIG:=$(shell sh -c 'type -p chkconfig' 2> /dev/null)
 ifndef CHKCONFIG
 CHKCONFIG:=:
@@ -83,9 +123,9 @@
 ifneq ($(wildcard .version),)
   ZAPTELVERSION:=$(shell cat .version)
 else
-ifneq ($(wildcard .svn),)
-  ZAPTELVERSION=SVN-$(shell build_tools/make_svn_branch_name)
-endif
+  ifneq ($(wildcard .svn),)
+    ZAPTELVERSION=SVN-$(shell build_tools/make_svn_branch_name)
+  endif
 endif
 
 LTZ_A		:= libtonezone.a
@@ -96,7 +136,6 @@
 LTZ_SO_MINOR_VER:= 0
 LTZ_SO		:= $(LTZ_SO_BASE).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
 
-# FIXME: get pathes from autoconf. See e.g. kernel/xpp/utils/Makefile .
 BIN_DIR:=$(INSTALL_PREFIX)/sbin
 LIB_DIR:=$(INSTALL_PREFIX)/usr/lib
 INC_DIR:=$(INSTALL_PREFIX)/usr/include
@@ -104,18 +143,25 @@
 
 LDCONFIG	= /sbin/ldconfig
 SBINDIR		= $(INSTALL_PREFIX)/sbin
+BINS_INSTALL	= $(BINS)
+MANS8_INSTALL	= $(wildcard $(BINS_INSTALL:%=doc/%.8))
 MANDIR		= $(INSTALL_PREFIX)/share/man
 INCLUDE_DIR	= $(INSTALL_PREFIX)/usr/include/zaptel
 
-UTILSO		:= $(UTIL_NAMES:%=%.o)
-
-all: modules programs
-
-# FIXME: will re-run the recursive make on utils-subdirs
-programs: $(UTIL_NAMES) $(LTZ_SO) $(LTZ_A) $(UTIL_DIRS)
-
-$(UTIL_DIRS): %: 
-	@$(MAKE) -C $@
+BINS:=fxotune fxstest sethdlc-new ztcfg ztdiag ztmonitor ztspeed zttest zttool
+UTILS:=$(filter-out zttool ztcfg,$(BINS))
+UTILSO:=$(UTILS:%=%.o)
+BINS:=$(filter-out $(MENUSELECT_UTILS),$(BINS))
+UTILS_ALL	:= $(UTILS) 
+
+all: menuselect.makeopts modules programs
+
+programs: $(BINS) $(LTZ_SO) $(LTZ_A) xpp-utils
+
+xpp-utils:
+ifeq (yes,$(BUILD_XPP))
+	@$(MAKE) -C kernel/xpp/utils
+endif
 
 modules: $(BUILDVER)
 
@@ -145,7 +191,10 @@
 tonezone.lo: tonezone.c
 	$(CC) -c $(LCFLAGS) -o $@ $^
 
-prereq: kernel/version.h
+torisatool: torisatool.o
+	$(CC) -o $@ $^
+
+prereq: config.status kernel/version.h
 
 zttool.o: CFLAGS+=$(NEWT_INCLUDE)
 zttool.o: $(ZPATEL_H)
@@ -169,13 +218,16 @@
 ztcfg.c: ztcfg.h
 
 ztcfg-shared: ztcfg.o $(LTZ_SO)
-ztcfg-shared: LDLIBS	+= -lm
+	$(CC) -o $@ $^ -lm
+
+data:
+	$(KMAKE) ZAP_SUBDIRS=datamods MODULES=datamods
 
 ztcfg: ztcfg.o $(LTZ_A)
-ztcfg: LDLIBS	+= -lm
+	$(CC) -o $@ $^ -lm
 
 ztcfg-dude: ztcfg-dude.o mknotch.o complex.o $(LTZ_SO)
-ztcfg-dude: LDLIBS	+= -lm -lstdc++
+	$(CC) -o $@ $^ -lm -lstdc++
 
 mknotch.o complex.o: %.o: %.cc
 	$(CC) -o $@ -c $^
@@ -192,15 +244,6 @@
 stackcheck: checkstack modules
 	./checkstack *.o
 
-data:
-	$(KMAKE) ZAP_SUBDIRS=datamods MODULES=datamods
-
-#############################
-# mISDN stuff:
-# mISDN is unrelated to Zaptel. The b410p target is included here
-# because it is yet another out-of-tree kernel build and hence shares
-# many prerequirements (and also for people used to look for drivers of
-# Digium's cards).
 MISDNVERSION=1_1_3
 MISDNUSERVERSION=1_1_3
 b410p:
@@ -223,11 +266,7 @@
 	tar -zxf mISDNuser-$(MISDNUSERVERSION).tar.gz
 	$(MAKE) -C mISDNuser-$(MISDNUSERVERSION) install
 
-# b410p/mISDN stuff ends here.
-#############################
-
-
-$(UTIL_NAMES): %: %.o
+$(UTILS): %: %.o
 	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
 
 $(UTILSO): %.o: %.c
@@ -235,16 +274,16 @@
 
 install: all install-programs install-modules devices
 
-install-programs: $(UTIL_NAMES) $(LTZ_A) $(LTZ_SO) firmware
+install-programs: $(BINS_INSTALL) $(LTZ_A) $(LTZ_SO) firmware
 ifeq ($(HOTPLUG_FIRMWARE),yes)
 	$(MAKE) -C firmware hotplug-install
 endif
 	install -d $(SBINDIR)
-	install $(UTIL_NAMES) $(SBINDIR)/
+	install $(BINS_INSTALL) $(SBINDIR)/
 	install -d $(INCLUDE_DIR)
 	$(INSTALL) -m 644 kernel/zaptel.h tonezone.h $(INCLUDE_DIR)/
 	install -d $(MANDIR)/man8
-	$(INSTALL) -m 644 doc/*.8 $(MANDIR)/man8/
+	$(INSTALL) -m 644 $(MANS8_INSTALL) $(MANDIR)/man8/
 	install -d $(LIB_DIR)
 	$(INSTALL) $(LTZ_A) $(LTZ_SO) $(LIB_DIR)/
 	$(LDCONFIG) || $(LDCONFIG) -n $(LIB_DIR)
@@ -254,7 +293,8 @@
 	  /sbin/restorecon -v $(LIB_DIR)/$(LTZ_SO_BASE); \
 	fi
 
-install: all devices install-modules install-libs install-include install-xpp
+# original install target. Get stuff from here and remove:
+install-obsolete: all devices install-modules install-libs install-include install-xpp
 ifeq ($(HOTPLUG_FIRMWARE),yes)
 	$(MAKE) -C firmware hotplug-install
 endif
@@ -291,10 +331,10 @@
 		$(LIB_DIR)/$(LTZ_SO)
 	if [ -z "$(INSTALL_PREFIX)" ] && [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then /sbin/restorecon -v $(LIB_DIR)/$(LTZ_SO); fi
 
-#install-xpp:
-#ifeq (yes,$(BUILD_XPP))
-#	@$(MAKE) -C kernel/xpp/utils install
-#endif
+install-xpp:
+ifeq (yes,$(BUILD_XPP))
+	@$(MAKE) -C xpp/utils install
+endif
 
 install-include:
 	$(INSTALL) -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/zaptel/zaptel.h
@@ -398,7 +438,7 @@
 clean:
 	-@$(MAKE) -C menuselect clean
 	rm -f torisatool makefw tor2fw.h radfw.h
-	rm -f $(UTIL_NAMES_ALL)
+	rm -f $(BINS)
 	rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
 	rm -f $(LTZ_SO) $(LTZ_A) *.lo
 ifeq ($(BUILDVER),linux26)
@@ -407,11 +447,14 @@
 	$(MAKE) -C kernel clean
 endif
 	$(MAKE) -C firmware clean
-	for dir in $(UTIL_DIRS); do $(MAKE) -C $$subdir clean; done
+	$(MAKE) -C kernel/xpp/utils clean
 	rm -rf .tmp_versions
 	rm -f gendigits tones.h
 	rm -f libtonezone*
+	rm -f tor2ee
+	rm -f fxotune
 	rm -f core
+	rm -f ztcfg-shared fxstest
 	rm -rf misdn*
 	rm -rf mISDNuser*
 
@@ -448,4 +491,5 @@
 
 .EXPORT_ALL_VARIABLES:
 
-.PHONY: menuselect distclean dist-clean clean all install devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs uninstall-modules
+.PHONY: menuselect distclean dist-clean clean all install devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs install-xpp xpp-utils uninstall-modules
+

Modified: team/tzafrir/kernelmove_14/TODO
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_14/TODO?view=diff&rev=2691&r1=2690&r2=2691
==============================================================================
--- team/tzafrir/kernelmove_14/TODO (original)
+++ team/tzafrir/kernelmove_14/TODO Wed Jul  4 15:26:17 2007
@@ -1,13 +1,14 @@
 Working:
 * Basic 2.6 build.
 * userspace build.
-* autoconf/makefile fix. menuselect out.
 
-* building of utilities subdirectories (currently: xpp-utils) is broken.
-  Workaround: exclpicit make -C kernel/xpp/utils [install]
+* Hmm... reverted autoconf changes so far.
+* Call menuselect autoconf from menuselect autoconf.
+* Call menusect from autoconf and thus simplify make?
+
+* Test menuselect integration.
 * trim kernel/Makefile
 * build wct4xxp/ and wctc4xxp/ (the octasic API mess)
-  Workaround: ./configure --with-modules=all,-wct4xxp/,-wctc4xxp/
 * kernel 2.4 build
 * 'make clean' may trigger a configure of menuselect
 * install

Modified: team/tzafrir/kernelmove_14/configure
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_14/configure?view=diff&rev=2691&r1=2690&r2=2691
==============================================================================
--- team/tzafrir/kernelmove_14/configure (original)
+++ team/tzafrir/kernelmove_14/configure Wed Jul  4 15:26:17 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 2610 .
+# From configure.ac Revision: 2651 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -686,14 +686,6 @@
 USB_LIB
 USB_INCLUDE
 PBX_LIBUSB
-KVERS
-KSRC
-MOD_NAMES
-MOD_DIRS
-UTIL_NAMES
-UTIL_DIRS
-UTIL_NAMES_ALL
-UTIL_DIRS_ALL
 LIBOBJS
 LTLIBOBJS'
 ac_subst_files=''
@@ -1278,11 +1270,6 @@
   --with-ncurses=PATH     use ncurses files in PATH
   --with-newt=PATH        use newt files in PATH
   --with-usb=PATH         use libusb files in PATH
-  --with-modules          kernel modules to build. all, none, or
-                          comma-separated list.
-  --with-ksrc             kernel source path
-  --with-utils            utilities to build. all, none, or comma-separated
-                          list.
 
 Some influential environment variables:
   CC          C compiler command
@@ -5333,164 +5320,6 @@
       exit 1
    fi
 fi
-
-
-
-
-
-# FIXME: generate list automatically:
-ALL_MODULES="pciradio tor2 torisa wcfxo wct1xxp wctdm wctdm24xxp \
-wcte11xp wcte12xp wcusb zaptel ztd-eth ztd-loc ztdummy ztdynamic \
-zttranscode wct4xxp/ wctc4xxp/ xpp/"
-
-
-# Check whether --with-modules was given.
-if test "${with_modules+set}" = set; then
-  withval=$with_modules; use_modules="$withval"
-else
-  use_modules="all"
-
-fi
-
-
-for val in `echo $use_modules | tr , ' ' `; do
-	case "$val" in
-	none) MODS='';;
-	all)  MODS="$ALL_MODULES";;
-	-*) # -module: remove util:
-		remval=`echo $val | sed -e 's|^-||'`;
-		MODS=`echo $MODS | sed -e "s|$remval||"`
-		;;
-	*) MODS="$MODS $val";;
-	esac
-done
-
-# verify all target modules are in ALL_MODULES:
-MODS_NEW=''
-echo $ALL_MODULES | tr ' ' '\n' >config.all_mods
-for mod in $MODS; do
-	if grep -qF "$mod" config.all_mods; then
-		MODS_NEW="$MODS_NEW $mod"
-	fi
-done
-MODS="$MODS_NEW"
-rm config.all_mods
-
-# Fix dependencies: We'll get rid of duplicates later.
-# ztd-eth and ztd-loc need ztdynamic:
-if echo $MODS | egrep -q 'ztd-(eth|loc)'; then
-	MODS="$MODS ztdynamic"
-fi
-
-# If there is any module: it needs zaptel
-if test "x$MODS" != 'x' && test "x$MODS" != 'x '; then
-	MODS="$MODS zaptel"
-fi
-
-
-# Remove duplicates:
-MODS=`echo $MODS | tr ' ' '\n' | sort -u | xargs`
-
-
-# Check whether --with-ksrc was given.
-if test "${with_ksrc+set}" = set; then
-  withval=$with_ksrc; KSRC="$withval"
-
-fi
-
-
-if test "x$KSRC" = 'xnone' &&  test "x$MODS" != 'x'; then
-	# kernel modules but without source? huh?
-	{ { echo "$as_me:$LINENO: error: cannot build kernel modules --without kernel source" >&5
-echo "$as_me: error: cannot build kernel modules --without kernel source" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-if test "x$KSRC" = 'x'; then
-	# no source defined. Need to detect.
-	KVERS=${KVERS:-`uname -r`}
-	KSRC=/lib/modules/$KVERS/build
-fi
-
-if test "x$KSRC" != 'xnone'; then
-	if test ! -r $KSRC/.config; then
-		{ { echo "$as_me:$LINENO: error: kernel source dir $KSRC has no .config file" >&5
-echo "$as_me: error: kernel source dir $KSRC has no .config file" >&2;}
-   { (exit 1); exit 1; }; }
-	fi
-	. $KSRC/.config
-
-	# TODO: add here a sanity checks for the kernel source directory
-	# TODO: add here a test to build a dummy kernel module
-
-	# CONFIG_USB comes from the kernel .config .
-	case "$CONFIG_USB" in
-		y|m):;;
-		*)MODS=`echo MODS | sed -e 's/wcusb\|xpp\//g'` ;;
-	esac
-fi
-
-
-
-
-# A first approximation for the complete list of utilities
-# Used, e.g. for the clean target.
-XPP_UTILS_DIR=kernel/xpp/utils
-UTILS=`grep -l main *.c | sed -e 's/\.c$//' | xargs`
-UTILS="$UTILS $XPP_UTILS_DIR/"
-
-
-# Check whether --with-utils was given.
-if test "${with_utils+set}" = set; then
-  withval=$with_utils; use_utils="$withval"
-else
-  use_utils="all"
-
-fi
-
-
-for val in `echo $use_utils | tr , ' ' `; do
-	case "$val" in
-	none) BINS='';;
-	all)  BINS="fxotune fxstest sethdlc-new ztcfg ztdiag ztmonitor zttest zttool $XPP_UTILS_DIR/";;
-	-*) # -util: remove util:
-		remval=`echo $val | sed -e 's|^-||'`;
-		BINS=`echo $BINS | sed -e "s|$remval||"`
-		;;
-	xpp) BINS="$BINS $XPP_UTILS_DIR/";;
-	*) BINS="$BINS $val";;
-	esac
-done
-
-# verify all target utilities are in UTILS:
-BINS_NEW=''
-echo $UTILS | tr ' ' '\n' >config.all_utils
-for util in $BINS; do
-	if grep -qF "$util" config.all_utils; then
-		BINS_NEW="$BINS_NEW $util"
-	fi
-done
-rm config.all_utils
-
-# Remove duplicates:
-BINS=`echo $BINS_NEW | tr ' ' '\n' | sort -u | xargs`
-
-# zttool depends on the curses lib:
-if test "$PBX_LIBCURSES" = 0; then
-	BINS=`echo $BINS | sed -e 's/zttool//'`
-fi
-
-MOD_NAMES=`echo $MODS| tr ' ' '\n' | grep -v / | xargs`
-MOD_DIRS=` echo $MODS| tr ' ' '\n' | grep    / | xargs`
-
-UTIL_NAMES=`echo $BINS| tr ' ' '\n' | grep -v / | xargs`
-UTIL_DIRS=` echo $BINS| tr ' ' '\n' | grep    / | xargs`
-
-UTIL_NAMES_ALL=`echo $UTILS| tr ' ' '\n' | grep -v / | xargs`
-UTIL_DIRS_ALL=` echo $UTILS| tr ' ' '\n' | grep    / | xargs`
-
-
-
 
 
 
@@ -6197,19 +6026,11 @@
 USB_LIB!$USB_LIB$ac_delim
 USB_INCLUDE!$USB_INCLUDE$ac_delim
 PBX_LIBUSB!$PBX_LIBUSB$ac_delim
-KVERS!$KVERS$ac_delim
-KSRC!$KSRC$ac_delim
-MOD_NAMES!$MOD_NAMES$ac_delim
-MOD_DIRS!$MOD_DIRS$ac_delim
-UTIL_NAMES!$UTIL_NAMES$ac_delim
-UTIL_DIRS!$UTIL_DIRS$ac_delim
-UTIL_NAMES_ALL!$UTIL_NAMES_ALL$ac_delim
-UTIL_DIRS_ALL!$UTIL_DIRS_ALL$ac_delim
 LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 79; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -6542,16 +6363,6 @@
 fi
 
 
-{ echo "$as_me:$LINENO: Will build the following:" >&5
-echo "$as_me: Will build the following:" >&6;}
-{ echo "$as_me:$LINENO: Utilities: $BINS ." >&5
-echo "$as_me: Utilities: $BINS ." >&6;}
-if test "x$KSRC" != 'xnone'; then
-	{ echo "$as_me:$LINENO: Kernel Modules and subdirectories: $MODS ." >&5
-echo "$as_me: Kernel Modules and subdirectories: $MODS ." >&6;}
-	{ echo "$as_me:$LINENO: Kernel $KVERS from $KSRC ." >&5
-echo "$as_me: Kernel $KVERS from $KSRC ." >&6;}
-fi
 { echo "$as_me:$LINENO: *** Zaptel build successfully configured ***" >&5
 echo "$as_me: *** Zaptel build successfully configured ***" >&6;}
 

Modified: team/tzafrir/kernelmove_14/configure.ac
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_14/configure.ac?view=diff&rev=2691&r1=2690&r2=2691
==============================================================================
--- team/tzafrir/kernelmove_14/configure.ac (original)
+++ team/tzafrir/kernelmove_14/configure.ac Wed Jul  4 15:26:17 2007
@@ -60,159 +60,8 @@
 AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
 AST_EXT_LIB([usb], [usb_init], [usb.h], [USB], [libusb])
 
-# FIXME: generate list automatically:
-ALL_MODULES="pciradio tor2 torisa wcfxo wct1xxp wctdm wctdm24xxp \
-wcte11xp wcte12xp wcusb zaptel ztd-eth ztd-loc ztdummy ztdynamic \
-zttranscode wct4xxp/ wctc4xxp/ xpp/"
-
-AC_ARG_WITH(modules, 
-	[AS_HELP_STRING([--with-modules], 
-		[kernel modules to build. all, none, or comma-separated list.])],
-	[use_modules="$withval"],
-	[use_modules="all"]
-)
-
-for val in `echo $use_modules | tr , ' ' `; do
-	case "$val" in
-	none) MODS='';;
-	all)  MODS="$ALL_MODULES";; 
-	-*) # -module: remove util:
-		remval=`echo $val | sed -e 's|^-||'`;
-		MODS=`echo $MODS | sed -e "s|$remval||"`
-		;;
-	*) MODS="$MODS $val";;
-	esac
-done
-
-# verify all target modules are in ALL_MODULES:
-MODS_NEW=''
-echo $ALL_MODULES | tr ' ' '\n' >config.all_mods
-for mod in $MODS; do
-	if grep -qF "$mod" config.all_mods; then
-		MODS_NEW="$MODS_NEW $mod"
-	fi
-done
-MODS="$MODS_NEW"
-rm config.all_mods
-
-# Fix dependencies: We'll get rid of duplicates later.
-# ztd-eth and ztd-loc need ztdynamic:
-if echo $MODS | egrep -q 'ztd-(eth|loc)'; then
-	MODS="$MODS ztdynamic"
-fi
-
-# If there is any module: it needs zaptel
-if test "x$MODS" != 'x' && test "x$MODS" != 'x '; then
-	MODS="$MODS zaptel"
-fi
-
-
-# Remove duplicates:
-MODS=`echo $MODS | tr ' ' '\n' | sort -u | xargs`
-
-AC_ARG_WITH(ksrc,
-	    [AS_HELP_STRING([--with-ksrc],[kernel source path])],
-	    [KSRC="$withval"]
-)
-
-if test "x$KSRC" = 'xnone' &&  test "x$MODS" != 'x'; then
-	# kernel modules but without source? huh?
-	AC_MSG_ERROR(cannot build kernel modules --without kernel source)
-fi
-
-if test "x$KSRC" = 'x'; then
-	# no source defined. Need to detect.
-	KVERS=${KVERS:-`uname -r`}
-	KSRC=/lib/modules/$KVERS/build
-fi
-
-if test "x$KSRC" != 'xnone'; then
-	if test ! -r $KSRC/.config; then
-		AC_MSG_ERROR([kernel source dir $KSRC has no .config file])
-	fi
-	. $KSRC/.config
-
-	# TODO: add here a sanity checks for the kernel source directory
-	# TODO: add here a test to build a dummy kernel module
-
-	# CONFIG_USB comes from the kernel .config . 
-	case "$CONFIG_USB" in 
-		y|m):;; 
-		*)MODS=`echo MODS | sed -e 's/wcusb\|xpp\//g'` ;;
-	esac
-fi
-
-AC_SUBST(KVERS)
-AC_SUBST(KSRC)
-
-# A first approximation for the complete list of utilities
-# Used, e.g. for the clean target.
-XPP_UTILS_DIR=kernel/xpp/utils
-UTILS=`grep -l main *.c | sed -e 's/\.c$//' | xargs`
-UTILS="$UTILS $XPP_UTILS_DIR/"
-
-AC_ARG_WITH(utils, 
-	[AS_HELP_STRING([--with-utils], 
-		[utilities to build. all, none, or comma-separated list.])],
-	[use_utils="$withval"],
-	[use_utils="all"]
-)
-
-for val in `echo $use_utils | tr , ' ' `; do
-	case "$val" in
-	none) BINS='';;
-	all)  BINS="fxotune fxstest sethdlc-new ztcfg ztdiag ztmonitor zttest zttool $XPP_UTILS_DIR/";; 
-	-*) # -util: remove util:
-		remval=`echo $val | sed -e 's|^-||'`;
-		BINS=`echo $BINS | sed -e "s|$remval||"`
-		;;
-	xpp) BINS="$BINS $XPP_UTILS_DIR/";;
-	*) BINS="$BINS $val";;
-	esac
-done
-
-# verify all target utilities are in UTILS:
-BINS_NEW=''
-echo $UTILS | tr ' ' '\n' >config.all_utils
-for util in $BINS; do
-	if grep -qF "$util" config.all_utils; then
-		BINS_NEW="$BINS_NEW $util"
-	fi
-done
-rm config.all_utils
-
-# Remove duplicates:
-BINS=`echo $BINS_NEW | tr ' ' '\n' | sort -u | xargs`
-
-# zttool depends on the curses lib:
-if test "$PBX_LIBCURSES" = 0; then
-	BINS=`echo $BINS | sed -e 's/zttool//'`
-fi
-
-MOD_NAMES=`echo $MODS| tr ' ' '\n' | grep -v / | xargs`
-MOD_DIRS=` echo $MODS| tr ' ' '\n' | grep    / | xargs`
-
-UTIL_NAMES=`echo $BINS| tr ' ' '\n' | grep -v / | xargs`
-UTIL_DIRS=` echo $BINS| tr ' ' '\n' | grep    / | xargs`
-
-UTIL_NAMES_ALL=`echo $UTILS| tr ' ' '\n' | grep -v / | xargs`
-UTIL_DIRS_ALL=` echo $UTILS| tr ' ' '\n' | grep    / | xargs`
-
-AC_SUBST(MOD_NAMES)
-AC_SUBST(MOD_DIRS)
-AC_SUBST(UTIL_NAMES)
-AC_SUBST(UTIL_DIRS)
-AC_SUBST(UTIL_NAMES_ALL)
-AC_SUBST(UTIL_DIRS_ALL)
-
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
 AC_OUTPUT
 
-AC_MSG_NOTICE(Will build the following:)
-AC_MSG_NOTICE(Utilities: $BINS .)
-if test "x$KSRC" != 'xnone'; then
-	AC_MSG_NOTICE(Kernel Modules and subdirectories: $MODS .)
-	AC_MSG_NOTICE(Kernel $KVERS from $KSRC .)
-fi
 AC_MSG_NOTICE(*** Zaptel build successfully configured ***)
 

Modified: team/tzafrir/kernelmove_14/kernel/wct4xxp/Makefile.kernel26
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_14/kernel/wct4xxp/Makefile.kernel26?view=diff&rev=2691&r1=2690&r2=2691
==============================================================================
--- team/tzafrir/kernelmove_14/kernel/wct4xxp/Makefile.kernel26 (original)
+++ team/tzafrir/kernelmove_14/kernel/wct4xxp/Makefile.kernel26 Wed Jul  4 15:26:17 2007
@@ -1,12 +1,9 @@
 obj-m += wct4xxp.o
 
-OCT_PATH	:= /../../oct612x
-OCT_SRC		:= $(src)/../../oct612x
+OCT_CFLAGS	:= $(shell $(src)/../../oct612x/octasic-helper cflags  $(src)/../../oct612x)
+OCT_OBJS	:= $(shell $(src)/../../oct612x/octasic-helper objects ../../oct612x)
 
-OCT_CFLAGS	:= $(shell $(OCT_SRC)/octasic-helper cflags  $(src)/../../oct612x)
-OCT_OBJS	:= $(shell $(OCT_SRC)/octasic-helper objects $(obj)/../../oct612x)
-
-EXTRA_CFLAGS := -I$(src)/.. $(OCT_CFLAGS) -Wno-undef -DSTANDALONE_ZAPATA
+EXTRA_CFLAGS := -I$(src)/.. $(OCT_CFLAGS) -Wno-undef -DSTANDALONE_ZAPATA 
 
 wct4xxp-objs := base.o vpm450m.o $(OCT_OBJS)
 

Modified: team/tzafrir/kernelmove_14/kernel/wctc4xxp/Makefile.kernel26
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_14/kernel/wctc4xxp/Makefile.kernel26?view=diff&rev=2691&r1=2690&r2=2691
==============================================================================
--- team/tzafrir/kernelmove_14/kernel/wctc4xxp/Makefile.kernel26 (original)
+++ team/tzafrir/kernelmove_14/kernel/wctc4xxp/Makefile.kernel26 Wed Jul  4 15:26:17 2007
@@ -1,6 +1,7 @@
 obj-m += wctc4xxp.o
 
-EXTRA_CFLAGS := -I$(src)/.. -Wno-undef
+EXTRA_CFLAGS := -I$(src)/.. -Wno-undef -DSTANDALONE_ZAPATA 
+
 
 wctc4xxp-objs := base.o 
 

Modified: team/tzafrir/kernelmove_14/kernel/xpp/utils/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_14/kernel/xpp/utils/Makefile?view=diff&rev=2691&r1=2690&r2=2691
==============================================================================
--- team/tzafrir/kernelmove_14/kernel/xpp/utils/Makefile (original)
+++ team/tzafrir/kernelmove_14/kernel/xpp/utils/Makefile Wed Jul  4 15:26:17 2007
@@ -43,7 +43,7 @@
 PBX_LIBUSB	= $(shell if [ -r /usr/include/usb.h ]; then echo 1; else echo 0; fi)
 endif
 
-WCTDM=$(ZAPTEL_DIR)/wctdm.c
+WCTDM=$(ZAPTEL_DIR)/kernel/wctdm.c
 
 CFLAGS		= -g -Wall $(EXTRA_CFLAGS)
 

Modified: team/tzafrir/kernelmove_14/makeopts.in
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_14/makeopts.in?view=diff&rev=2691&r1=2690&r2=2691
==============================================================================
--- team/tzafrir/kernelmove_14/makeopts.in (original)
+++ team/tzafrir/kernelmove_14/makeopts.in Wed Jul  4 15:26:17 2007
@@ -37,14 +37,3 @@
 USB_LIB=@NCURSES_LIB@
 USB_INCLUDE=@USB_INCLUDE@
 
-MOD_NAMES=@MOD_NAMES@
-MOD_DIRS=@MOD_DIRS@
-UTIL_NAMES=@UTIL_NAMES@
-UTIL_DIRS=@UTIL_DIRS@
-UTILS_NAMES_ALL=@UTIL_NAMES_ALL@
-UTIL_DIRS_ALL=@UTIL_DIRS_ALL@
-
-KSRC=@KSRC@
-KVERS=@KVERS@
-
-FIRMWARES=




More information about the svn-commits mailing list