[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[openap-cvs] : openap-main/scripts README,NONE,1.1 Configure,1.4,1.5 Men
From: |
David Kimdon <address@hidden> |
Subject: |
[openap-cvs] : openap-main/scripts README,NONE,1.1 Configure,1.4,1.5 Menuconfig,1.4,1.5 |
Date: |
Wed, 31 Jul 2002 10:37:31 -0400 |
Update of /cvsroot/openap/openap-main/scripts
In directory subversions:/tmp/cvs-serv15202
Modified Files:
Configure Menuconfig
Added Files:
README
Log Message:
Changes to config system that allow us to better intetgrate the kernel and root
filesystem dependancies.
--- NEW FILE ---
The Config Language has been modified to allow for dependancies between the
contents of the root filesystem and the kernel to be handled automatically. To
do this the standard Linux config.in's are source'd in the root filesystem
config.in's and dependancies are assigned in the normal way. The only catch is
that subsequant calls to source further config.in's within the linux
subdirectory will need a prefix added to the path. Two commands were added to
the configuration language to make this possible. These two commands are
documented below.
=== start_prefix /prefix/
This verb changes the behavior of all subsequant 'source' verbs.
Example:
start_prefix 'linux'
source arch/i386/config.in
end_prefix
=== end_prefix
This verb sets the prefix to the empty string.
Index: Configure
===================================================================
RCS file: /cvsroot/openap/openap-main/scripts/Configure,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Configure 23 Jul 2002 21:43:40 -0000 1.4
+++ Configure 31 Jul 2002 14:37:29 -0000 1.5
@@ -138,6 +138,22 @@
(echo "" ; echo "/*"; echo " * $1" ; echo " */") >>$CONFIG_H
}
+function start_prefix () {
+ eval "MCprefix=$1"
+}
+
+function end_prefix () {
+ eval "MCprefix="
+}
+
+function source () {
+ if [ -n "$MCprefix" ] ; then
+ . $MCprefix/$1
+ else
+ . $1
+ fi
+}
+
#
# define_bool sets the value of a boolean argument
#
@@ -563,7 +579,9 @@
echo "#"
fi
+enable -n source
. $CONFIG_IN
+enable source
rm -f .config.old
if [ -f .config ]; then
Index: Menuconfig
===================================================================
RCS file: /cvsroot/openap/openap-main/scripts/Menuconfig,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Menuconfig 18 Jul 2002 22:20:02 -0000 1.4
+++ Menuconfig 31 Jul 2002 14:37:29 -0000 1.5
@@ -736,8 +736,30 @@
printf("}\n") >>menu
return
}
+ else if ($1 == "start_prefix") {
+ prefix = $2
+ # FIXME: The purpose of this is simply to remove
+ # single quotes from around the prefix. I want to
+ # use a single quote in the regex but bash complains.
+ gsub(/[^a-zA-Z_\/]/, "", prefix)
+ }
+ else if ($1 == "end_prefix") {
+ prefix=""
+ }
else if ($1 == "source") {
- parser($2,menu)
+ if ( prefix != "") {
+ file = sprintf("%s/%s", prefix, $2);
+ } else {
+ file = sprintf("%s", $2);
+ }
+
+ if ( (getline < file) < 0 ) {
+ printf ("Cannot read file %s.", file);
+ exit
+ }
+ close(file)
+
+ parser(file,menu)
}
else {
print >>menu
@@ -765,7 +787,13 @@
printf("") >>menu
}
else if ($1 == "source") {
- parser($2,menu)
+ if ( (getline prefix < "MCprefix") >=0 ) {
+ file = sprintf("%s/%s", prefix, $2);
+ close("MCprefix");
+ } else {
+ file = sprintf("%s", $2);
+ }
+ parser(file,menu)
}
else {
print >>menu
@@ -1263,8 +1291,26 @@
echo " */" >>$CONFIG_H
fi
}
+
+ function start_prefix () {
+ eval "MCprefix=$1"
+ }
+ function end_prefix () {
+ eval "MCprefix="
+ }
+
+
+ function source () {
+ if [ -n "$MCprefix" ] ; then
+ . $MCprefix/$1
+ else
+ . $1
+ fi
+ }
+
echo -n "."
+
DEF_CONFIG="${1:-.config}"
DEF_CONFIG_H="config/autoconf.h"
@@ -1282,6 +1328,9 @@
echo "#define AUTOCONF_INCLUDED" >> $CONFIG_H
echo -n "."
+
+ enable -n source
+
if . $CONFIG_IN >>.menuconfig.log 2>&1
then
if [ "$DEF_CONFIG" = ".config" ]
@@ -1301,6 +1350,7 @@
else
return 1
fi
+ enable source
}
#
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [openap-cvs] : openap-main/scripts README,NONE,1.1 Configure,1.4,1.5 Menuconfig,1.4,1.5,
David Kimdon <address@hidden> <=