[zaptel-commits] tzafrir: branch tzafrir/kernelmove_conf r2705 - in /team/tzafrir/kernelmove_c...

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Sat Jul 7 21:10:12 CDT 2007


Author: tzafrir
Date: Sat Jul  7 21:10:12 2007
New Revision: 2705

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2705
Log:
Implement dependencies accross categories.

Modified:
    team/tzafrir/kernelmove_conf/build_tools/config_info
    team/tzafrir/kernelmove_conf/build_tools/update_config
    team/tzafrir/kernelmove_conf/configure
    team/tzafrir/kernelmove_conf/configure.ac

Modified: team/tzafrir/kernelmove_conf/build_tools/config_info
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_conf/build_tools/config_info?view=diff&rev=2705&r1=2704&r2=2705
==============================================================================
--- team/tzafrir/kernelmove_conf/build_tools/config_info (original)
+++ team/tzafrir/kernelmove_conf/build_tools/config_info Sat Jul  7 21:10:12 2007
@@ -8,18 +8,28 @@
 
 my $category = '';
 my $command = 'targets_list';
-my $items_param;
+my %items_param = ();
+my $format = 'lines';
+my $print_only_default = 0;
+
+my @AllCategories = qw/modules utils/;
 
 sub usage() {
   print STDERR
     "$0: get informaition from $conf_dir/ data.\n".
     "\n".
-    "Usage: $0 --category CAT COMMAND\n".
+    "Usage: $0 --category CAT --list\n".
+    "Usage: $0 --category CAT --targets\n".
+    "Usage: $0 --fixdeps --items CAT=ITEM1[,ITEM2..] [--items ..]\n".
     "\n".
     "Options:\n".
-    "    -c |--category CAT  Use data from $conf_dir/CAT . Required.\n".
+    "    CAT:                Use data from $conf_dir/CAT\n".
+    "    ITEMM1, ITEM2:      Configuration items (e.g: kernel modules).\n".
     "    -l | --list         Print a space-separated list of items in CAT.\n".
     "    -t | --targets      Print a list of targets with their descriptions.\n".
+    "    -f | --fixdeps      Complete items lists to fix dependencies.\n".
+    "    -s | --shell        Print dependecies as shell commands for eval.\n".
+    "    -d | --default      Print only default items selection from CAT.\n".
     "    -h | --help         This message\n".
     "";
 }
@@ -28,8 +38,10 @@
   'list|l' => sub {$command = 'list'},
   'fixdeps|f' => sub {$command = 'fixdeps'},
   'targets-list|targets|t' => sub {$command = 'targets_list'},
-  'items|i=s' => \$items_param, # a list of items to fix dependencies for.
+  'items|i=s' => \%items_param, # a list of items to fix dependencies for.
   'category|c=s' => \$category,
+  'shell|s' => sub {$format = 'shell'},
+  'default|d' => \$print_only_default,
   'help|h' => sub {usage; exit 0;}
 );
 
@@ -55,6 +67,16 @@
   return \%conf;
 }
 
+sub read_all_confs() {
+  
+  my %conf = ();
+
+  foreach my $category (@AllCategories){
+    $conf{$category} = read_conf($category);
+  }
+  return \%conf;
+}
+
 # prints a space-separated list of the items in inout category.
 sub run_list($){
   my $category = shift;
@@ -62,6 +84,10 @@
   my $conf = read_conf($category);
   my @items = sort keys (%$conf);
 
+  if ($print_only_default) {
+    @items = grep {not exists $conf->{$_}{'Default'}} @items;
+  }
+
   print join(' ', @items);
   print "\n";
 }
@@ -73,6 +99,10 @@
   my $conf = read_conf($category);
   my @items = sort keys (%$conf);
 
+  if ($print_only_default) {
+    @items = grep {not exists $conf->{$_}{'Default'}} @items;
+  }
+
   for my $item (@items) {
     next if (exists $conf->{$item}{'PullOnly'});
 
@@ -83,38 +113,88 @@
 
 
 sub run_fixdeps($$){
-  my ($category, $items_list) = @_;
-
-  my @items = split(' ', $items_list);
+  my ($items_ref, $format) = @_;
+
+
+  # Items may be separated by commas or whitespaces
 
   my %deps_map = ();
 
-  my $conf = read_conf($category);
-
-  for (my $item = shift @items; defined $item; $item = shift @items){
-    #print "got item $item\n";
-    if (!exists $conf->{$item}){
+  my $conf = read_all_confs();
+  
+  foreach my $category (keys %$conf) {
+    foreach my $item (keys %{$conf->{$category}}) {
+      $deps_map{$item}{'category'} = $category;
+    }
+  }
+
+
+  # cat_items: the queue of items to be checked for dependencies.
+  # We should know the item and its category.
+  my @cat_items = ();
+
+  foreach my $category (keys %$items_ref) {
+    my @items = split(/[,\s]+/, $items_ref->{$category}); 
+    foreach my $item (@items) {
+      push @cat_items,({'category'=>$category, 'item'=>$item})
+    }
+  }
+  
+  # resolve dependencies:
+  for (my $cat_item = shift @cat_items; defined $cat_item; $cat_item = shift @cat_items){
+    my $item     = $cat_item->{'item'};
+    my $category = $cat_item->{'category'};
+    if (not exists $conf->{$category}) {
+      print STDERR "$0: Warning caetgory '$category' not found in configuration. Dropping $item.\n";
+      next;
+    }
+    if (!exists $conf->{$category}{$item}){
       print STDERR "$0: Warning: item '$item' not found in configuration. Dropping\n";
       next;
     }
-    $deps_map{$item} = 1;
-    next unless (exists  $conf->{$item}{'Depends'});
-    my @deps = split(/[ ,]+/, $conf->{$item}{'Depends'});
+    $deps_map{$item}{'seen'} = 1;
+    #print STDERR "item: $item\n";
+    next unless (exists  $conf->{$category}{$item}{'Depends'});
+    my @deps = split(/[ ,]+/, $conf->{$category}{$item}{'Depends'});
 
     foreach my $dep (@deps) {
-      #print "got dependency $dep\n";
+      #print STDERR "item: $item, dep: $dep\n";
       # if we haven't seen it, check it recursively, just in case
-      if (! exists $deps_map{$dep}) {
-        push(@items, ($dep));
+      if (! exists $deps_map{$dep}{'seen'}) {
+	my $dep_cat = $deps_map{$dep}{'category'};
+        push(@cat_items, ({'item'=>$dep, 'category'=>$dep_cat}));
       }
     }
   }
-  my @answer = sort keys %deps_map;
-  print "".join(' ', @answer)."\n";
+
+  # collect back into a categories tree:
+  my %new_conf = ();
+  foreach my $item (keys %deps_map) {
+    next unless (exists $deps_map{$item}{'seen'});
+    #print STDERR "new_conf: addg item $item into category $deps_map{$item}{'category'}.\n";
+    $new_conf{$deps_map{$item}{'category'}}{$item} = 1;
+  }
+
+  # print output:
+  if ($format eq 'lines') {
+    foreach my $category (sort keys %new_conf) {
+      #print STDERR "printng category $category\n";
+      print "$category: ". join(' ', (sort keys %{$new_conf{$category}})).  "\n";
+  
+    }
+  } elsif ($format eq 'shell') {
+    #print "eval echo ";
+    foreach my $category (sort keys %new_conf) {
+      print "ITEMS_FULL_$category=\"".  
+        join(' ', (keys %{$new_conf{$category}})).  "\";";
+      print " export ITEMS_FULL_$category;";
+    }
+    print "\n";
+  }
 }
 
 if ($command eq 'fixdeps') {
-  exit run_fixdeps($category, $items_param);
+  exit run_fixdeps(\%items_param, $format);
 } elsif ($command eq 'list') {
   exit run_list($category);
 } elsif ($command eq 'targets_list') {

Modified: team/tzafrir/kernelmove_conf/build_tools/update_config
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_conf/build_tools/update_config?view=diff&rev=2705&r1=2704&r2=2705
==============================================================================
--- team/tzafrir/kernelmove_conf/build_tools/update_config (original)
+++ team/tzafrir/kernelmove_conf/build_tools/update_config Sat Jul  7 21:10:12 2007
@@ -47,7 +47,7 @@
 }
 
 sub extract_kernel() {
-  get_category('kernel', <kernel/*.c> , <kernel/*/*.c>)
+  get_category('modules', <kernel/*.c> , <kernel/*/*.c>)
 }
 
 sub extract_utils() {

Modified: team/tzafrir/kernelmove_conf/configure
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_conf/configure?view=diff&rev=2705&r1=2704&r2=2705
==============================================================================
--- team/tzafrir/kernelmove_conf/configure (original)
+++ team/tzafrir/kernelmove_conf/configure Sat Jul  7 21:10:12 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 6016 .
+# From configure.ac Revision: 2695 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -1278,11 +1278,11 @@
   --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, help, or
-                          comma-separated list.
+  --with-modules          kernel to build. all, none, help, or comma-separated
+                          list.
+  --with-utils            utils to build. all, none, help, 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
@@ -5338,47 +5338,105 @@
 
 
 
-# Update configuration.
-# FIXME: do this on-demand, and remove hardwiring.
-build_tools/update_config >build_conf/kernel
-
-ALL_MODULES="`build_tools/config_info --list --category kernel`"
+# Extract configuration from source files:
+build_tools/update_config
+
+# FIXME: move the following to acinclue.m4 once it is debugged
+
+# $1: Name of the --with option
+# $2: very short description. Should not begin with a capital letter.
+
+
+
+ALL_modules="`build_tools/config_info --list --category modules`"
+DEFAULT_modules="`build_tools/config_info --list --category modules --default`"
 
 
 # Check whether --with-modules was given.
 if test "${with_modules+set}" = set; then
   withval=$with_modules; use_modules="$withval"
 else
-  use_modules="all"
+  use_modules="default"
 
 fi
 
 
 for val in `echo $use_modules | tr , ' ' `; do
 	case "$val" in
-	none) MODS='';;
+	none) ITEMS='';;
         help)
 		# FIXME: Usage of echo? exit 1?
 		echo "By default build all modules."
 		echo "To build just specific modules, provide a comma-separated list."
 		echo "Available modules:"
-		build_tools/config_info --category kernel --targets
+		build_tools/config_info --category modules --targets
 		echo ""
 		echo "all: build all."
 		echo "-MODULE: don't build module"
 		exit 1
 		;;
-	all)  MODS="$ALL_MODULES";;
+	all)  ITEMS="$ALL_modules";;
+	default)  ITEMS="$DEFAULT_modules";;
 	-*) # -module: remove util:
 		remval=`echo $val | sed -e 's|^-||'`;
-		MODS=`echo $MODS | sed -e "s|$remval||"`
+		ITEMS=`echo $ITEMS | sed -e "s|$remval||"`
 		;;
-	*) MODS="$MODS $val";;
+	*) ITEMS="$ITEMS $val";;
 	esac
 done
 
+ITEMS_modules="$ITEMS"
+ITEMS_PARAM="$ITEMS_PARAM --items modules=`echo $ITEMS | tr ' ' ,`"
+
+
+ALL_utils="`build_tools/config_info --list --category utils`"
+DEFAULT_utils="`build_tools/config_info --list --category utils --default`"
+
+
+# Check whether --with-utils was given.
+if test "${with_utils+set}" = set; then
+  withval=$with_utils; use_utils="$withval"
+else
+  use_utils="default"
+
+fi
+
+
+for val in `echo $use_utils | tr , ' ' `; do
+	case "$val" in
+	none) ITEMS='';;
+        help)
+		# FIXME: Usage of echo? exit 1?
+		echo "By default build all utils."
+		echo "To build just specific utils, provide a comma-separated list."
+		echo "Available utils:"
+		build_tools/config_info --category utils --targets
+		echo ""
+		echo "all: build all."
+		echo "-MODULE: don't build module"
+		exit 1
+		;;
+	all)  ITEMS="$ALL_utils";;
+	default)  ITEMS="$DEFAULT_utils";;
+	-*) # -module: remove util:
+		remval=`echo $val | sed -e 's|^-||'`;
+		ITEMS=`echo $ITEMS | sed -e "s|$remval||"`
+		;;
+	*) ITEMS="$ITEMS $val";;
+	esac
+done
+
+ITEMS_utils="$ITEMS"
+ITEMS_PARAM="$ITEMS_PARAM --items utils=`echo $ITEMS | tr ' ' ,`"
+
 # Fix dependencies, remove invalids, duplicates, etc.
-MODS="`build_tools/config_info --fixdeps --category kernel --items=\"$MODS\"`"
+eval `build_tools/config_info --fixdeps --shell $ITEMS_PARAM`
+
+
+# FIXMES: handle errors?
+
+# config_info --fixdeps --shell places the output in the variables
+# ITEMS_FULL_category
 
 
 # Check whether --with-ksrc was given.
@@ -5388,7 +5446,7 @@
 fi
 
 
-if test "x$KSRC" = 'xnone' &&  test "x$MODS" != 'x'; then
+if test "x$KSRC" = 'xnone' &&  test "x$ITEMS_FULL_modules" != '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;}
@@ -5415,7 +5473,7 @@
 	# CONFIG_USB comes from the kernel .config .
 	case "$CONFIG_USB" in
 		y|m):;;
-		*)MODS=`echo MODS | sed -e 's/wcusb\|xpp\//g'` ;;
+		*)ITEMS_FULL_modules=`echo ITEMS_FULL_modules | sed -e 's/wcusb\|xpp\//g'` ;;
 	esac
 fi
 
@@ -5428,55 +5486,22 @@
 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`
-
+# FIXME: the following does nothing now (BINS is unused)
+# however we should integrate external libraries into our
+# dependency checking.
 # 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`
+MOD_NAMES=`echo $ITEMS_FULL_modules| tr ' ' '\n' | grep -v / | xargs`
+MOD_DIRS=` echo $ITEMS_FULL_modules| tr ' ' '\n' | grep    / | xargs`
+
+UTIL_NAMES=`echo $ITEMS_FULL_utils| tr ' ' '\n' | grep -v / | xargs`
+UTIL_DIRS=` echo $ITEMS_FULL_utils| tr ' ' '\n' | grep    / | xargs`
+
+UTIL_NAMES_ALL=`echo $ALL_utils| tr ' ' '\n' | grep -v / | xargs`
+UTIL_DIRS_ALL=` echo $ALL_utils| tr ' ' '\n' | grep    / | xargs`
 
 
 
@@ -6533,11 +6558,11 @@
 
 { 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;}
+{ echo "$as_me:$LINENO: Utilities: $ITEMS_FULL_utils ." >&5
+echo "$as_me: Utilities: $ITEMS_FULL_utils ." >&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 Modules and subdirectories: $ITEMS_FULL_modules ." >&5
+echo "$as_me: Kernel Modules and subdirectories: $ITEMS_FULL_modules ." >&6;}
 	{ echo "$as_me:$LINENO: Kernel $KVERS from $KSRC ." >&5
 echo "$as_me: Kernel $KVERS from $KSRC ." >&6;}
 fi

Modified: team/tzafrir/kernelmove_conf/configure.ac
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove_conf/configure.ac?view=diff&rev=2705&r1=2704&r2=2705
==============================================================================
--- team/tzafrir/kernelmove_conf/configure.ac (original)
+++ team/tzafrir/kernelmove_conf/configure.ac Sat Jul  7 21:10:12 2007
@@ -60,51 +60,70 @@
 AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
 AST_EXT_LIB([usb], [usb_init], [usb.h], [USB], [libusb])
 
-# Update configuration. 
-# FIXME: do this on-demand, and remove hardwiring.
-build_tools/update_config >build_conf/kernel
+# Extract configuration from source files:
+build_tools/update_config
 
-ALL_MODULES="`build_tools/config_info --list --category kernel`"
+# FIXME: move the following to acinclue.m4 once it is debugged
 
-AC_ARG_WITH(modules, 
-	[AS_HELP_STRING([--with-modules], 
-		[kernel modules to build. all, none, help, or comma-separated list.])],
-	[use_modules="$withval"],
-	[use_modules="all"]
+# $1: Name of the --with option
+# $2: very short description. Should not begin with a capital letter.
+AC_DEFUN([AST_CONFIG_CATEGORY],
+[
+ALL_$1="`build_tools/config_info --list --category $1`"
+DEFAULT_$1="`build_tools/config_info --list --category $1 --default`"
+
+AC_ARG_WITH($1, 
+	[AS_HELP_STRING([--with-$1], 
+		[$2 to build. all, none, help, or comma-separated list.])],
+	[use_$1="$withval"],
+	[use_$1="default"]
 )
 
-for val in `echo $use_modules | tr , ' ' `; do
+for val in `echo $use_$1 | tr , ' ' `; do
 	case "$val" in
-	none) MODS='';;
+	none) ITEMS='';;
         help) 
 		# FIXME: Usage of echo? exit 1? 
-		echo "By default build all modules."
-		echo "To build just specific modules, provide a comma-separated list."
-		echo "Available modules:"
-		build_tools/config_info --category kernel --targets
+		echo "By default build all $1."
+		echo "To build just specific $1, provide a comma-separated list."
+		echo "Available $1:"
+		build_tools/config_info --category $1 --targets
 		echo ""
 		echo "all: build all." 
 		echo "-MODULE: don't build module"
 		exit 1
 		;;
-	all)  MODS="$ALL_MODULES";; 
+	all)  ITEMS="$ALL_$1";; 
+	default)  ITEMS="$DEFAULT_$1";; 
 	-*) # -module: remove util:
 		remval=`echo $val | sed -e 's|^-||'`;
-		MODS=`echo $MODS | sed -e "s|$remval||"`
+		ITEMS=`echo $ITEMS | sed -e "s|$remval||"`
 		;;
-	*) MODS="$MODS $val";;
+	*) ITEMS="$ITEMS $val";;
 	esac
 done
 
+ITEMS_$1="$ITEMS"
+ITEMS_PARAM="$ITEMS_PARAM --items $1=`echo $ITEMS | tr ' ' ,`"
+])
+
+AST_CONFIG_CATEGORY(modules,kernel,[kernel modules])
+AST_CONFIG_CATEGORY(utils,utils,[utilities])
 # Fix dependencies, remove invalids, duplicates, etc.
-MODS="`build_tools/config_info --fixdeps --category kernel --items=\"$MODS\"`"
+eval `build_tools/config_info --fixdeps --shell $ITEMS_PARAM`
+
+
+# FIXMES: handle errors?
+
+# config_info --fixdeps --shell places the output in the variables
+# ITEMS_FULL_category
 
 AC_ARG_WITH(ksrc,
 	    [AS_HELP_STRING([--with-ksrc],[kernel source path])],
 	    [KSRC="$withval"]
 )
 
-if test "x$KSRC" = 'xnone' &&  test "x$MODS" != 'x'; then
+if test "x$KSRC" = 'xnone' &&  test "x$ITEMS_FULL_modules" != 'x'; then
 	# kernel modules but without source? huh?
 	AC_MSG_ERROR(cannot build kernel modules --without kernel source)
 fi
@@ -127,7 +146,7 @@
 	# CONFIG_USB comes from the kernel .config . 
 	case "$CONFIG_USB" in 
 		y|m):;; 
-		*)MODS=`echo MODS | sed -e 's/wcusb\|xpp\//g'` ;;
+		*)ITEMS_FULL_modules=`echo ITEMS_FULL_modules | sed -e 's/wcusb\|xpp\//g'` ;;
 	esac
 fi
 
@@ -140,52 +159,22 @@
 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`
-
+# FIXME: the following does nothing now (BINS is unused)
+# however we should integrate external libraries into our 
+# dependency checking.
 # 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`
+MOD_NAMES=`echo $ITEMS_FULL_modules| tr ' ' '\n' | grep -v / | xargs`
+MOD_DIRS=` echo $ITEMS_FULL_modules| tr ' ' '\n' | grep    / | xargs`
 
-UTIL_NAMES=`echo $BINS| tr ' ' '\n' | grep -v / | xargs`
-UTIL_DIRS=` echo $BINS| tr ' ' '\n' | grep    / | xargs`
+UTIL_NAMES=`echo $ITEMS_FULL_utils| tr ' ' '\n' | grep -v / | xargs`
+UTIL_DIRS=` echo $ITEMS_FULL_utils| tr ' ' '\n' | grep    / | xargs`
 
-UTIL_NAMES_ALL=`echo $UTILS| tr ' ' '\n' | grep -v / | xargs`
-UTIL_DIRS_ALL=` echo $UTILS| tr ' ' '\n' | grep    / | xargs`
+UTIL_NAMES_ALL=`echo $ALL_utils| tr ' ' '\n' | grep -v / | xargs`
+UTIL_DIRS_ALL=` echo $ALL_utils| tr ' ' '\n' | grep    / | xargs`
 
 AC_SUBST(MOD_NAMES)
 AC_SUBST(MOD_DIRS)
@@ -198,9 +187,9 @@
 AC_OUTPUT
 
 AC_MSG_NOTICE(Will build the following:)
-AC_MSG_NOTICE(Utilities: $BINS .)
+AC_MSG_NOTICE(Utilities: $ITEMS_FULL_utils .)
 if test "x$KSRC" != 'xnone'; then
-	AC_MSG_NOTICE(Kernel Modules and subdirectories: $MODS .)
+	AC_MSG_NOTICE(Kernel Modules and subdirectories: $ITEMS_FULL_modules .)
 	AC_MSG_NOTICE(Kernel $KVERS from $KSRC .)
 fi
 AC_MSG_NOTICE(*** Zaptel build successfully configured ***)




More information about the zaptel-commits mailing list