diff options
author | rmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af> | 2008-05-28 11:19:25 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af> | 2008-05-28 11:19:25 +0000 |
commit | 6ed168ff814db8f9bcaad6f2e218fb2bbacbdb1c (patch) | |
tree | d714e774455de2d2950794b5b3ebe9c9da43035e | |
parent | 5de075ee96dc6fc8b18e37a70af93fca66bbfa25 (diff) |
SVN revision number is now automatically generated in "revision.h".
The old patchlevel information is no longer used, and <PATCHLEVEL> is
deprecated in unit files, replaced by <REVISION>.
git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@25 190e5f8e-a817-0410-acf6-e9863daed9af
-rwxr-xr-x | Configure | 53 | ||||
-rw-r--r-- | Jmakefile | 6 | ||||
-rw-r--r-- | MANIFEST | 2 | ||||
-rwxr-xr-x | Makefile.SH | 11 | ||||
-rwxr-xr-x | jmake/fixcpp.SH | 1 | ||||
-rwxr-xr-x | jmake/jmake.SH | 3 | ||||
-rw-r--r-- | mcon/U/Head.U | 2 | ||||
-rw-r--r-- | mcon/U/Oldsym.U | 2 | ||||
-rw-r--r-- | mcon/U/Options.U | 2 | ||||
-rw-r--r-- | mcon/U/patchlevel.U | 28 | ||||
-rwxr-xr-x | mcon/man/mconfig.SH | 6 | ||||
-rwxr-xr-x | mcon/mconfig.SH | 3 | ||||
-rwxr-xr-x | mcon/mlint.SH | 3 | ||||
-rwxr-xr-x | mcon/mxref.SH | 3 | ||||
-rw-r--r-- | mcon/pl/configure.pl | 4 | ||||
-rw-r--r-- | mcon/pl/lint.pl | 1 |
16 files changed, 107 insertions, 23 deletions
@@ -18,7 +18,7 @@ # $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $ # -# Generated on Sat Aug 26 00:34:34 MEST 2006 [metaconfig 3.5 PL0] +# Generated on Wed May 28 13:11:20 CEST 2008 [metaconfig 3.5-17] cat >c1$$ <<EOF ARGGGHHHH!!!!! @@ -318,6 +318,7 @@ package='' spackage='' pager='' patchlevel='' +revision='' perlpath='' pkgsrc='' prefix='' @@ -714,7 +715,7 @@ while test $# -gt 0; do esac shift ;; - -V) echo "$me generated by metaconfig 3.5 PL0." >&2 + -V) echo "$me generated by metaconfig 3.5-17." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; @@ -1351,7 +1352,6 @@ tr uniq " trylist=" -Mcc cpp date inews @@ -3618,10 +3618,16 @@ esac : determine optimize, if desired, or use for debug flag also case "$optimize" in ' '|$undef) dflt='none';; -'') dflt='-O';; +'') + case "$gccversion" in + '') dflt='-O';; + *) dflt='-O2 -g';; + esac + ;; *) dflt="$optimize";; esac -$cat <<EOH +case "$gccversion" in +'') $cat <<EOH Some C compilers have problems with their optimizers. By default, $package compiles with the -O flag to use the optimizer. Alternately, you might want @@ -3630,6 +3636,17 @@ systems). Either flag can be specified here. To use neither flag, specify the word "none". EOH + ;; +*) $cat <<EOH + +With the GNU C compiler, it is possible to supply both -O2 and -g flags, to +be able to reasonably optimize, whilst retaining the ability to use a +symbolic debugger. Either flag can be specified here. To use neither flag, +specify the word "none". + +EOH + ;; +esac rp="What optimizer/debugger flag should be used?" . ./myread optimize="$ans" @@ -3655,7 +3672,7 @@ default|recommended) esac case "$gccversion" in 1*|2*) dflt="$dflt -Wall";; - *) dflt="$dflt -W -Wall -Wformat=2";; + *) dflt="$dflt -W -Wall -Wformat=2 -Wshadow";; esac ;; esac @@ -4191,9 +4208,9 @@ rp='What pager is used on your system?' . ./getfile pager="$ans" -: get the patchlevel +: get the patchlevel / revision echo " " -echo "Getting the current patchlevel..." >&4 +echo "Getting the current patchlevel / revision..." >&4 if $test -r $rsrc/patchlevel.h;then patchlevel=`awk \ '/^#[ ]*define[ ][ ]*PATCHLEVEL/ {print $3}' \ @@ -4201,7 +4218,22 @@ if $test -r $rsrc/patchlevel.h;then else patchlevel=0 fi -echo "(You have $package $baserev PL$patchlevel.)" +if $test -r $rsrc/revision.h;then + revision=`awk \ + '/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \ + < $rsrc/revision.h` +else + revision=0 +fi +case "$revision" in +0) echo "(You have $package $baserev PL$patchlevel.)" ;; +*) + case "$patchlevel" in + 0) echo "(You have $package $baserev-$revision)";; + *) echo "(You have $package $baserev-$revision PL$patchlevel)";; + esac + ;; +esac : determine perl absolute location case "$perlpath" in @@ -4474,6 +4506,7 @@ prefix='$prefix' prefixexp='$prefixexp' privlib='$privlib' privlibexp='$privlibexp' +revision='$revision' rm='$rm' rmail='$rmail' run='$run' @@ -4520,6 +4553,8 @@ EOT : add special variables $test -f $src/patchlevel.h && \ awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh +$test -f $src/revision.h && \ +awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/revision.h >>config.sh echo "CONFIG=true" >>config.sh : propagate old symbols @@ -31,3 +31,9 @@ AddedByConfigure(install) InstallManPage(dist,$(MANSRC)) +all:: revision.h + +.FORCE: + +revision.h: .FORCE + $(TOP)/bin/svn-revision $(TOP) $@ @@ -18,6 +18,7 @@ bin/manilist.man Manual page for manilist bin/packinit.SH Creates a .package file describing your package bin/packinit.man Manual page for packinit bin/perload Build dynamically loaded perl scripts +bin/svn-revision Updates the top "revision.h" file if needed dist.man Introduction to dist install.SH Installation script with a BSD-like syntax jmake/ Where makefile generator is stored @@ -612,3 +613,4 @@ pl/rcsargs.pl Perl library to expand rcs filename lists pl/snapshot.pl Perl library to parse RCS snapshot file pl/tilde.pl Perl library to perform ~name expansion pl/users.pl Perl library to parse users file +revision.h The current SVN revision number for dist diff --git a/Makefile.SH b/Makefile.SH index 725cf8c..29cd11c 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -1,4 +1,4 @@ -: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0] +: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-17] : $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $ case $CONFIG in @@ -56,7 +56,7 @@ SUBDIRS = bin mcon jmake pat kit lib $spitshell >>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files -# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $ +# $X-Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $ ######################################################################## # Start of Jmakefile @@ -104,6 +104,13 @@ local_install.man:: dist.man local_deinstall.man:: $(RM) $(INSTALL_PREFIX)$(MANSRC)/dist.$(L) +all:: revision.h + +.FORCE: + +revision.h: .FORCE + $(TOP)/bin/svn-revision $(TOP) $@ + ######################################################################## # Common rules for all Makefiles -- do not edit diff --git a/jmake/fixcpp.SH b/jmake/fixcpp.SH index 4bbc69b..f3e8db5 100755 --- a/jmake/fixcpp.SH +++ b/jmake/fixcpp.SH @@ -55,6 +55,7 @@ $startperl \$cpp = '$cpp_trad'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; +\$revision = '$REVISION'; !GROK!THIS! $spitshell >>fixcpp <<'!NO!SUBS!' diff --git a/jmake/jmake.SH b/jmake/jmake.SH index bdb5de7..b6d1277 100755 --- a/jmake/jmake.SH +++ b/jmake/jmake.SH @@ -71,6 +71,7 @@ $startperl \$cpp = '$cpp'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; +\$revision = '$REVISION'; !GROK!THIS! $spitshell >>jmake <<'!NO!SUBS!' @@ -305,7 +306,7 @@ line: for ($i = 0; $i <= $#makefile; $i++) { # Process regular line to be generated in Makefile.SH - s/<TAG>/[jmake $version PL$patchlevel]/; + s/<TAG>/[jmake $version-$revision]/; # Lines starting with ?SYMBOL: (resp. %SYMBOL:) are to be processed # only if SYMBOL is defined (resp. undefined). diff --git a/mcon/U/Head.U b/mcon/U/Head.U index bb1464b..7667c8a 100644 --- a/mcon/U/Head.U +++ b/mcon/U/Head.U @@ -88,7 +88,7 @@ # $Id$ # -# Generated on <DATE> [metaconfig <VERSION> PL<PATCHLEVEL>] +# Generated on <DATE> [metaconfig <VERSION>-<REVISION>] cat >c1$$ <<EOF ARGGGHHHH!!!!! diff --git a/mcon/U/Oldsym.U b/mcon/U/Oldsym.U index 8b11133..816a6f9 100644 --- a/mcon/U/Oldsym.U +++ b/mcon/U/Oldsym.U @@ -28,6 +28,8 @@ : add special variables $test -f $src/patchlevel.h && \ awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh +$test -f $src/revision.h && \ +awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/revision.h >>config.sh echo "CONFIG=true" >>config.sh : propagate old symbols diff --git a/mcon/U/Options.U b/mcon/U/Options.U index a38f565..0508d27 100644 --- a/mcon/U/Options.U +++ b/mcon/U/Options.U @@ -275,7 +275,7 @@ while test $# -gt 0; do esac shift ;; - -V) echo "$me generated by metaconfig <VERSION> PL<PATCHLEVEL>." >&2 + -V) echo "$me generated by metaconfig <VERSION>-<REVISION>." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; diff --git a/mcon/U/patchlevel.U b/mcon/U/patchlevel.U index 459f87f..18a3f98 100644 --- a/mcon/U/patchlevel.U +++ b/mcon/U/patchlevel.U @@ -15,15 +15,20 @@ ?RCS: Revision 3.0 1993/08/18 12:09:31 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?MAKE:patchlevel: package baserev test rsrc +?MAKE:patchlevel revision: package baserev test rsrc ?MAKE: -pick add $@ %< ?S:patchlevel: ?S: The patchlevel level of this package. ?S: The value of patchlevel comes from the patchlevel.h file. ?S:. -: get the patchlevel +?S:revision: +?S: The revision / build of this package. +?S: The value is derived from the REVISION define in the revision.h file. +?S: When revision is defined, the patch level should be ignored if 0. +?S:. +: get the patchlevel / revision echo " " -echo "Getting the current patchlevel..." >&4 +echo "Getting the current patchlevel / revision..." >&4 if $test -r $rsrc/patchlevel.h;then patchlevel=`awk \ '/^#[ ]*define[ ][ ]*PATCHLEVEL/ {print $3}' \ @@ -31,5 +36,20 @@ if $test -r $rsrc/patchlevel.h;then else patchlevel=0 fi -echo "(You have $package $baserev PL$patchlevel.)" +if $test -r $rsrc/revision.h;then + revision=`awk \ + '/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \ + < $rsrc/revision.h` +else + revision=0 +fi +case "$revision" in +0) echo "(You have $package $baserev PL$patchlevel.)" ;; +*) + case "$patchlevel" in + 0) echo "(You have $package $baserev-$revision)";; + *) echo "(You have $package $baserev-$revision PL$patchlevel)";; + esac + ;; +esac diff --git a/mcon/man/mconfig.SH b/mcon/man/mconfig.SH index 44a6ae5..1275b75 100755 --- a/mcon/man/mconfig.SH +++ b/mcon/man/mconfig.SH @@ -1455,7 +1455,11 @@ your \fI.package\fR. The name of the package, as derived from your \fI.package\fR file. .TP <PATCHLEVEL> -The patch level of the \fImetaconfig\fR program. +The patch level of the \fImetaconfig\fR program (deprecated in favor +of <REVISION>). +.TP +<REVISION> +The SVN revision level of the \fImetaconfig\fR program. .TP <VERSION> The version number of the \fImetaconfig\fR program. diff --git a/mcon/mconfig.SH b/mcon/mconfig.SH index adcf0a2..94ade5f 100755 --- a/mcon/mconfig.SH +++ b/mcon/mconfig.SH @@ -58,6 +58,7 @@ $startperl \$MC = '$privlib'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; +\$revision = '$REVISION'; \$grep = '$grep'; !GROK!THIS! @@ -78,7 +79,7 @@ chdir $WD || die "Can't chdir back to $WD: $!\n"; ++$opt_M if -f 'confmagic.h'; # Force -M if confmagic.h already there if ($opt_V) { - print STDERR "metaconfig $version PL$patchlevel\n"; + print STDERR "metaconfig $version-$revision\n"; exit 0; } elsif ($opt_h) { &usage; diff --git a/mcon/mlint.SH b/mcon/mlint.SH index 62d4021..9e0cbf6 100755 --- a/mcon/mlint.SH +++ b/mcon/mlint.SH @@ -51,6 +51,7 @@ $startperl \$MC = '$privlib'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; +\$revision = '$REVISION'; \$grep = '$grep'; !GROK!THIS! @@ -60,7 +61,7 @@ require 'getopts.pl'; &usage unless &Getopts("hklVL:"); if ($opt_V) { - print STDERR "metalint $version PL$patchlevel\n"; + print STDERR "metalint $version-$revision\n"; exit 0; } elsif ($opt_h) { &usage; diff --git a/mcon/mxref.SH b/mcon/mxref.SH index 51ea87f..b6d8dcb 100755 --- a/mcon/mxref.SH +++ b/mcon/mxref.SH @@ -51,6 +51,7 @@ $startperl \$MC = '$privlib'; \$version = '$VERSION'; \$patchlevel = '$PATCHLEVEL'; +\$revision = '$REVISION'; \$grep = '$grep'; !GROK!THIS! @@ -68,7 +69,7 @@ chop($MC = `pwd`); # Real metaxref lib path (no symbolic links) chdir $WD || die "Can't chdir back to $WD: $!\n"; if ($opt_V) { - print STDERR "metaxref $version PL$patchlevel\n"; + print STDERR "metaxref $version-$revision\n"; exit 0; } elsif ($opt_h) { &usage; diff --git a/mcon/pl/configure.pl b/mcon/pl/configure.pl index f78925f..a5aed29 100644 --- a/mcon/pl/configure.pl +++ b/mcon/pl/configure.pl @@ -110,7 +110,9 @@ sub process_command { s/<PACKAGENAME>/$package/g; s/<MAINTLOC>/$maintloc/g; s/<VERSION>/$version/g; # This is metaconfig's version - s/<PATCHLEVEL>/$patchlevel/g; # And patchlevel information + s/<REVISION>/$revision/g; # And revision information + warn "\"$file\": usage of <PATCHLEVEL> is deprecated\n" + if s/<PATCHLEVEL>/$patchlevel/g; s/<DATE>/$date/g; s/<BASEREV>/$baserev/g; s/<\$(\w+)>/eval("\$$1")/ge; # <$var> -> $var substitution diff --git a/mcon/pl/lint.pl b/mcon/pl/lint.pl index ba5c407..c790011 100644 --- a/mcon/pl/lint.pl +++ b/mcon/pl/lint.pl @@ -115,6 +115,7 @@ sub init_extraction { MAINTLOC VERSION PATCHLEVEL + REVISION DATE BASEREV ); |