From a611922a73d9826f49718a8c4ebcd0fa9a4dfb67 Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Sat, 14 Jun 2008 20:48:34 +0000 Subject: Panic if a routine is defined more than once. git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@26 190e5f8e-a817-0410-acf6-e9863daed9af --- bin/perload | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/perload b/bin/perload index e71cbdd..a0ed31c 100755 --- a/bin/perload +++ b/bin/perload @@ -117,6 +117,8 @@ while (<>) { $fn_package = $current_package; $fn_basename = $function; } + die "line $.: duplicate routine ${fn_package}::$fn_basename\n" + if $Seen{"${fn_package}::$fn_basename"}++; # Keep leading function comment foreach (@Comment) { push(@Data, $_) unless $autoload; -- cgit v1.2.3 From 79fab6248ca41f49afd4ece6b23a48b4d873352a Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Sat, 14 Jun 2008 20:50:12 +0000 Subject: Make sure Instruct depends on Begin to move Begin ahead of any question asked by Configure. git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@27 190e5f8e-a817-0410-acf6-e9863daed9af --- Configure | 6 +++--- Makefile.SH | 2 +- mcon/U/Instruct.U | 2 +- revision.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Configure b/Configure index 1fb9e5f..cd1dd35 100755 --- a/Configure +++ b/Configure @@ -16,9 +16,9 @@ # The dist package (which contains metaconfig) is available via SVN: # svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist -# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $ +# $Id: Head.U 25 2008-05-28 11:19:25Z rmanfredi $ # -# Generated on Wed May 28 13:11:20 CEST 2008 [metaconfig 3.5-17] +# Generated on Wed May 28 13:22:26 CEST 2008 [metaconfig 3.5-25] cat >c1$$ <&2 + -V) echo "$me generated by metaconfig 3.5-25." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; diff --git a/Makefile.SH b/Makefile.SH index 29cd11c..4915130 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -61,7 +61,7 @@ $spitshell >>Makefile <<'!NO!SUBS!' ######################################################################## # Start of Jmakefile -# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $ +# $X-Id: Jmakefile 25 2008-05-28 11:19:25Z rmanfredi $ # # Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi # diff --git a/mcon/U/Instruct.U b/mcon/U/Instruct.U index deccaf8..37d8afe 100644 --- a/mcon/U/Instruct.U +++ b/mcon/U/Instruct.U @@ -27,7 +27,7 @@ ?X: isn't going to go shooting off the top of the screen, and we don't want ?X: to panic them yet. ?X: -?MAKE:Instruct: Myread Configdir contains +?MAKE:Instruct: Begin Myread Configdir contains ?MAKE: -pick wipe $@ %< ?T:user needman firsttime : general instructions diff --git a/revision.h b/revision.h index 20f4e73..cab2847 100644 --- a/revision.h +++ b/revision.h @@ -1,7 +1,7 @@ /* - * THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT ME + * THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT * * Generated by ./bin/svn-revision. */ -#define REVISION 17 +#define REVISION 25 -- cgit v1.2.3 From af7bc4ecc072dbf42b75d4a7e8ecef0e98b26753 Mon Sep 17 00:00:00 2001 From: cbiere Date: Mon, 16 Jun 2008 18:04:21 +0000 Subject: * Use the preprocessor output to detect the GCC version instead of executing the compiled binary which is unsuitable for cross-compiling. git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@28 190e5f8e-a817-0410-acf6-e9863daed9af --- mcon/U/gccvers.U | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/mcon/U/gccvers.U b/mcon/U/gccvers.U index b7b42fa..6d05184 100644 --- a/mcon/U/gccvers.U +++ b/mcon/U/gccvers.U @@ -11,7 +11,7 @@ ?RCS: Copyright (c) 2000, Jarkko Hietaniemi ?RCS: ?MAKE:gccversion gccosandvers: cat cpp rm +cc \ - Myread Guess Options Oldconfig Loc osname osvers grep run ccname + Myread Guess Options Oldconfig Loc osname osvers grep ccname ?MAKE: -pick add $@ %< ?S:gccversion: ?S: If GNU cc (gcc) is used, this variable holds '1' or '3' (for instance) @@ -31,20 +31,21 @@ echo " " echo "Checking for GNU cc in disguise and/or its version number..." >&4 $cat >try.c < -int main() { +int main(void) { #ifdef __GNUC__ -#ifdef __VERSION__ - printf("%s\n", __VERSION__); -#else - printf("%s\n", "1"); +gcc_version_major __GNUC__ +#ifdef __GNUC_MINOR__ +gcc_version_minor __GNUC__ +#endif +#ifdef __GNUC_PATCHLEVEL__ +gcc_version_patchlevel __GNUC_PATCHLEVEL__ #endif #endif - exit(0); } EOM -if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then - gccversion=`$run ./try` +if $cc -E try.c > try 2>&1 +then + gccversion=`sed -n 's/^gcc_version_major[^0-9]*//p' try` case "$gccversion" in '') echo "You are not using GNU cc." ;; *) echo "You are using GNU cc $gccversion." @@ -52,16 +53,7 @@ if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then ;; esac else - echo " " - echo "*** WHOA THERE!!! ***" >&4 - echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4 -?X: using -K will prevent aborting--maybe they're cross compiling? - case "$knowitall" in - '') - echo " You'd better start hunting for one and let me know about it." >&4 - exit 1 - ;; - esac + gccversion='' fi $rm -f try try.* case "$gccversion" in -- cgit v1.2.3 From e9b2c62292c460d7b8561931d051fe34e2240061 Mon Sep 17 00:00:00 2001 From: cbiere Date: Mon, 16 Jun 2008 18:11:00 +0000 Subject: * Append $ccflags so that it can override the defaults assuming the compiler picks the last choice as GCC does. git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@29 190e5f8e-a817-0410-acf6-e9863daed9af --- mcon/U/ccflags.U | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcon/U/ccflags.U b/mcon/U/ccflags.U index 0deb0c3..b00a557 100644 --- a/mcon/U/ccflags.U +++ b/mcon/U/ccflags.U @@ -197,7 +197,7 @@ else fi case "$hint" in -default|recommended) dflt="$ccflags $dflt" ;; +default|recommended) dflt="$dflt $ccflags" ;; *) dflt="$ccflags";; esac -- cgit v1.2.3