From 8bfc5756fb68e0b13d7e7c0073ad5b9a4790d1b6 Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Thu, 24 Aug 2006 12:32:52 +0000 Subject: Moving project to sourceforge. git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@1 190e5f8e-a817-0410-acf6-e9863daed9af --- mcon/U/Oldsym.U | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 mcon/U/Oldsym.U (limited to 'mcon/U/Oldsym.U') diff --git a/mcon/U/Oldsym.U b/mcon/U/Oldsym.U new file mode 100644 index 0000000..8b11133 --- /dev/null +++ b/mcon/U/Oldsym.U @@ -0,0 +1,66 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?RCS: $Log: Oldsym.U,v $ +?RCS: Revision 3.0.1.1 1997/02/28 15:06:58 ram +?RCS: patch61: added support for src.U +?RCS: +?RCS: Revision 3.0 1993/08/18 12:05:13 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?X: +?X: This unit follows the creation of the config.sh file. It adds some +?X: special symbols: defines from patchlevel.h file if any and CONFIG, +?X: which is set to true. Then, we try to keep all the new symbols that +?X: may come from a hint file or a previous config.sh file. +?X: +?MAKE:Oldsym: Config_sh Options test hint src sed sort uniq +?MAKE: -pick add $@ %< +?T:CONFIG sym tmp +?F:!UU +: add special variables +$test -f $src/patchlevel.h && \ +awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh +echo "CONFIG=true" >>config.sh + +: propagate old symbols +if $test -f UU/config.sh; then +?X: Make sure each symbol is unique in oldconfig.sh + UU/oldconfig.sh +?X: +?X: All the symbols that appear twice come only from config.sh (hence the +?X: two config.sh in the command line). These symbols will be removed by +?X: the uniq -u command. The oldsyms file thus contains all the symbols +?X: that did not appear in the produced config.sh (Larry Wall). +?X: +?X: Do not touch the -u flag of uniq. This means you too, Jarkko. +?X: + $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \ + config.sh config.sh UU/oldconfig.sh |\ + $sort | $uniq -u >UU/oldsyms + set X `cat UU/oldsyms` + shift + case $# in + 0) ;; + *) + cat <>config.sh + for sym in `cat UU/oldsyms`; do + echo " Propagating $hint variable "'$'"$sym..." + eval 'tmp="$'"${sym}"'"' + echo "$tmp" | \ + sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh + done + ;; + esac +fi + -- cgit v1.2.3