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/mlint.SH | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100755 mcon/mlint.SH (limited to 'mcon/mlint.SH') diff --git a/mcon/mlint.SH b/mcon/mlint.SH new file mode 100755 index 0000000..7f1f550 --- /dev/null +++ b/mcon/mlint.SH @@ -0,0 +1,136 @@ +case $CONFIG in +'') + if test -f config.sh; then TOP=.; + elif test -f ../config.sh; then TOP=..; + elif test -f ../../config.sh; then TOP=../..; + elif test -f ../../../config.sh; then TOP=../../..; + elif test -f ../../../../config.sh; then TOP=../../../..; + else + echo "Can't find config.sh."; exit 1 + fi + . $TOP/config.sh + ;; +esac +case "$0" in +*/*) cd `expr X$0 : 'X\(.*\)/'` ;; +esac +echo "Extracting mcon/mlint (with variable substitutions)" +cat >mlint < +# +# $Log: mlint.SH,v $ +# Revision 3.0.1.3 1994/05/06 15:20:42 ram +# patch23: added -L switch to override public unit repository path +# +# Revision 3.0.1.2 1994/01/24 14:21:00 ram +# patch16: added ~/.dist_profile awareness +# +# Revision 3.0.1.1 1993/08/19 06:42:27 ram +# patch1: leading config.sh searching was not aborting properly +# +# Revision 3.0 1993/08/18 12:10:17 ram +# Baseline for dist 3.0 netwide release. +# + +# Perload ON + +\$MC = '$privlib'; +\$version = '$VERSION'; +\$patchlevel = '$PATCHLEVEL'; +\$grep = '$grep'; +!GROK!THIS! + +$spitshell >>mlint <<'!NO!SUBS!' +&profile; # Read ~/.dist_profile +require 'getopts.pl'; +&usage unless &Getopts("hklVL:"); + +if ($opt_V) { + print STDERR "metalint $version PL$patchlevel\n"; + exit 0; +} elsif ($opt_h) { + &usage; +} + +chop($date = `date`); +$MC = $opt_L if $opt_L; # May override library path +$MC = &tilda_expand($MC); # ~name expansion +chop($WD = `pwd`); # Working directory +chdir $MC || die "Can't chdir to $MC: $!\n"; +chop($MC = `pwd`); # Real metalint lib path (no symbolic links) +chdir $WD || die "Can't chdir back to $WD: $!\n"; + +&init; # Various initializations +`mkdir .MT 2>&1` unless -d '.MT'; # For private temporary files + +&locate_units; # Fill in @ARGV with a unit list +&extract_dependencies; # Extract dependencies from units +&sanity_checks; # Perform sanity checks + +if ($opt_k) { + print "Leaving subdirectory .MT unremoved so you can peruse it.\n" + unless $opt_s; +} else { + `rm -rf .MT 2>&1`; +} +print "Done.\n" unless $opt_s; + +# General initializations +sub init { + &init_except; # Token which have upper-cased letters + &init_depend; # The %Depend array records control line handling +} + +# Record the exceptions -- all symbols but these are lower case +sub init_except { + $Except{'Author'}++; + $Except{'Date'}++; + $Except{'Header'}++; + $Except{'Id'}++; + $Except{'Locker'}++; + $Except{'Log'}++; + $Except{'RCSfile'}++; + $Except{'Revision'}++; + $Except{'Source'}++; + $Except{'State'}++; +} + +# Print out metalint's usage and exits +sub usage { + print STDERR <>mlint +$grep -v '^;#' pl/lint.pl >>mlint +$grep -v '^;#' pl/init.pl >>mlint +$grep -v '^;#' pl/extract.pl >>mlint +$grep -v '^;#' pl/obsolete.pl >>mlint +$grep -v '^;#' pl/tsort.pl >>mlint +$grep -v '^;#' ../pl/tilde.pl >>mlint +$grep -v '^;#' ../pl/profile.pl >>mlint +chmod +x mlint +$eunicefix mlint -- cgit v1.2.3 From a2f5d6f1d076aa5bebcb4f897b746b2658895cb0 Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Wed, 28 May 2008 08:01:59 +0000 Subject: Perl 5.10 no longer supports "$*" anywhere... even in the initial exec line meant to be parsed by the shell... git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@22 190e5f8e-a817-0410-acf6-e9863daed9af --- mcon/mlint.SH | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mcon/mlint.SH') diff --git a/mcon/mlint.SH b/mcon/mlint.SH index 7f1f550..62d4021 100755 --- a/mcon/mlint.SH +++ b/mcon/mlint.SH @@ -17,7 +17,7 @@ esac echo "Extracting mcon/mlint (with variable substitutions)" cat >mlint < Date: Wed, 28 May 2008 11:19:25 +0000 Subject: SVN revision number is now automatically generated in "revision.h". The old patchlevel information is no longer used, and is deprecated in unit files, replaced by . git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@25 190e5f8e-a817-0410-acf6-e9863daed9af --- mcon/mlint.SH | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mcon/mlint.SH') 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; -- cgit v1.2.3