diff options
author | Raphael Manfredi <Raphael_Manfredi@pobox.com> | 2018-06-05 14:28:56 +0200 |
---|---|---|
committer | Raphael Manfredi <Raphael_Manfredi@pobox.com> | 2018-06-05 15:03:43 +0200 |
commit | 7c4c3dd291c741e2a42c78efd77ffbd3a1c9c1c1 (patch) | |
tree | 773fe4188bb797c492f9dbb389cf028fd0b2f787 /Configure | |
parent | cf4ee93a463709e3d83d485c316d8db28e162f00 (diff) |
Added Specific.U as a hook for project-specific code.
After generating config.sh, this is a place where optional generation
can happen, before going on with the .SH file extractions and
dependency computations.
Typically, this can be used to generate a revision.h file.
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 47 |
1 files changed, 32 insertions, 15 deletions
@@ -16,9 +16,9 @@ # The dist package (which contains metaconfig) is available via SVN: # svn co https://svn.code.sf.net/p/dist/code/trunk/dist -# $Id: Head.U 167 2013-05-08 17:58:00Z rmanfredi $ +# $Id$ # -# Generated on Sat Nov 14 16:05:58 CET 2015 [metaconfig 3.5-197] +# Generated on Tue Jun 5 14:21:57 CEST 2018 [metaconfig 3.5-239] cat >c1$$ <<EOF ARGGGHHHH!!!!! @@ -274,6 +274,7 @@ _a='' _o='' archobjs='' firstmakefile='' +rm_try='' afs='' afsroot='' baserev='' @@ -722,7 +723,7 @@ while test $# -gt 0; do esac shift ;; - -V) echo "$me generated by metaconfig 3.5-197." >&2 + -V) echo "$me generated by metaconfig 3.5-239." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; @@ -855,10 +856,14 @@ esac : Find the path to the source tree case "$src" in '') case "$0" in - */*) - src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` - ;; - *) src='.';; + */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` + case "$src" in + /*) ;; + .) ;; + *) src=`cd ../$src && pwd` ;; + esac + ;; + *) src='.';; esac;; esac case "$src" in @@ -1674,7 +1679,7 @@ case "$lns" in ;; *) issymlink='' ;; esac - fi + fi fi if $test "X$issymlink" = X; then if $test -L sym 2>/dev/null; then @@ -2270,12 +2275,15 @@ esac : who configured the system cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` -cf_by=`(logname) 2>/dev/null` case "$cf_by" in "") - cf_by=`(whoami) 2>/dev/null` + cf_by=`(logname) 2>/dev/null` case "$cf_by" in - "") cf_by=unknown ;; + "") + cf_by=`(whoami) 2>/dev/null` + case "$cf_by" in + "") cf_by=unknown ;; + esac ;; esac ;; esac @@ -2352,10 +2360,10 @@ cat >filexp <<EOSS $startsh : expand filename case "\$1" in - ~/*|~) + \~/*|\~) echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|" ;; - ~*) + \~*) if $test -f /bin/csh; then /bin/csh -f -c "glob \$1" failed=\$? @@ -2879,6 +2887,8 @@ case "$_o" in '') _o='.o';; esac +rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*" + : set the base revision baserev=3.5 @@ -3941,7 +3951,7 @@ y) ;; n) echo "OK, that should do.";; esac -$rm -f try try.* core +$rm_try : determine default editor echo " " @@ -4250,9 +4260,9 @@ case "$pager" in esac ;; *) dflt="$pager" - fn="f/($pager)" ;; esac +fn="f/($dflt)" echo " " rp='What pager is used on your system?' . ./getfile @@ -4572,6 +4582,7 @@ privlibexp='$privlibexp' pthread='$pthread' revision='$revision' rm='$rm' +rm_try='$rm_try' rmail='$rmail' run='$run' scriptdir='$scriptdir' @@ -4616,6 +4627,12 @@ zcat='$zcat' zip='$zip' EOT +: project-specific code +file=revision.h +echo " " +echo "Generating $file..." +bin/svn-revision . $file + : add special variables $test -f $src/patchlevel.h && \ awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh |