Added auto_config target to Makefile in all sub-directories. Added target to top-level Makefile to clean, auto configure and recompile just the kernel, pcmcia and linux-wlan. Fixed bug in Configure scripts to allow the auto configure option to not require an input file (i.e. uses config.out or config.in as default).
This commit is contained in:
parent
2d527c4931
commit
3d283f0e1e
34
Configure
34
Configure
|
@ -48,6 +48,14 @@ fail ()
|
|||
exit 1
|
||||
}
|
||||
|
||||
usage () {
|
||||
$ECHO "usage: Configure [-d [filename]|-f <filename>]"
|
||||
$ECHO ""
|
||||
$ECHO " -d [filename] - automated configuration with option to specify input file"
|
||||
$ECHO " -f <filename> - read configuration data from file and prompt user"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -r config.out ]; then
|
||||
. ./config.out 2>/dev/null
|
||||
else
|
||||
|
@ -60,10 +68,21 @@ fi
|
|||
|
||||
PROMPT=y
|
||||
if [ $# -gt 0 ] ; then
|
||||
if [ "$1" = "-d" ] ; then
|
||||
PROMPT=n
|
||||
if [ $# -gt 1 -a -r $2 ]; then
|
||||
. ./$2
|
||||
if [ "$1" = "-d" -o "$1" = "-f" ] ; then
|
||||
if [ $# -gt 1 ] ; then
|
||||
if [ -r $2 ]; then
|
||||
. $2
|
||||
else
|
||||
$ECHO "$2 does not exist"
|
||||
fail
|
||||
fi
|
||||
else
|
||||
if [ "$1" = "-f" ] ; then
|
||||
usage
|
||||
fi
|
||||
fi
|
||||
if [ "$1" = "-d" ] ; then
|
||||
PROMPT=n
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -73,13 +92,6 @@ arg () {
|
|||
eval $1=\"$VALUE\"
|
||||
}
|
||||
|
||||
usage () {
|
||||
echo "usage: Configure [-d <filename>]"
|
||||
echo ""
|
||||
echo " -d <filename> read configuration data from file"
|
||||
exit 1
|
||||
}
|
||||
|
||||
#=======================================================================
|
||||
|
||||
CONFIG=config.new
|
||||
|
|
10
Makefile
10
Makefile
|
@ -47,11 +47,14 @@ DIRS = src doc man etc
|
|||
|
||||
help:
|
||||
@echo "Pick one of the following targets:"
|
||||
@echo -e "\tmake default_config\t- configure using default config file"
|
||||
@echo -e "\tmake auto_config\t- automated configure"
|
||||
@echo -e "\tmake default_config\t- automated configure using default config file"
|
||||
@echo -e "\tmake config\t\t- configure and check system setup"
|
||||
@echo -e "\tmake all\t\t- build modules and programs"
|
||||
@echo -e "\tmake install\t\t- install modules and programs"
|
||||
@echo -e "\tmake clean\t\t- remove old binaries and dependency files"
|
||||
@echo -e "\tmake tags\t\t- generate tag files for source code"
|
||||
@echo " "
|
||||
|
||||
all:
|
||||
set -e; for d in $(DIRS); do $(MAKE) -C $$d ; done
|
||||
|
@ -66,6 +69,11 @@ clean:
|
|||
install:
|
||||
set -e; for d in $(DIRS); do $(MAKE) -C $$d install ; done
|
||||
|
||||
auto_config:
|
||||
@touch config.mk config.new
|
||||
@rm -f config.mk config.new
|
||||
@./Configure -d
|
||||
|
||||
default_config:
|
||||
@touch config.mk config.new
|
||||
@rm -f config.mk config.new
|
||||
|
|
Loading…
Reference in a new issue