From fb87c415cfc5d52e36013c492176de3a1df7a905 Mon Sep 17 00:00:00 2001 From: Ilya Zakharevich Date: Mon, 6 Jul 1998 18:47:30 -0400 Subject: [PATCH] applied patch, various tweaks to pander to pod2man tantrums Message-Id: <199807070247.WAA10677@monk.mps.ohio-state.edu> Subject: [PATCH 5.004_70] CONFIGPM p4raw-id: //depot/perl@1362 --- Porting/Glossary | 20 ++++++++-------- configpm | 69 ++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 54 insertions(+), 35 deletions(-) diff --git a/Porting/Glossary b/Porting/Glossary index e2d91a9..0d99ae5 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -136,11 +136,11 @@ cat (Loc.U): cc (cc.U): This variable holds the name of a command to execute a C compiler which can resolve multiple global references that happen to have the same - name. Usual values are "cc", "Mcc", "cc -M", and "gcc". + name. Usual values are 'cc', 'Mcc', 'cc -M', and 'gcc'. cccdlflags (dlsrc.U): This variable contains any special flags that might need to be - passed with cc -c to compile modules to be used to create a shared + passed with 'cc -c' to compile modules to be used to create a shared library that will be used for dynamic loading. For hpux, this should be +z. It is up to the makefile to use it. @@ -1701,7 +1701,7 @@ lddlflags (dlsrc.U): This variable contains any special flags that might need to be passed to $ld to create a shared library suitable for dynamic loading. It is up to the makefile to use it. For hpux, it - should be -b. For sunos 4.1, it is empty. + should be '-b'. For sunos 4.1, it is empty. ldflags (ccflags.U): This variable contains any additional C loader flags desired by @@ -1764,7 +1764,7 @@ lns (lns.U): locincpth (ccflags.U): This variable contains a list of additional directories to be - searched by the compiler. The appropriate -I directives will + searched by the compiler. The appropriate '-I' directives will be added to ccflags. This is intended to simplify setting local directories from the Configure command line. It's not much, but it parallels the loclibpth stuff in libpth.U. @@ -1827,7 +1827,7 @@ make_set_make (make.U): make_set_make='#' # If your make program handles this for you, make_set_make="MAKE=$make" # if it doesn't. I used a comment character so that we can distinguish a - 'set' value (from a previous config.sh or Configure -D option) + 'set' value (from a previous config.sh or Configure '-D' option) from an uncomputed value. mallocobj (mallocsrc.U): @@ -1932,7 +1932,7 @@ myuname (Oldconfig.U): whole thing is then lower-cased. n (n.U): - This variable contains the -n flag if that is what causes the echo + This variable contains the '-n' flag if that is what causes the echo command to suppress newline. Otherwise it is null. Correct usage is $echo $n "prompt for a question: $c". @@ -2170,9 +2170,9 @@ sh (sh.U): /bin/sh, though it's possible that some systems will have /bin/ksh, /bin/pdksh, /bin/ash, /bin/bash, or even something such as D:/bin/sh.exe. - This unit comes before Options.U, so you can't set sh with a -D + This unit comes before Options.U, so you can't set sh with a '-D' option, though you can override this (and startsh) - with -O -Dsh=/bin/whatever -Dstartsh=whatever + with '-O -Dsh=/bin/whatever -Dstartsh=whatever' shar (Loc.U): This variable is defined but not used by Configure. @@ -2275,7 +2275,7 @@ so (so.U): (also known as shared objects) on the system. Usually set to 'so'. sockethdr (d_socket.U): - This variable has any cpp -I flags needed for socket support. + This variable has any cpp '-I' flags needed for socket support. socketlib (d_socket.U): This variable has the names of any libraries needed for socket support. @@ -2292,7 +2292,7 @@ spackage (package.U): spitshell (spitshell.U): This variable contains the command necessary to spit out a runnable - shell on this system. It is either cat or a grep -v for # comments. + shell on this system. It is either cat or a grep '-v' for # comments. split (models.U): This variable contains a flag which will tell the C compiler and loader diff --git a/configpm b/configpm index 2b8d982..971af7f 100755 --- a/configpm +++ b/configpm @@ -288,37 +288,56 @@ some of the variables described below, or may have extraneous variables specific to that particular port. See the port specific documentation in such cases. -=over 4 - ENDOFTAIL open(GLOS, "<$glossary") or die "Can't open $glossary: $!"; +%seen = (); +$text = 0; +$/ = ''; + +sub process { + s/\A(\w*)\s+\(([\w.]+)\):\s*\n(\t?)/=item C<$1>\n\nFrom F<$2>:\n\n/m; + my $c = substr $1, 0, 1; + unless ($seen{$c}++) { + print CONFIG <) { - if (/^\s*(.*)\s*\(\s*(.+\.U)\s*\):\s*$/) { - print CONFIG "\n=item $var\n\n$text\n" if $var and $text; - ($var,$unit,$text) = ($1,$2,""); - } - else { - # bite off exactly one tab-width - s/^([ ]{8}|[ ]{0,7}\t)//; - - # indented stuff starts a separate paragraph - if (/^\s/) { - $text .= "\n" unless $indentpara; - $indentpara = 1; - } - else { - $text .= "\n" if $indentpara; - $indentpara = 0; - } - $text .= $_; - } +EOF + print CONFIG < paragraphs + s/^(? text + s{([\'\"])(?=[^\'\"\s]*[./][^\'\"\s]*\1)([^\'\"\s]+)\1}(F<$2>)g; # '.o' + s{([\'\"])([^\'\"\s]+)\1}(C<$2>)g; # "date" command + s{\'([A-Za-z_\- *=/]+)\'}(C<$1>)g; # 'ln -s' + s{ + (?)xg; # /usr/local + s/((?<=\s)~\w*)/F<$1>/g; # ~name + s/(?/g; # UNISTD + s/(? macro/g; # FILE_cnt macro + s/n[\0]t/n't/g; # undo can't, won't damage } -print CONFIG "\n=item $var\n\n$text\n" if $var and $text; +; # Skip the preamble +while () { + process; + print CONFIG; +} print CONFIG <<'ENDOFTAIL'; -- 2.7.4