From 94831e424ef8bb500cb1486bbe0b7f8bce41dc42 Mon Sep 17 00:00:00 2001 From: Dominic Hargreaves Date: Mon, 21 May 2018 11:03:56 +0200 Subject: Fix some syntax errors (#16) This fixes syntax errors in makedist, patbase, patcil, patclean, patcol, patdiff, patname, and patsnap. --- bin/manilist.SH | 2 +- kit/makedist.SH | 12 ++++++------ pl/makedir.pl | 2 +- pl/rcsargs.pl | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/manilist.SH b/bin/manilist.SH index 85c7b21..2e7ebf4 100755 --- a/bin/manilist.SH +++ b/bin/manilist.SH @@ -213,7 +213,7 @@ if ($opt_d) { } @manifest = sort @manifest; -@files = sort @files if defined(@files); +@files = sort @files if @files; # Build up the %manifest array so that we quickly know whether a file is in the # manifest or not. diff --git a/kit/makedist.SH b/kit/makedist.SH index f40d5c5..ccc9566 100755 --- a/kit/makedist.SH +++ b/kit/makedist.SH @@ -114,7 +114,7 @@ sub kitbuild { $list = $list[$kitnum]; $kit = sprintf("$package.kit" . $sp,$kitnum); print "*** Making $kit ***\n"; - open(KIT,">$curdir/$kit") || do fatal("Can't create $curdir/$kit: $!"); + open(KIT,">$curdir/$kit") || &fatal("Can't create $curdir/$kit: $!"); &kitleader; @@ -202,7 +202,7 @@ sub kitlists { } # Build a file PACKNOTES to reconstruct split files - if (defined %Chopped) { + if (%Chopped) { open(PACKNOTES, ">$PACKNOTES") || &fatal("Can't create PACKNOTES: $!"); foreach (keys %Chopped) { print PACKNOTES <) { ($key,$val) = split(' ',$_,1) unless ($key,$val) = /^(\S+)\s+(.*)/; $comment{$key} = $val; @@ -266,7 +266,7 @@ sub manimake { # Add built packlist $comment{$PACKLIST} = 'Which files came with which kits'; - open(PACKLIST, ">$PACKLIST") || do fatal("Can't create $PACKLIST: $!"); + open(PACKLIST, ">$PACKLIST") || &fatal("Can't create $PACKLIST: $!"); print PACKLIST "After all the $package kits are run you should have the following files: @@ -321,7 +321,7 @@ case \$todo in '') echo \"You have run all your kits.\" EOM - if (defined %Chopped) { # Some splitting occurred + if (%Chopped) { # Some splitting occurred print KIT <= 0 && do equiv($_,$_[0])) { + } elsif ($#_ >= 0 && &equiv($_,$_[0])) { $result .= $_ . ' ' . $_[0] . ' '; shift(@_); } else { - $result .= $_ . ' ' . do other($_) . ' '; + $result .= $_ . ' ' . &other($_) . ' '; } } $result; -- cgit v1.2.3 From 607d9bfd575f3cf99789042a232669951f24a562 Mon Sep 17 00:00:00 2001 From: Dominic Hargreaves Date: Mon, 21 May 2018 11:05:13 +0200 Subject: Fix man page comment schema (#17) The commenting scheme used in the man pages was three consecutive single quotes (`'''') at the beginning of a line. his works, but `gtroff' gives a warning about an undefined macro (namely `'''), which is harmless, but irritating. To avoid this, this commit changes the schema to start the line with `.\"' which causes the line to be treated as an undefined request and thus ignored completely. Signed-off-by: Manoj Srivastava [updated to current dist by Dominic Hargreaves ] --- bin/manicheck.man | 30 +++---- bin/manilist.man | 48 ++++++------ bin/packinit.man | 54 ++++++------- bin/perload | 6 +- dist.man | 68 ++++++++-------- jmake/jmake.man | 50 ++++++------ jmake/jmkmf.man | 34 ++++---- kit/kitpost.man | 34 ++++---- kit/kitsend.man | 34 ++++---- kit/makeSH.man | 30 +++---- kit/makedist.man | 52 ++++++------ kit/manifake.man | 34 ++++---- mcon/man/mconfig.SH | 222 ++++++++++++++++++++++++++-------------------------- mcon/man/mlint.SH | 96 +++++++++++------------ mcon/man/mxref.SH | 58 +++++++------- pat/pat.man | 90 ++++++++++----------- 16 files changed, 470 insertions(+), 470 deletions(-) diff --git a/bin/manicheck.man b/bin/manicheck.man index 35087c8..ba9fa2f 100644 --- a/bin/manicheck.man +++ b/bin/manicheck.man @@ -1,18 +1,18 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: manicheck.man,v $ -''' Revision 3.0 1993/08/18 12:04:02 ram -''' Baseline for dist 3.0 netwide release. -''' -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: manicheck.man,v $ +.\" Revision 3.0 1993/08/18 12:04:02 ram +.\" Baseline for dist 3.0 netwide release. +.\" +.\" .TH MANICHECK 1 ram .SH NAME manicheck \- check manifest accuracy diff --git a/bin/manilist.man b/bin/manilist.man index 59db7a5..1f60e3f 100644 --- a/bin/manilist.man +++ b/bin/manilist.man @@ -1,27 +1,27 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: manilist.man,v $ -''' Revision 3.0.1.3 1995/05/12 11:57:31 ram -''' patch54: updated my e-mail address -''' -''' Revision 3.0.1.2 1994/01/24 13:52:55 ram -''' patch16: typo fix -''' -''' Revision 3.0.1.1 1993/08/24 12:11:02 ram -''' patch3: typo fix -''' -''' Revision 3.0 1993/08/18 12:04:04 ram -''' Baseline for dist 3.0 netwide release. -''' -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: manilist.man,v $ +.\" Revision 3.0.1.3 1995/05/12 11:57:31 ram +.\" patch54: updated my e-mail address +.\" +.\" Revision 3.0.1.2 1994/01/24 13:52:55 ram +.\" patch16: typo fix +.\" +.\" Revision 3.0.1.1 1993/08/24 12:11:02 ram +.\" patch3: typo fix +.\" +.\" Revision 3.0 1993/08/18 12:04:04 ram +.\" Baseline for dist 3.0 netwide release. +.\" +.\" .TH MANILIST 1 ram .SH NAME manilist \- report status of files in a source directory diff --git a/bin/packinit.man b/bin/packinit.man index bc954f0..9756592 100644 --- a/bin/packinit.man +++ b/bin/packinit.man @@ -1,30 +1,30 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: packinit.man,v $ -''' Revision 3.0.1.4 1995/07/25 13:31:38 ram -''' patch56: fixed a typo -''' -''' Revision 3.0.1.3 1995/05/12 11:57:38 ram -''' patch54: updated my e-mail address -''' -''' Revision 3.0.1.2 1994/10/29 15:45:17 ram -''' patch36: added new variables cext, shext, changelog and changercs -''' -''' Revision 3.0.1.1 1994/01/24 13:54:31 ram -''' patch16: now documents variables set in .package by packinit -''' -''' Revision 3.0 1993/08/18 12:04:06 ram -''' Baseline for dist 3.0 netwide release. -''' -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: packinit.man,v $ +.\" Revision 3.0.1.4 1995/07/25 13:31:38 ram +.\" patch56: fixed a typo +.\" +.\" Revision 3.0.1.3 1995/05/12 11:57:38 ram +.\" patch54: updated my e-mail address +.\" +.\" Revision 3.0.1.2 1994/10/29 15:45:17 ram +.\" patch36: added new variables cext, shext, changelog and changercs +.\" +.\" Revision 3.0.1.1 1994/01/24 13:54:31 ram +.\" patch16: now documents variables set in .package by packinit +.\" +.\" Revision 3.0 1993/08/18 12:04:06 ram +.\" Baseline for dist 3.0 netwide release. +.\" +.\" .TH PACKINIT 1 ram .SH NAME packinit \- initialize or update your .package file diff --git a/bin/perload b/bin/perload index dbd2d97..14f94bf 100755 --- a/bin/perload +++ b/bin/perload @@ -478,9 +478,9 @@ sub q { .nr % 0 \" start at page 1 '; __END__ \" the perl compiler stops here -''' -''' From here on it's a standard manual page. -''' +.\" +.\" From here on it's a standard manual page. +.\" .TH PERLOAD 1 "June 20, 1992" .AT 3 diff --git a/dist.man b/dist.man index bfee179..5e5bfec 100644 --- a/dist.man +++ b/dist.man @@ -1,37 +1,37 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: dist.man,v $ -''' Revision 3.0.1.6 1995/05/12 11:57:53 ram -''' patch54: updated my e-mail address -''' -''' Revision 3.0.1.5 1994/10/29 15:46:03 ram -''' patch36: mentions new patlog script and ChangeLog file -''' -''' Revision 3.0.1.4 1994/05/06 13:54:17 ram -''' patch23: extended copyright notice to 1994 -''' patch23: new script kitpost -''' -''' Revision 3.0.1.3 1994/01/24 13:55:41 ram -''' patch16: documents profile and its components -''' -''' Revision 3.0.1.2 1993/11/10 17:31:03 ram -''' patch14: added mention for new confmagic.h file -''' -''' Revision 3.0.1.1 1993/08/24 12:12:00 ram -''' patch3: added entries for patnotify and patsnap -''' -''' Revision 3.0 1993/08/18 12:04:07 ram -''' Baseline for dist 3.0 netwide release. -''' -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: dist.man,v $ +.\" Revision 3.0.1.6 1995/05/12 11:57:53 ram +.\" patch54: updated my e-mail address +.\" +.\" Revision 3.0.1.5 1994/10/29 15:46:03 ram +.\" patch36: mentions new patlog script and ChangeLog file +.\" +.\" Revision 3.0.1.4 1994/05/06 13:54:17 ram +.\" patch23: extended copyright notice to 1994 +.\" patch23: new script kitpost +.\" +.\" Revision 3.0.1.3 1994/01/24 13:55:41 ram +.\" patch16: documents profile and its components +.\" +.\" Revision 3.0.1.2 1993/11/10 17:31:03 ram +.\" patch14: added mention for new confmagic.h file +.\" +.\" Revision 3.0.1.1 1993/08/24 12:12:00 ram +.\" patch3: added entries for patnotify and patsnap +.\" +.\" Revision 3.0 1993/08/18 12:04:07 ram +.\" Baseline for dist 3.0 netwide release. +.\" +.\" .de Ex \" Start of Example .sp .in +5 diff --git a/jmake/jmake.man b/jmake/jmake.man index 66b306d..3367289 100644 --- a/jmake/jmake.man +++ b/jmake/jmake.man @@ -1,28 +1,28 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: jmake.man,v $ -''' Revision 3.0.1.3 2004/08/22 09:01:55 ram -''' patch71: renamed |test as |case as the construct has its syntax -''' patch71: added |subst section to allow variable substitutions -''' -''' Revision 3.0.1.2 2004/08/21 23:19:52 ram -''' patch71: added '|shell' section to emit verbatim code in Makefile.SH -''' patch71: new '|test' to conditionally generate Makefile sections -''' -''' Revision 3.0.1.1 1995/05/12 11:57:58 ram -''' patch54: updated my e-mail address -''' -''' Revision 3.0 1993/08/18 12:04:18 ram -''' Baseline for dist 3.0 netwide release. -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: jmake.man,v $ +.\" Revision 3.0.1.3 2004/08/22 09:01:55 ram +.\" patch71: renamed |test as |case as the construct has its syntax +.\" patch71: added |subst section to allow variable substitutions +.\" +.\" Revision 3.0.1.2 2004/08/21 23:19:52 ram +.\" patch71: added '|shell' section to emit verbatim code in Makefile.SH +.\" patch71: new '|test' to conditionally generate Makefile sections +.\" +.\" Revision 3.0.1.1 1995/05/12 11:57:58 ram +.\" patch54: updated my e-mail address +.\" +.\" Revision 3.0 1993/08/18 12:04:18 ram +.\" Baseline for dist 3.0 netwide release. +.\" .TH JMAKE 1 ram .SH NAME jmake \- a generic makefile builder diff --git a/jmake/jmkmf.man b/jmake/jmkmf.man index dde89a1..c155f54 100644 --- a/jmake/jmkmf.man +++ b/jmake/jmkmf.man @@ -1,20 +1,20 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: jmkmf.man,v $ -''' Revision 3.0.1.1 1995/05/12 11:58:03 ram -''' patch54: updated my e-mail address -''' -''' Revision 3.0 1993/08/18 12:04:20 ram -''' Baseline for dist 3.0 netwide release. -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: jmkmf.man,v $ +.\" Revision 3.0.1.1 1995/05/12 11:58:03 ram +.\" patch54: updated my e-mail address +.\" +.\" Revision 3.0 1993/08/18 12:04:20 ram +.\" Baseline for dist 3.0 netwide release. +.\" .TH JMKMF 1 ram .SH NAME jmkmf \- runs jmake with the correct options diff --git a/kit/kitpost.man b/kit/kitpost.man index ec44edd..3455336 100644 --- a/kit/kitpost.man +++ b/kit/kitpost.man @@ -1,20 +1,20 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: kitpost.man,v $ -''' Revision 3.0.1.2 1995/05/12 11:58:09 ram -''' patch54: updated my e-mail address -''' -''' Revision 3.0.1.1 1994/05/06 13:55:01 ram -''' patch23: created -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: kitpost.man,v $ +.\" Revision 3.0.1.2 1995/05/12 11:58:09 ram +.\" patch54: updated my e-mail address +.\" +.\" Revision 3.0.1.1 1994/05/06 13:55:01 ram +.\" patch23: created +.\" .TH KITSEND 1 ram .SH NAME kitpost \- posts distribution kits diff --git a/kit/kitsend.man b/kit/kitsend.man index ebe5459..f8ec79e 100644 --- a/kit/kitsend.man +++ b/kit/kitsend.man @@ -1,20 +1,20 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: kitsend.man,v $ -''' Revision 3.0.1.1 1994/05/06 14:00:11 ram -''' patch23: documented new -V and -h options -''' -''' Revision 3.0 1993/08/18 12:04:26 ram -''' Baseline for dist 3.0 netwide release. -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: kitsend.man,v $ +.\" Revision 3.0.1.1 1994/05/06 14:00:11 ram +.\" patch23: documented new -V and -h options +.\" +.\" Revision 3.0 1993/08/18 12:04:26 ram +.\" Baseline for dist 3.0 netwide release. +.\" .TH KITSEND 1 ram .SH NAME kitsend \- sends distribution kits diff --git a/kit/makeSH.man b/kit/makeSH.man index 30f462a..6693794 100644 --- a/kit/makeSH.man +++ b/kit/makeSH.man @@ -1,18 +1,18 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: makeSH.man,v $ -''' Revision 3.0 1993/08/18 12:04:27 ram -''' Baseline for dist 3.0 netwide release. -''' -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: makeSH.man,v $ +.\" Revision 3.0 1993/08/18 12:04:27 ram +.\" Baseline for dist 3.0 netwide release. +.\" +.\" .TH MAKESH 1 LOCAL .SH NAME makeSH \- a .SH script maker diff --git a/kit/makedist.man b/kit/makedist.man index 5c6b09d..280b42c 100644 --- a/kit/makedist.man +++ b/kit/makedist.man @@ -1,25 +1,25 @@ .rn '' }` -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: makedist.man,v $ -''' Revision 3.0.1.2 1995/05/12 11:58:16 ram -''' patch54: updated my e-mail address -''' -''' Revision 3.0.1.1 1994/05/06 14:00:50 ram -''' patch23: now mentions kitpost and kitsend -''' -''' Revision 3.0 1993/08/18 12:04:31 ram -''' Baseline for dist 3.0 netwide release. -''' -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: makedist.man,v $ +.\" Revision 3.0.1.2 1995/05/12 11:58:16 ram +.\" patch54: updated my e-mail address +.\" +.\" Revision 3.0.1.1 1994/05/06 14:00:50 ram +.\" patch23: now mentions kitpost and kitsend +.\" +.\" Revision 3.0 1993/08/18 12:04:31 ram +.\" Baseline for dist 3.0 netwide release. +.\" +.\" .de Sh .br .ne 5 @@ -31,11 +31,11 @@ .if t .sp .5v .if n .sp .. -''' -''' Set up \*(-- to give an unbreakable dash; -''' string Tr holds user defined translation string. -''' Bell System Logo is used as a dummy character. -''' +.\" +.\" Set up \*(-- to give an unbreakable dash; +.\" string Tr holds user defined translation string. +.\" Bell System Logo is used as a dummy character. +.\" .ie n \{\ .tr \(*W-\*(Tr .ds -- \(*W- diff --git a/kit/manifake.man b/kit/manifake.man index 8c76ba7..0b79d2e 100644 --- a/kit/manifake.man +++ b/kit/manifake.man @@ -1,20 +1,20 @@ -''' $Id$ -''' -''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -''' -''' You may redistribute only under the terms of the Artistic Licence, -''' as specified in the README file that comes with the distribution. -''' You may reuse parts of this distribution only within the terms of -''' that same Artistic Licence; a copy of which may be found at the root -''' of the source tree for dist 4.0. -''' -''' $Log: manifake.man,v $ -''' Revision 3.0.1.1 1995/05/12 11:58:21 ram -''' patch54: updated my e-mail address -''' -''' Revision 3.0 1993/08/18 12:04:33 ram -''' Baseline for dist 3.0 netwide release. -''' +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: manifake.man,v $ +.\" Revision 3.0.1.1 1995/05/12 11:58:21 ram +.\" patch54: updated my e-mail address +.\" +.\" Revision 3.0 1993/08/18 12:04:33 ram +.\" Baseline for dist 3.0 netwide release. +.\" .TH MANIFAKE 1 ram .SH NAME manifake \- creates a MANIFEST.new out of a MANIFEST file diff --git a/mcon/man/mconfig.SH b/mcon/man/mconfig.SH index e749330..2b176a5 100755 --- a/mcon/man/mconfig.SH +++ b/mcon/man/mconfig.SH @@ -18,88 +18,88 @@ echo "Extracting mcon/man/metaconfig.$manext (with variable substitutions)" $rm -f metaconfig.$manext $spitshell >metaconfig.$manext < macro substitution -''' -''' Revision 3.0.1.5 1993/10/16 13:51:50 ram -''' patch12: new option -M to activate ?M: lines -''' patch12: documents new ?M: lines format -''' patch12: new internal Makefile command cm_h_weed for ?M: support -''' patch12: documents usage for new confmagic.h file -''' -''' Revision 3.0.1.4 1993/09/09 11:50:35 ram -''' patch9: lots of typo fixes and abusive variable substitution problems -''' -''' Revision 3.0.1.3 1993/08/30 08:53:51 ram -''' patch8: wrongly stated that patchlevel.h should not be part of MANIFEST.new -''' -''' Revision 3.0.1.2 1993/08/24 12:13:32 ram -''' patch3: typo fixes -''' -''' Revision 3.0.1.1 1993/08/19 06:42:23 ram -''' patch1: leading config.sh searching was not aborting properly -''' -''' Revision 3.0 1993/08/18 12:10:14 ram -''' Baseline for dist 3.0 netwide release. -''' -''' +.\" @(#) Manual page for metaconfig +.\" +.\" $Id$ +.\" +.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +.\" +.\" You may redistribute only under the terms of the Artistic Licence, +.\" as specified in the README file that comes with the distribution. +.\" You may reuse parts of this distribution only within the terms of +.\" that same Artistic Licence; a copy of which may be found at the root +.\" of the source tree for dist 4.0. +.\" +.\" $Log: mconfig.SH,v $ +.\" Revision 3.0.1.17 1997/02/28 16:29:31 ram +.\" patch61: documents the runnning environment and the src.U unit +.\" patch61: added warnings for $_a and $_o, as well as "startsh" +.\" +.\" Revision 3.0.1.16 1995/09/25 09:17:48 ram +.\" patch59: documented new ?Y: directive +.\" patch59: fixed my e-mail address +.\" +.\" Revision 3.0.1.15 1995/07/25 14:18:24 ram +.\" patch56: added extra nroff escapes at line heads to keep leading dots +.\" patch56: documented new -G option +.\" patch56: extended description of the Csym.U unit +.\" patch56: now mentions what a compile-link test line should look like +.\" +.\" Revision 3.0.1.14 1995/05/12 12:25:02 ram +.\" patch54: documented new -K switch for knowledgeable users +.\" +.\" Revision 3.0.1.13 1995/01/30 14:46:39 ram +.\" patch49: documented new special units Prefixit.U and Prefixup.U +.\" +.\" Revision 3.0.1.12 1995/01/11 15:39:16 ram +.\" patch45: documents new -O option and new Getfile escape supports +.\" patch45: documents the & escape in Myread and the new cc symbol lookup +.\" +.\" Revision 3.0.1.11 1994/10/29 16:32:38 ram +.\" patch36: added nroff protection for lines beginning with '.' +.\" patch36: documents new ?F: line for file declarations +.\" patch36: added example showing how ./loc can be used +.\" +.\" Revision 3.0.1.10 1994/08/29 16:33:40 ram +.\" patch32: documented new Typedef.U unit for typedef lookup +.\" +.\" Revision 3.0.1.9 1994/06/20 07:10:14 ram +.\" patch30: added -L option for easier unit testing +.\" patch30: new -D and -U options supported by Configure +.\" +.\" Revision 3.0.1.8 1994/05/13 15:29:16 ram +.\" patch27: now understands macro definitions in ?H: lines +.\" +.\" Revision 3.0.1.7 1994/05/06 15:19:25 ram +.\" patch23: documented the new 'p' option in Getfile.U +.\" +.\" Revision 3.0.1.6 1994/01/24 14:19:47 ram +.\" patch16: symbols defined in a unit can be tagged "internal use only" +.\" patch16: documents new MailList.U special unit +.\" patch16: new general <\$variable> macro substitution +.\" +.\" Revision 3.0.1.5 1993/10/16 13:51:50 ram +.\" patch12: new option -M to activate ?M: lines +.\" patch12: documents new ?M: lines format +.\" patch12: new internal Makefile command cm_h_weed for ?M: support +.\" patch12: documents usage for new confmagic.h file +.\" +.\" Revision 3.0.1.4 1993/09/09 11:50:35 ram +.\" patch9: lots of typo fixes and abusive variable substitution problems +.\" +.\" Revision 3.0.1.3 1993/08/30 08:53:51 ram +.\" patch8: wrongly stated that patchlevel.h should not be part of MANIFEST.new +.\" +.\" Revision 3.0.1.2 1993/08/24 12:13:32 ram +.\" patch3: typo fixes +.\" +.\" Revision 3.0.1.1 1993/08/19 06:42:23 ram +.\" patch1: leading config.sh searching was not aborting properly +.\" +.\" Revision 3.0 1993/08/18 12:10:14 ram +.\" Baseline for dist 3.0 netwide release. +.\" +.\" .de Ex \" Start of Example .sp .in +5 @@ -459,9 +459,9 @@ UU/* config.sh config.h .Ef -''' -''' O p t i o n s -''' +.\" +.\" O p t i o n s +.\" .SH OPTIONS The following options are recognized by \fImetaconfig\fR: .TP 15 @@ -541,14 +541,14 @@ The \fIfile\fR can contain blank lines, comment lines introduced with '#', and lines containing a single symbol. If this option is not supplied, any \fI$exclusions_file\fR variable in \fI.package\fR is honored instead. -''' -''' T u t o r i a l -''' +.\" +.\" T u t o r i a l +.\" .SH TUTORIAL This (long) section is an introduction to \fImetaconfig\fR, in which we will learn all the basics. If you already know how to use \fImetaconfig\fR, you may safely skip to the next section. -''' +.\" .SS Overview .PP Usually when you want to get some source package to compile on a given @@ -601,7 +601,7 @@ unit being responsible for defining a small number of shell and/or C symbols. Units are assembled together at the final stage, honoring the dependency graph (one unit may need the result of several other units which are then placed before in the script). -''' +.\" .SS Symbols .PP Symbols are the most important thing in the \fImetaconfig\fR world. They @@ -626,7 +626,7 @@ paragraph could sound. In a C file, you need to include the Configure-produced \fIconfig.h\fR file, and you must wrap your shell script or Makefile in a .SH file and you may reference the shell symbol only in the variable substitution part of that .SH file. More on this later. -''' +.\" .SS Source Files .PP Symbols may only appear in a limited set of source files, because @@ -644,7 +644,7 @@ substitutions apply. Actually, \fIconfig.h\fR is produced by running the \fImetaconfig\fR-produced \fIconfig_h.SH\fR file, again using variable substitution. So we're going to look at that a little more closely since this is the heart of the whole \fIconfiguration\fR scheme... -''' +.\" .SS Variable Substitution .PP There is shell construct called \fIhere document\fR which enables a @@ -685,7 +685,7 @@ echo \$\&tar .Ef The first here document has its content interpreted whilst the second one is output as-is. Both are useful in a .SH script, as we are about to see. -''' +.\" .SS Using .SH Scripts .PP A .SH script is usually produced by running the \fIMakeSH\fR script other @@ -824,7 +824,7 @@ stored as a 64 bits quantity, \fIconfig.sh\fR will set \fIintsize\fR to On this machine, the int type is 8 bytes .Ef which is correct. Congratulations! We have just configured a shell script!! -''' +.\" .SS Producing config.h .PP We can now have a look at the way \fIconfig.h\fR is produced out of @@ -978,7 +978,7 @@ configured C code, since \fImetaconfig\fR will know that you need those symbols and will generate a suitable \fIconfig_h.SH\fR file as well as all the necessary code in \fIConfigure\fR to compute a proper value for them (by assigning values to associated shell variables). -''' +.\" .SS Running Metaconfig .PP Let's focus on the \fImetaconfig\fR program for a while to understand how @@ -1039,7 +1039,7 @@ required are removed and a second Makefile is generated. This time, we know about all the units and their respective orders, optional units having been removed and default values computed for their shell symbols. The \fIConfigure\fR script can then be generated, along with \fIconfig_h.SH\fR. We're done. -''' +.\" .SS Conventions .PP Proper conventions needs to be followed to make the whole process sound. @@ -1069,7 +1069,7 @@ answer in \fI\$dflt\fR and places the user answer in \fI\$ans\fR. This is not documented in this manual page: you have to go and look at the unit itself to understand which variables are used and how the unit is to be used. -''' +.\" .SS Using The Glossary .PP The Glossary file is automatically produced by the \fImakegloss\fR script, @@ -1084,7 +1084,7 @@ about \fImetaconfig\fR to do so quickly and efficiently. However, never forget to properly document your work in the ?S: and ?C: lines, or other people will not be able to reuse it. Remember about the time where you had only the Glossary and this manual page to get started. -''' +.\" .SS Conclusion .PP Now that you know the \fImetaconfig\fR basics, you should read the @@ -1095,7 +1095,7 @@ commands you are allowed to use. .SH REFERENCE This section documents the internals of \fImetaconfig\fR, basically the unit syntax, the special units you should know about and the hint files. -''' +.\" .SS General Unit Syntax .PP A metaconfig unit is divided into two distinct parts. The header section @@ -1303,7 +1303,7 @@ hints that can be used. ?INIT:\fIinitialization code\fR The initialization code specified by this line will be loaded at the top of the \fIConfigure\fR script provided the unit is needed. -''' +.\" .SS C Symbol Aliasing .PP Sometimes it is not possible to rely on \fImetaconfig\fR's own default @@ -1383,7 +1383,7 @@ It simply tries to compile a sample C program using the \fIconst\fR keyword. If it can, then it will define \fI\$\&d_const\fR via the \fI\$\&setvar\fR fonction (defined by the \fISetvar.U\fR unit). See the paragraph about special units for more details. -''' +.\" .SS Make Commands .PP On the ?MAKE: command line, you may write a shell command to be executed as-is @@ -1448,7 +1448,7 @@ As a side note, \fImetaconfig\fR generates a \fI-cond\fR command internally to deal with conditional dependencies. You should not use it by yourself, but you will see it if scanning the generated \fIMakefile\fR in the \fI.MT\fR directory. -''' +.\" .SS Hardwired Macros .PP The following macros are recognized by the \fIwipe\fR command and subsituted @@ -1491,7 +1491,7 @@ which is replaced at Configure-generation time by the value of \fIvariable\fR taken from your \fI.package\fR file. Eventually, the old hardwired macro format will disappear, and <\$baserev> will replace in all the supplied units. -''' +.\" .SS Special Units .PP The following special units are used to factorize code and provide higher @@ -1781,7 +1781,7 @@ This unit produces the \fIwhoa\fR script, which emits a warning when the its old previous value held in \fI\$was\fR. Upon return, \fI\$td\fR and \fI\$tu\fR hold the proper value to \fIdefine\fR or \fIundef\fR the variable. See examples in \fIInlibc.U\fR. -''' +.\" .SS Builtin Pre-processor .PP Each unit to be included in \fIConfigure\fR is ran through a built-in @@ -1881,7 +1881,7 @@ done .Ef and have an extra loop trying two successive values for the \fIs_timezone\fR variable, but only if needed. -''' +.\" .SS Obsolete Symbols .PP Obsolete symbols are preserved to ease the transition with older @@ -1895,7 +1895,7 @@ The lifetime for obsolete symbols is one full revision, i.e. they will be removed when the next base revision is issued (patch upgrades do not count of course). Therefore, it is wise to translate your sources and start using the new symbols as soon as possible. -''' +.\" .SS Configure Hints .PP It may happen that the internal configuration logic makes the wrong choices. @@ -1945,7 +1945,7 @@ Note that you don't have to provide \fIall\fR the hints known by possible choice. The heuristic tests ran to compute the possible hint candidates are flaky. If you have new values or different tests, please send them to me... -''' +.\" .SS Overriding Choices .PP If you create a \fIconfig.over\fR file in the top level directory, @@ -1956,7 +1956,7 @@ you a chance to patch the values stored in there. This is distinct from the hints approach in that it is a local file, which the user is free to create for his own usage. You should not provide such a file yourself, but let the user know about this possibility. -''' +.\" .SS Configure Options .PP The \fIConfigure\fR script may be called with some options specified on the @@ -2028,7 +2028,7 @@ possible to use '\fB-U\fI symbol\fR' which will set \fIsymbol\fR to 'undef'. Print the version number of the \fImetaconfig\fR that generated this .I Configure script and exit. -''' +.\" .SS Running Environment Upon starting, \fIConfigure\fR creates a local \fIUU\fR directory and runs from there. The directory is removed when Configure ends, but this means @@ -2057,7 +2057,7 @@ When running \fIConfigure\fR remotely, the .SH files are extracted in the build directory, not in the source tree. However, it requires some kind of a \fImake\fR support to be able to compile things in a build directory whilst the sources lie elsewhere. -''' +.\" .SS Using Magic Redefinitions .PP By making use of the \fB\-M\fR switch, some magic remappings may take place @@ -2077,7 +2077,7 @@ on \fImemcpy()\fR if no \fIbcopy()\fR is available locally, or transform bother about the \fIHAS_VFORK\fR symbol. .PP This configuration magic is documented in the Glossary file. -''' +.\" .SS Unit Templates .PP There is a set of unit templates in the \fImetaconfig\fR source directory, diff --git a/mcon/man/mlint.SH b/mcon/man/mlint.SH index 8910b88..e2c7f4a 100755 --- a/mcon/man/mlint.SH +++ b/mcon/man/mlint.SH @@ -18,54 +18,54 @@ echo "Extracting mcon/man/metalint.$manext (with variable substitutions)" $rm -f metalint.$manext $spitshell >metalint.$manext <metaxref.$manext < Date: Mon, 21 May 2018 11:10:31 +0200 Subject: Removed obsolete parts. Fixes issue #15. --- README | 51 ++++----------------------------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/README b/README index 86f250a..8d71686 100644 --- a/README +++ b/README @@ -1,10 +1,10 @@ dist 4.0 - ** Alpha version ** Copyright (c) 1988, Larry Wall Copyright (c) 1990-1992, Harlan Stenn Copyright (c) 1991-1997, Raphael Manfredi Copyright (c) 2004-2006, Raphael Manfredi + Copyright (c) 2007+ Many other contributors ------------------------------------------------------------------------ This program is free software; you can redistribute it and/or modify @@ -18,15 +18,7 @@ ------------------------------------------------------------------------ This version of dist requires you to have at least perl 4.0 PL36. -It has also been ported to work with perl 5.0 PL0, provided you have -at least integrated patches 0a-0h, issued by Andy Dougherty and made -available at the following ftp sites: - - ftp.demon.co.uk:/pub/perl/db/perl5.000-p0a-p0h.tar.gz - ftp.funet.fi:/pub/languages/perl/ports/perl5/perl5.000-p0a-p0h.tar.gz - -Please read all the directions below before you proceed any further, and -then follow them carefully. +It has also been ported to work with modern perl 5. After you have unpacked your kit, you should have all the files listed in MANIFEST. @@ -48,31 +40,6 @@ use any of those, however, the directory containing your package (not this package) must be initialized by putting a .package file into it. This can be done by running packinit in that directory. -There is a mailing list hosted in Japan and set up by Shigeya Suzuki -, for discussion about the dist package as a -whole. It's a good place to ask questions (or answer them) and to -send your patches. I will post official patches to the net, as well -as to the dist-users list. - -To send a mail to the list, address it to . -To subscribe, send a mail to . If you don't -know how to use majordomo, the syntax of the subscribe command is: - - subscribe dist-users [address] - -where the address part is optional. You may unsubscribe automatically -at any time by sending: - - unsubscribe dist-users - -If you have a problem with this version of dist, it is recommended that -you subscribe to the list, then send a description of your problem to it. -If you send mail to me personally, I may not be able to answer in a -timely fashion. - -This mailing list has low traffic (a few articles per week, typically), -and it is expected to remain so, with a high signal/noise ratio. - Notes: If you are running on a system with <= 14 char filenames, don't @@ -119,20 +86,10 @@ clean up everything and let you re-distribute this kit, without carrying useless files. You should keep this distribution intact, so that future patches will be applyable. -7) I have an automatic patch sender. Send me the following mail: - - Subject: Command - @SH mailhelp PATH - -and you'll get instructions (PATH stands for YOUR e-mail address, either -in INTERNET or in bang notation). I would recommend you to get all the -issued patches before you start making some modifications on this -package. - -8) If you wish to deinstall the package, you may run "make deinstall". +7) If you wish to deinstall the package, you may run "make deinstall". A separate "make deinstall.man" will remove the manual pages. Be sure the makefiles are correctly set before running any deinstall target. On USG systems, some executable have a chance to remain despite the deinstall (text file busy...). - Raphael Manfredi + Raphael Manfredi -- cgit v1.2.3 From 7c4c3dd291c741e2a42c78efd77ffbd3a1c9c1c1 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Tue, 5 Jun 2018 14:28:56 +0200 Subject: 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. --- Configure | 47 ++++++++++++++++++++++++++++++++--------------- MANIFEST | 2 ++ U/Specific.U | 33 +++++++++++++++++++++++++++++++++ mcon/U/Finish.U | 2 +- mcon/U/Specific.U | 26 ++++++++++++++++++++++++++ mcon/man/mconfig.SH | 19 +++++++++++++++++++ 6 files changed, 113 insertions(+), 16 deletions(-) create mode 100644 U/Specific.U create mode 100644 mcon/U/Specific.U diff --git a/Configure b/Configure index 40a347d..ec3f64d 100755 --- a/Configure +++ b/Configure @@ -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$$ <&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 <>config.sh diff --git a/MANIFEST b/MANIFEST index f15caea..8b7a670 100644 --- a/MANIFEST +++ b/MANIFEST @@ -8,6 +8,7 @@ MANIFEST This list of files Makefile.SH A makefile to run subsidiary makefiles README Basic instructions Wishlist Features I would like to add +U/Specific.U Specific code for dist before .SH extraction bin/ Some binary tools bin/Jmakefile Generic makefile description for bin bin/Makefile.SH Jmake-generated configured makefile @@ -127,6 +128,7 @@ mcon/U/Rcs.U Some stupid redefinitions to keep RCS happy mcon/U/Sendfile64.U Is sendfile() working with the largefile flags? mcon/U/Setvar.U Set a variable with some sanity checks mcon/U/Signal.U Utilities for sig_name.U +mcon/U/Specific.U Hook for project-specific code before .SH extraction mcon/U/Tr.U Builds a tr script to handle lower and upper classes mcon/U/Trylink.U Compiles and links a test program mcon/U/Typedef.U Defines a typedef lookup function diff --git a/U/Specific.U b/U/Specific.U new file mode 100644 index 0000000..30babf8 --- /dev/null +++ b/U/Specific.U @@ -0,0 +1,33 @@ +?RCS: +?RCS: Copyright (c) 2018, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?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 License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?X: +?X: This unit is intended to be a project-specific hook. +?X: By default, it is therefore empty, meant to be copied to your private +?X: unit directory (U) and seasoned to taste. +?X: +?X: If you need specific code generation to happen once the configuration +?X: is finished and config.sh was generated, but before the extraction of +?X: the .SH files begins, then this is the place to put these special +?X: code that the .SH files will require to run properly. +?X: +?X: When this unit triggers, Configure is back to the top directory. +?X: +?MAKE:Specific: Config_sh +?MAKE: -pick add $@ %< +?T:file +?X: +?X: Keep the above ?MAKE: lines and then append your specific code here. +?X: +: project-specific code +file=revision.h +echo " " +echo "Generating $file..." >&4 +bin/svn-revision . $file + diff --git a/mcon/U/Finish.U b/mcon/U/Finish.U index cf5a364..51039c4 100644 --- a/mcon/U/Finish.U +++ b/mcon/U/Finish.U @@ -35,7 +35,7 @@ ?X: SH files, which among other things produce config.h and (usually) Makefile. ?X: It offers to do a make depend if the Makefile contains that target. ?X: -?MAKE:Finish: Chk_MANI Extract Myread Oldsym Magic_h cat rm contains \ +?MAKE:Finish: Chk_MANI Extract Specific Myread Oldsym Magic_h cat rm contains \ test package make ?MAKE: -pick add $@ %< ?F:!config.sh diff --git a/mcon/U/Specific.U b/mcon/U/Specific.U new file mode 100644 index 0000000..feb189b --- /dev/null +++ b/mcon/U/Specific.U @@ -0,0 +1,26 @@ +?RCS: +?RCS: Copyright (c) 2018, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?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 License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?X: +?X: This unit is intended to be a project-specific hook. +?X: By default, it is therefore empty, meant to be copied to your private +?X: unit directory (U) and seasoned to taste. +?X: +?X: If you need specific code generation to happen once the configuration +?X: is finished and config.sh was generated, but before the extraction of +?X: the .SH files begins, then this is the place to put these special +?X: code that the .SH files will require to run properly. +?X: +?X: When this unit triggers, Configure is back to the top directory. +?X: +?MAKE:Specific: Config_sh +?MAKE: -pick add $@ %< +?X: +?X: Keep the above ?MAKE: lines and then append your specific code here. +?X: diff --git a/mcon/man/mconfig.SH b/mcon/man/mconfig.SH index 2b176a5..9a33ceb 100755 --- a/mcon/man/mconfig.SH +++ b/mcon/man/mconfig.SH @@ -1742,6 +1742,25 @@ before prompting via \fIgetfile\fR for instance. If the prefix does not make use of ~name expanstion, then the above will be a no-op on the \fI$dflt\fR variable, naturally. .TP +Specific.U +This unit is empty by default. It is meant as a project-specific hook +to have shell code executed by \fIConfigure\fR after \fIconfig.sh\fR was +generated but before the extraction of .SH files. +.sp +Copy the unit to your project's \fIU/\fR directory and customize it. +.sp +Here is what the \fIdist\fR project uses it for (showing only the unit's code, +not the full unit here): +.Ex +: project-specific code +file=revision.h +echo " " +echo "Generating \$file..." >&4 +bin/svn-revision . \$file +.Ef +That shell code is executed when \fIConfigure\fR is back to the top directory +of the source tree. +.TP Typedef.U This unit produces the \fI\$typedef\fR shell variable, used internally by \fIConfigure\fR to check whether a typedef exists or not. A typical -- cgit v1.2.3 From ef5ee336fc90ba6ea4eb3bcadff4bc46d820ea26 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Tue, 5 Jun 2018 15:03:50 +0200 Subject: Added more "noise" to the .gitignore file. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 103f8de..9908014 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ .config/ +.package *.bak *.1 Makefile +Wanted bin/manicheck bin/manilist bin/packinit -- cgit v1.2.3 From 8e1f96af6f9d7f755ef551f6b422d856be37e41a Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Tue, 5 Jun 2018 15:23:33 +0200 Subject: Use new project public location, along with change from SVN to git. --- Configure | 6 +++--- mcon/U/Head.U | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Configure b/Configure index ec3f64d..bb80a47 100755 --- a/Configure +++ b/Configure @@ -18,7 +18,7 @@ # $Id$ # -# Generated on Tue Jun 5 14:21:57 CEST 2018 [metaconfig 3.5-239] +# Generated on Tue Jun 5 15:23:15 CEST 2018 [metaconfig 3.5-241] cat >c1$$ <&2 + -V) echo "$me generated by metaconfig 3.5-241." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; @@ -4630,7 +4630,7 @@ EOT : project-specific code file=revision.h echo " " -echo "Generating $file..." +echo "Generating $file..." >&4 bin/svn-revision . $file : add special variables diff --git a/mcon/U/Head.U b/mcon/U/Head.U index 933e489..0b8a98e 100644 --- a/mcon/U/Head.U +++ b/mcon/U/Head.U @@ -77,8 +77,8 @@ ?X: # Note: this Configure script was generated automatically. Rather than # working with this copy of Configure, you may wish to get metaconfig. -# The dist package (which contains metaconfig) is available via SVN: -# svn co https://svn.code.sf.net/p/dist/code/trunk/dist +# The dist package (which contains metaconfig) is available via git: +# git clone git@github.com:rmanfredi/dist.git ?X: ?X: NOTA BENE: ?X: If you develop you own version of metaconfig based on this work, -- cgit v1.2.3 From 9853b5011e23cc50e2e422b18a8c13eebfa7b7e7 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Tue, 5 Jun 2018 15:25:04 +0200 Subject: Regenerated Configure. --- Configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Configure b/Configure index bb80a47..9117a0f 100755 --- a/Configure +++ b/Configure @@ -13,12 +13,12 @@ # # Note: this Configure script was generated automatically. Rather than # working with this copy of Configure, you may wish to get metaconfig. -# The dist package (which contains metaconfig) is available via SVN: -# svn co https://svn.code.sf.net/p/dist/code/trunk/dist +# The dist package (which contains metaconfig) is available via git: +# git clone git@github.com:rmanfredi/dist.git # $Id$ # -# Generated on Tue Jun 5 15:23:15 CEST 2018 [metaconfig 3.5-241] +# Generated on Tue Jun 5 15:24:34 CEST 2018 [metaconfig 3.5-241] cat >c1$$ < Date: Sun, 18 Nov 2018 15:19:25 +0100 Subject: Added test for memrchr(). --- MANIFEST | 1 + mcon/U/d_memrchr.U | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 mcon/U/d_memrchr.U diff --git a/MANIFEST b/MANIFEST index 8b7a670..d4ea4f7 100644 --- a/MANIFEST +++ b/MANIFEST @@ -311,6 +311,7 @@ mcon/U/d_memcmp.U Do we have memcmp()? mcon/U/d_memcpy.U Do we have memcpy()? mcon/U/d_memmove.U Do we have memmove()? mcon/U/d_mempcpy.U Do we have mempcpy()? +mcon/U/d_memrchr.U Do we have memrchr()? mcon/U/d_memset.U Do we have memset()? mcon/U/d_mkdir.U Do we have mkdir()? mcon/U/d_mkfifo.U Do we have mkfifo()? diff --git a/mcon/U/d_memrchr.U b/mcon/U/d_memrchr.U new file mode 100644 index 0000000..c7b1c01 --- /dev/null +++ b/mcon/U/d_memrchr.U @@ -0,0 +1,40 @@ +?RCS: +?RCS: Copyright (c) 2018 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?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 License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_memrchr: Trylink cat +?MAKE: -pick add $@ %< +?S:d_memrchr: +?S: This variable conditionally defines the HAS_MEMRCHR symbol, which +?S: indicates to the C program that the memrchr() routine is available +?S: to scan a block of memory backwards for a character. +?S:. +?C:HAS_MEMRCHR: +?C: This symbol, if defined, indicates that the memrchr routine is available +?C: to scan a block of memory backwards for a character. +?C: If undefined, roll your own. +?C:. +?H:#$d_memrchr HAS_MEMRCHR /**/ +?H:. +?LINT:set d_memrchr +: see if memrchr exists +$cat >try.c < +int main(void) +{ + static char s[] = "xxx"; + static size_t n = sizeof(s); + void *p; + p = memrchr(s, 'x', n); + return p ? 0 : 1; +} +EOC +cyn=memrchr +set d_memrchr +eval $trylink + -- cgit v1.2.3 From 3e3a5f35940c277f3d82904be28de432b775be54 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Tue, 20 Nov 2018 15:10:06 +0100 Subject: Removed d_fast_assert.U. This is a private unit from gtk-gnutella that should not have been made available to metaconfig as it is not of general purpose. --- MANIFEST | 1 - mcon/U/d_fast_assert.U | 85 -------------------------------------------------- 2 files changed, 86 deletions(-) delete mode 100644 mcon/U/d_fast_assert.U diff --git a/MANIFEST b/MANIFEST index d4ea4f7..b04808d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -223,7 +223,6 @@ mcon/U/d_eofpipe.U Will EOF be seen on closed pipes? mcon/U/d_epoll.U Can we use epoll_xxx() routines? mcon/U/d_etext_symbol.U Whether linker defines the "etext" symbol mcon/U/d_euc2jis.U Do we have euc2jis()? -mcon/U/d_fast_assert.U Can we use fast assertions? mcon/U/d_fchdir.U Do we have fchdir()? mcon/U/d_fchmod.U Do we have fchmod()? mcon/U/d_fchown.U Do we have fchown()? diff --git a/mcon/U/d_fast_assert.U b/mcon/U/d_fast_assert.U deleted file mode 100644 index dba5132..0000000 --- a/mcon/U/d_fast_assert.U +++ /dev/null @@ -1,85 +0,0 @@ -?RCS: $Id$ -?RCS: -?RCS: Copyright (c) 2006, Christian Biere -?RCS: -?RCS: You may redistribute only under the terms of the Artistic License, -?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 License; a copy of which may be found at the root -?RCS: of the source tree for dist 4.0. -?RCS: -?MAKE:d_fast_assert: Myread Setvar cat gccversion spackage \ - sed +ccflags +cc +ldflags +optimize -?MAKE: -pick add $@ %< -?S:d_fast_assert: -?S: This variable conditionally defines FAST_ASSERTIONS. -?S:. -?C:FAST_ASSERTIONS: -?C: This symbol, when defined, indicates that the program should make -?C: use of its own asserting and failure reporting code, instead of -?C: the one from GLib. -?C:. -?H:#$d_fast_assert FAST_ASSERTIONS /**/ -?H:. -?F:!try.c !try -?LINT:set d_fast_assert -?LINT:change ccflags -: determine whether to enable fast assertions -echo " " -case "$d_fast_assert" in -"$undef") - dflt=n;; -*) - dflt=y;; -esac -$cat <try.c <<'EOC' -int main() -{ - return 0; -} -EOC - if $cc $ccflags -momit-leaf-frame-pointer $ldflags -o try try.c >/dev/null 2>&1 - then - case "$ccflags $optimize" in - *-momit-leaf-frame-pointer*) ;; - *-O0*) ;; - *-O*) - ccflags="-momit-leaf-frame-pointer $ccflags" - echo "Added -momit-leaf-frame-pointer to the cc flags." >&4 - ;; - esac - else - case "$ccflags" in - *-momit-leaf-frame-pointer*) - echo "Stripping -momit-leaf-frame-pointer from cc flags." >&4 - ccflags=`echo $ccflags | $sed 's/ *-momit-leaf-frame-pointer//'` - ;; - esac - fi - ;; - esac -;; -esac - -- cgit v1.2.3 From 95f048e9762e73782a47c73f27f4de4500bf5051 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Mon, 16 Mar 2020 17:08:27 +0100 Subject: Was missing a few $cat uses. --- mcon/U/Checkcc.U | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mcon/U/Checkcc.U b/mcon/U/Checkcc.U index 3cae05c..ce0dc62 100644 --- a/mcon/U/Checkcc.U +++ b/mcon/U/Checkcc.U @@ -37,10 +37,10 @@ ?INIT:ccname='' ?INIT:ccversion='' : generate the trygcc script for later perusal -cat <trygcc +$cat <trygcc $startsh EOS -cat <<'EOSC' >>trygcc +$cat <<'EOSC' >>trygcc case "$cc" in '') ;; *) $rm -f try try.* @@ -100,10 +100,10 @@ esac EOSC : generate the checkcc script for later perusal -cat <checkcc +$cat <checkcc $startsh EOS -cat <<'EOSC' >>checkcc +$cat <<'EOSC' >>checkcc case "$cc" in '') ;; *) $rm -f try try.* -- cgit v1.2.3 From 2f64ea88c70b412b1543e36e5f7421c48bfd464e Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Mon, 16 Mar 2020 17:11:08 +0100 Subject: Added space to be consistent. --- mcon/U/Trylink.U | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcon/U/Trylink.U b/mcon/U/Trylink.U index d45ffe2..4ed9128 100644 --- a/mcon/U/Trylink.U +++ b/mcon/U/Trylink.U @@ -74,7 +74,7 @@ case "$cyn" in "") echo "--- $var ---" >> "$file";; *) echo " "; $echo $n "Checking $msg...$c" >&4; - echo "--- $var --- ($msg)" >>"$file" + echo "--- $var --- ($msg)" >> "$file" ;; esac; $cat try.c >> "$file"; -- cgit v1.2.3 From 15e25d59057b78f00042640defd1f8c76b8d4d06 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Mon, 16 Mar 2020 17:23:24 +0100 Subject: metalint: warn if several units claim to export the same file. --- mcon/man/mlint.SH | 5 +++++ mcon/pl/lint.pl | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mcon/man/mlint.SH b/mcon/man/mlint.SH index e2c7f4a..58dc389 100755 --- a/mcon/man/mlint.SH +++ b/mcon/man/mlint.SH @@ -265,6 +265,11 @@ Private UU files (i.e. files like the \fImyread\fR script created for later perusal by \fIConfigure\fR) may only be created in special units. Exceptions allowed if the ?F: line is preceded by a proper ?LINT: hint. .TP +"(?F) file 'xxx' already exported by yyy.U." +The listed file 'xxx' is already reported exported (listed likewise) in +the other unit yyy.U and is conflicting. An exported file is a generated +file above the UU directory. +.TP "(?T) temporary symbol '\$xxx' multiply declared." Self explanatory. .TP diff --git a/mcon/pl/lint.pl b/mcon/pl/lint.pl index 0120c51..3f212af 100644 --- a/mcon/pl/lint.pl +++ b/mcon/pl/lint.pl @@ -78,6 +78,7 @@ sub init_extraction { %filetmp = (); # Local temporary files in ?F: directives %filesetin = (); # Lists units defining a temporary file %filecreated = (); # Records files created in this unit + %filedefined = (); # Records units that export a given file %prodfile = (); # Unit where a given file is said to be created %defseen = (); # Symbol defintions claimed %lintset = (); # Symbols declared set by a ?LINT: line @@ -622,7 +623,17 @@ sub p_file { } $prodfile{$file} .= "$unit " if $fileseen{$file} == 1; ($uufile = $file) =~ s|^\./(\S+)$|$1|; - next if $file eq $uufile; # Don't care about non-UU files + if ($file eq $uufile) { + # This is a non-UU files created and not a temporary file + # It is meant to be exported by Configure + if (exists $filedefined{$file}) { + my $other = $filedefined{$file}; + warn "$where: file '$file' already exported by $other.U.\n"; + } else { + $filedefined{$file} = $unit; + } + next; + } unless ($is_special || $lintcreated{$uufile}) { warn "$where: UU file '$uufile' in non-special unit ignored.\n"; delete $lintcreated{$uufile}; # Detect spurious LINT @@ -1308,6 +1319,7 @@ sub sanity_checks { undef %shspecial; undef %shvisible; undef %filemaster; + undef %filedefined; # Spot multiply defined C symbols foreach $sym (keys %cmaster) { -- cgit v1.2.3 From 3a771ebdb5e31d41b611d176f65fc1205c391f43 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Mon, 16 Mar 2020 17:24:17 +0100 Subject: Mark that this unit exports the config.sh file. --- mcon/U/Config_sh.U | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcon/U/Config_sh.U b/mcon/U/Config_sh.U index bb47b7b..1b3b0c6 100644 --- a/mcon/U/Config_sh.U +++ b/mcon/U/Config_sh.U @@ -32,7 +32,7 @@ ?MAKE: -pick add.Config_sh $@ %< ?MAKE: -pick add $@ ./Obsol_sh ?MAKE: -pick close.Config_sh $@ %< -?F:!config.over !config.arch +?F:!config.over !config.arch config.sh ?T:file sfile xsed ?LINT:unclosed EOT : back to where it started -- cgit v1.2.3 From f0b8d8aca8989710c49512ec0457539c8460f43b Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Mon, 16 Mar 2020 17:13:12 +0100 Subject: metalint: warn if defining a UU-file already claimed. --- mcon/man/mlint.SH | 4 ++++ mcon/pl/lint.pl | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mcon/man/mlint.SH b/mcon/man/mlint.SH index 58dc389..c46ded2 100755 --- a/mcon/man/mlint.SH +++ b/mcon/man/mlint.SH @@ -270,6 +270,10 @@ The listed file 'xxx' is already reported exported (listed likewise) in the other unit yyy.U and is conflicting. An exported file is a generated file above the UU directory. .TP +"(?F) UU file 'xxx' already created by yyy.U." +The listed file 'xxx' is already created in the UU directory by the other +unit yyy.U. A created file is listed as ./xxx on the ?F: line. +.TP "(?T) temporary symbol '\$xxx' multiply declared." Self explanatory. .TP diff --git a/mcon/pl/lint.pl b/mcon/pl/lint.pl index 3f212af..e73f0fd 100644 --- a/mcon/pl/lint.pl +++ b/mcon/pl/lint.pl @@ -640,8 +640,13 @@ sub p_file { next; } delete $lintcreated{$uufile} if !$is_special; # Detect spurious LINT - $filemaster{$uufile} = $unit unless defined $filemaster{$uufile}; - $filecreated{$uufile} = 'a'; # Will be automagically incremented + if (exists $filemaster{$uufile}) { + my $other = $filemaster{$uufile}; + warn "$where: UU file '$uufile' already created by $other.U.\n"; + } else { + $filemaster{$uufile} = $unit; + $filecreated{$uufile} = 'a'; # Will be automagically incremented + } } } -- cgit v1.2.3 From 41979518039d93f7ce33c9ed1b3d16620a7bd61a Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Mon, 16 Mar 2020 18:48:47 +0100 Subject: Avoid compiler warning during void-support test. --- mcon/U/voidflags.U | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mcon/U/voidflags.U b/mcon/U/voidflags.U index 0e0f49c..5db1db9 100644 --- a/mcon/U/voidflags.U +++ b/mcon/U/voidflags.U @@ -111,6 +111,8 @@ sub() { hue = buf; if (doit()) iptr = hue; +?X: Avoid "variable set but not used" compilation warning + (void) iptr; #endif doit(); } -- cgit v1.2.3 From c15168c17871134abedd45d1690708834ad6a3b6 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Mon, 16 Mar 2020 19:32:07 +0100 Subject: Check whether bfd_get_section_vma() takes 1 or 2 arguments. --- MANIFEST | 1 + mcon/U/d_bfd_section_vma.U | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 mcon/U/d_bfd_section_vma.U diff --git a/MANIFEST b/MANIFEST index b04808d..35aaa0b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -172,6 +172,7 @@ mcon/U/d_backtrace.U Do we have backtrace()? mcon/U/d_bcmp.U Do we have bcmp() or memcmp()? mcon/U/d_bcopy.U Do we have bcopy() or memcpy()? mcon/U/d_bfd_lib.U Is the BFD library available? +mcon/U/d_bfd_section_vma.U Does bfd_get_section_vma() take 1 or 2 arguments? mcon/U/d_bindtxtcode.U Do we have bind_textdomain_codeset()? mcon/U/d_brokstat.U Check whether stat() macros are broken mcon/U/d_bsdjmp.U Do we have BSD _setjmp() and _longjmp()? diff --git a/mcon/U/d_bfd_section_vma.U b/mcon/U/d_bfd_section_vma.U new file mode 100644 index 0000000..0b41f44 --- /dev/null +++ b/mcon/U/d_bfd_section_vma.U @@ -0,0 +1,80 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 2020, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?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 License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_bfd_section_vma d_bfd_section_vma2: Trylink cat cp rm d_bfd_lib +?MAKE: -pick add $@ %< +?S:d_bfd_section_vma: +?S: This variable conditionally defines the HAS_BFD_SECTION_VMA_1ARG symbol, +?S: which indicates to the C program that the bfd_get_section_vma() routine from +?S: the BFD library takes only one argument. +?S:. +?S:d_bfd_section_vma2: +?S: This variable conditionally defines the HAS_BFD_SECTION_VMA_2ARGS symbol, +?S: which indicates to the C program that the bfd_get_section_vma() routine from +?S: the BFD library takes two arguments, the first being probably ignored. +?S: This was the old behaviour (before 2020-03 at least), the new behaviour +?S: being to use a new 1-argument signature. +?S:. +?C:HAS_BFD_SECTION_VMA_1ARG: +?C: This symbol, if defined, indicates that the bfd_get_section_vma() routine +?C: from the BFD library takes only one argument, which is the new behaviour +?C: starting from 2020-03 at least. +?C:. +?C:HAS_BFD_SECTION_VMA_2ARGS: +?C: This symbol, if defined, indicates that the bfd_get_section_vma() routine +?C: from the BFD library takes two arguments, which is the old behaviour, +?C: with the first argument probably ignored underneath. +?C:. +?H:#$d_bfd_section_vma HAS_BFD_SECTION_VMA_1ARG /**/ +?H:#$d_bfd_section_vma2 HAS_BFD_SECTION_VMA_2ARGS /**/ +?H:. +?F:!head.c +: see whether d_bfd_get_section_vma exists and takes 1 or 2 arguments +$cat >head.c < +int main(void) +{ + bfd *b = 0; + asection *sec = 0; +EOC +case "$d_bfd_lib" in +$undef) + d_bfd_section_vma=$undef + d_bfd_section_vma2=$undef + ;; +*) + $cp head.c try.c + $cat >>try.c <>try.c < Date: Mon, 16 Mar 2020 21:44:05 +0100 Subject: Fixed typo in metalint man page. --- mcon/man/mlint.SH | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcon/man/mlint.SH b/mcon/man/mlint.SH index c46ded2..6d7478e 100755 --- a/mcon/man/mlint.SH +++ b/mcon/man/mlint.SH @@ -260,7 +260,7 @@ The file is listed more than once on the ?F: line, under the same name. This does not appear when declaring both a private UU file and a public file with the same name, for instance. .TP -"(?F) UU file $uufile in non-special unit ignored." +"(?F) UU file 'xxx' in non-special unit ignored." Private UU files (i.e. files like the \fImyread\fR script created for later perusal by \fIConfigure\fR) may only be created in special units. Exceptions allowed if the ?F: line is preceded by a proper ?LINT: hint. -- cgit v1.2.3 From 35f0ffa60c3ca18b865718fd83f7b4c5e90f205e Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Tue, 17 Mar 2020 10:10:38 +0100 Subject: Reworked BFD section tests. It's not only bfd_get_section_vma() which is impacted! The change in the BFD library, starting with 2.34, is rather that: - bfd_section_xxx() accessors now take only the BFD section as argument. - bfd_get_section_xxx() accessors, which used 2 arguments, are removed. The first argument in bfd_get_section_xxx() calls was the BFD descriptor and it was purely ignored in recent versions of the library. --- MANIFEST | 2 +- mcon/U/d_bfd_section.U | 49 ++++++++++++++++++++++++++++ mcon/U/d_bfd_section_vma.U | 80 ---------------------------------------------- 3 files changed, 50 insertions(+), 81 deletions(-) create mode 100644 mcon/U/d_bfd_section.U delete mode 100644 mcon/U/d_bfd_section_vma.U diff --git a/MANIFEST b/MANIFEST index 35aaa0b..343abc8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -172,7 +172,7 @@ mcon/U/d_backtrace.U Do we have backtrace()? mcon/U/d_bcmp.U Do we have bcmp() or memcmp()? mcon/U/d_bcopy.U Do we have bcopy() or memcpy()? mcon/U/d_bfd_lib.U Is the BFD library available? -mcon/U/d_bfd_section_vma.U Does bfd_get_section_vma() take 1 or 2 arguments? +mcon/U/d_bfd_section.U Do bfd_section_xxx() accessors exist with 1 argument? mcon/U/d_bindtxtcode.U Do we have bind_textdomain_codeset()? mcon/U/d_brokstat.U Check whether stat() macros are broken mcon/U/d_bsdjmp.U Do we have BSD _setjmp() and _longjmp()? diff --git a/mcon/U/d_bfd_section.U b/mcon/U/d_bfd_section.U new file mode 100644 index 0000000..d876541 --- /dev/null +++ b/mcon/U/d_bfd_section.U @@ -0,0 +1,49 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 2020, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?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 License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_bfd_section: Trylink cat d_bfd_lib +?MAKE: -pick add $@ %< +?S:d_bfd_section: +?S: This variable conditionally defines the HAS_BFD_SECTION_1ARG symbol, +?S: which indicates to the C program that the bfd_section_xxx() accessors +?S: from the BFD library exists and taks only one argument. +?S:. +?C:HAS_BFD_SECTION_1ARG: +?C: This symbol, if defined, indicates that the bfd_section_xxx() accessors +?C: from the BFD library takes only one argument, which is the new behaviour +?C: starting from BFD 2.34. +?C:. +?H:#$d_bfd_section HAS_BFD_SECTION_1ARG /**/ +?H:. +: see whether bfd_section_vma exists and takes 1 argument +case "$d_bfd_lib" in +$undef) + d_bfd_section=$undef + ;; +*) + $cat >try.c < +int main(void) +{ + bfd *b = 0; + asection *sec = 0; + + return 0 == bfd_section_vma(sec); +} +EOC + cyn="whether bfd_section_vma() takes 1 argument" + set d_bfd_section + eval $trylink + ;; +esac + diff --git a/mcon/U/d_bfd_section_vma.U b/mcon/U/d_bfd_section_vma.U deleted file mode 100644 index 0b41f44..0000000 --- a/mcon/U/d_bfd_section_vma.U +++ /dev/null @@ -1,80 +0,0 @@ -?RCS: $Id$ -?RCS: -?RCS: Copyright (c) 2020, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic License, -?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 License; a copy of which may be found at the root -?RCS: of the source tree for dist 4.0. -?RCS: -?MAKE:d_bfd_section_vma d_bfd_section_vma2: Trylink cat cp rm d_bfd_lib -?MAKE: -pick add $@ %< -?S:d_bfd_section_vma: -?S: This variable conditionally defines the HAS_BFD_SECTION_VMA_1ARG symbol, -?S: which indicates to the C program that the bfd_get_section_vma() routine from -?S: the BFD library takes only one argument. -?S:. -?S:d_bfd_section_vma2: -?S: This variable conditionally defines the HAS_BFD_SECTION_VMA_2ARGS symbol, -?S: which indicates to the C program that the bfd_get_section_vma() routine from -?S: the BFD library takes two arguments, the first being probably ignored. -?S: This was the old behaviour (before 2020-03 at least), the new behaviour -?S: being to use a new 1-argument signature. -?S:. -?C:HAS_BFD_SECTION_VMA_1ARG: -?C: This symbol, if defined, indicates that the bfd_get_section_vma() routine -?C: from the BFD library takes only one argument, which is the new behaviour -?C: starting from 2020-03 at least. -?C:. -?C:HAS_BFD_SECTION_VMA_2ARGS: -?C: This symbol, if defined, indicates that the bfd_get_section_vma() routine -?C: from the BFD library takes two arguments, which is the old behaviour, -?C: with the first argument probably ignored underneath. -?C:. -?H:#$d_bfd_section_vma HAS_BFD_SECTION_VMA_1ARG /**/ -?H:#$d_bfd_section_vma2 HAS_BFD_SECTION_VMA_2ARGS /**/ -?H:. -?F:!head.c -: see whether d_bfd_get_section_vma exists and takes 1 or 2 arguments -$cat >head.c < -int main(void) -{ - bfd *b = 0; - asection *sec = 0; -EOC -case "$d_bfd_lib" in -$undef) - d_bfd_section_vma=$undef - d_bfd_section_vma2=$undef - ;; -*) - $cp head.c try.c - $cat >>try.c <>try.c < Date: Thu, 9 Apr 2020 13:55:22 +0200 Subject: Use a more compact version of STATIC_ASSERT(). --- mcon/U/Assert.U | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mcon/U/Assert.U b/mcon/U/Assert.U index 76de54d..1a38e49 100644 --- a/mcon/U/Assert.U +++ b/mcon/U/Assert.U @@ -20,7 +20,6 @@ ?X: There is no need to link the file to spot the assertion failure. ?X: $cat >static_assert.h <<'EOC' -#define STATIC_ASSERT(expr) \ - do { switch (0) { case ((expr) ? 1 : 0): case 0: break; } } while(0) +#define STATIC_ASSERT(expr) ((void) sizeof(char[1 - 2*!(expr)])) EOC -- cgit v1.2.3 From 9f837754617b4cb3a6b2dbd176e621ad83bd4c15 Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand - Tux" Date: Sat, 25 Apr 2020 16:49:47 +0200 Subject: Fix repeated-word typos --- mcon/U/Getfile.U | 2 +- mcon/U/Obsol_h.U | 2 +- mcon/U/Obsol_sh.U | 2 +- mcon/U/d_tminsys.U | 2 +- pat/patlog.SH | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mcon/U/Getfile.U b/mcon/U/Getfile.U index f5cf49b..641ea30 100644 --- a/mcon/U/Getfile.U +++ b/mcon/U/Getfile.U @@ -48,7 +48,7 @@ ?X: those are prefixes for the filename. Unless $gfpthkeep is set to 'y', ?X: gfpth is cleared on return from Getfile. ?X: -?X: If is is followed by a ~, then ~name substitution will occur. Upon return, +?X: If it is followed by a ~, then ~name substitution will occur. Upon return, ?X: $ans is set with the filename value. If a / is specified, then only a full ?X: path name is accepted (but ~ substitution occurs before, if needed). The ?X: expanded path name is returned in that case. diff --git a/mcon/U/Obsol_h.U b/mcon/U/Obsol_h.U index fc59938..c19c5a4 100644 --- a/mcon/U/Obsol_h.U +++ b/mcon/U/Obsol_h.U @@ -20,7 +20,7 @@ ?MAKE: -pick prepend $@ ./Obsol_h ?LINT:nocomment /* - * The following symbols are obsolete. They are mapped to the the new + * The following symbols are obsolete. They are mapped to the new * symbols only to ease the transition process. The sources should be * updated so as to use the new symbols only, as the support for these * obsolete symbols may end without notice. diff --git a/mcon/U/Obsol_sh.U b/mcon/U/Obsol_sh.U index de1a1e1..3b3f0d6 100644 --- a/mcon/U/Obsol_sh.U +++ b/mcon/U/Obsol_sh.U @@ -20,7 +20,7 @@ ?MAKE: -pick prepend $@ ./Obsol_sh ?LINT:nocomment # -# The following symbols are obsolete. They are mapped to the the new +# The following symbols are obsolete. They are mapped to the new # symbols only to ease the transition process. The sources should be # updated so as to use the new symbols only, since supporting of those # obsolete symbols may end without notice. diff --git a/mcon/U/d_tminsys.U b/mcon/U/d_tminsys.U index 60fc95a..548a014 100644 --- a/mcon/U/d_tminsys.U +++ b/mcon/U/d_tminsys.U @@ -20,7 +20,7 @@ ?S:. ?C:TM_IN_SYS (TMINSYS): ?C: This symbol is defined if this system declares "struct tm" in -?C: in rather than . We can't just say +?C: rather than . We can't just say ?C: -I/usr/include/sys because some systems have both time files, and ?C: the -I trick gets the wrong one. ?C:. diff --git a/pat/patlog.SH b/pat/patlog.SH index 1588af4..ff7a81f 100755 --- a/pat/patlog.SH +++ b/pat/patlog.SH @@ -252,7 +252,7 @@ system 'perl', '-S', 'patdiff', $changelog; exit 0; # All done. -# Returns true if .clog and .rlog (it it exists) are newer than .xlog. +# Returns true if .clog and .rlog (if it exists) are newer than .xlog. sub newertmp { return 1 unless -f ".xlog$bnum"; # To force regeneration return 1 if &newer(".clog$bnum", ".xlog$bnum") || -- cgit v1.2.3 From ed9965c886297c329bb6530a3cb34870666a252a Mon Sep 17 00:00:00 2001 From: Aaron Crane Date: Thu, 25 Apr 2019 10:25:09 +0100 Subject: Fix bug when $exclusions_file is specified in .package file The actual programs were trying to load the exclusions file before reading .package (or even, in one case, without trying to read it at all). I failed to notice this because I had a "-X" option that duplicated the intended use of the setting in my .package file. --- mcon/mconfig.SH | 4 ++-- mcon/mxref.SH | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mcon/mconfig.SH b/mcon/mconfig.SH index 4917e43..42a3dc1 100755 --- a/mcon/mconfig.SH +++ b/mcon/mconfig.SH @@ -70,8 +70,6 @@ chop($date = `date`); use Getopt::Std; &usage unless getopts("dhkmostvwGMVL:X:"); -my %excluded_symbol; -read_exclusions($opt_X); $MC = $opt_L if $opt_L; # May override public library path $MC = &tilda_expand($MC); # ~name expansion chop($WD = `pwd`); # Working directory @@ -93,6 +91,8 @@ unlink 'Wanted' unless $opt_w; # Wanted rebuilt if no -w unlink 'Obsolete' unless $opt_w; # Obsolete file rebuilt if no -w &readpackage; # Merely get the package's name &init; # Various initializations +my %excluded_symbol; +read_exclusions($opt_X); # Load -X or .package equivalent `mkdir .MT 2>&1` unless -d '.MT'; # For private temporary files &locate_units; # Fill in @ARGV with a unit list diff --git a/mcon/mxref.SH b/mcon/mxref.SH index 3433edc..fa9e44e 100755 --- a/mcon/mxref.SH +++ b/mcon/mxref.SH @@ -64,8 +64,6 @@ use Getopt::Std; chop($date = `date`); chop($WD = `pwd`); # Working directory -my %excluded_symbol; -read_exclusions($opt_X); $MC = $opt_L if $opt_L; # May override library path $MC = &tilda_expand($MC); # ~name expansion chdir $MC || die "Can't chdir to $MC: $!\n"; @@ -81,7 +79,10 @@ if ($opt_V) { $NEWMANI = $opt_f || (-f 'MANIFEST.new' ? 'MANIFEST.new' : 'MANIFEST'); +&readpackage; # Merely get the package's name &init; # Various initializations +my %excluded_symbol; +read_exclusions($opt_X); # Load -X or .package equivalent `mkdir .MT 2>&1` unless -d '.MT'; # For private temporary files unlink 'Obsolete'; # Obsolete file rebuilt -- cgit v1.2.3 From 2cec35331a912b165e2dd135d22de81f34bbc83f Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Sat, 16 May 2020 09:50:30 +0200 Subject: Note that gccversion only contains major version. We used to say things like: case "$gccversion" in 1*) ... but that was wrong because it now starts to catch version 10 as well, for cases that only pertained to gcc version 1! We now need to say: case "$gccversion" in 1) ... 2) ... etc. to handle versions 1 and 2 differently. Thanks to Dmitry Butskoy for spotting this bug. --- mcon/U/ccflags.U | 8 ++++---- mcon/U/gccvers.U | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mcon/U/ccflags.U b/mcon/U/ccflags.U index 942e462..b134f57 100644 --- a/mcon/U/ccflags.U +++ b/mcon/U/ccflags.U @@ -174,11 +174,11 @@ dflt='' case "$hint" in default|recommended) case "$gccversion" in - 1*) dflt='-fpcc-struct-return' ;; + 1) dflt='-fpcc-struct-return' ;; esac ?X: check for POSIXized ISC case "$gccversion" in - 2*) if test -d /etc/conf/kconfig.d && + 2) if test -d /etc/conf/kconfig.d && $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1 then dflt="$dflt -posix" @@ -187,7 +187,7 @@ default|recommended) esac ?X: turn warnings on if they're using gcc case "$gccversion" in - 1*|2*) dflt="$dflt -Wall";; + 1|2) dflt="$dflt -Wall";; ?X: starting with version 3, add "-W -Wall -Wformat=2 -Wshadow" by default *) dflt="$dflt -W -Wall -Wformat=2 -Wshadow";; esac @@ -265,7 +265,7 @@ esac : the following weeds options from ccflags that are of no interest to cpp cppflags="$ccflags" case "$gccversion" in -1*) cppflags="$cppflags -D__GNUC__" +1) cppflags="$cppflags -D__GNUC__" esac case "$mips_type" in '');; diff --git a/mcon/U/gccvers.U b/mcon/U/gccvers.U index 702a5e9..b5abb47 100644 --- a/mcon/U/gccvers.U +++ b/mcon/U/gccvers.U @@ -17,6 +17,9 @@ ?S: If GNU cc (gcc) is used, this variable holds '1' or '3' (for instance) ?S: to indicate whether the compiler is version 1 or 3. This is used in ?S: setting some of the default cflags. It is set to '' if not gcc. +?S: Note that it only contains the major version number, and, when using +?S: case statements to do different things depending on the major, do not +?S: use statements like "1*)" because it will match version 1, 10, 11, etc. ?S:. ?S:gccosandvers: ?S: If GNU cc (gcc) is used, this variable the operating system and @@ -58,7 +61,7 @@ else fi $rm -f try try.* case "$gccversion" in -1*) cpp=`./loc gcc-cpp $cpp $pth` ;; +1) cpp=`./loc gcc-cpp $cpp $pth` ;; esac case "$gccversion" in '') gccosandvers='' ;; @@ -99,7 +102,7 @@ esac : gcc 3.1 complains about adding -Idirectories that it already knows about, : so we will take those off from locincpth. case "$gccversion" in -3*) +3) echo "main(){}">try.c for incdir in `$cc -v -c try.c 2>&1 | \ sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do -- cgit v1.2.3