aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2021-09-05 00:36:43 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-09-06 08:50:29 +0700
commit06072cd3311d86be34eb2f9a7cfc3d5623fd4eb3 (patch)
tree837961fce34f179e5f90b6d4f66373f90d4357b3
parent68c73ff608a05321ca2b64cd51793ff21572d1b6 (diff)
development/noweb: Updated for version 2.12
Signed-off-by: Kyle Guinn <elyk03@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--development/noweb/noweb.SlackBuild94
-rw-r--r--development/noweb/noweb.info8
-rw-r--r--development/noweb/patches/make_cleanup.diff (renamed from development/noweb/make_cleanup.diff)680
-rw-r--r--development/noweb/patches/toascii.diff143
4 files changed, 674 insertions, 251 deletions
diff --git a/development/noweb/noweb.SlackBuild b/development/noweb/noweb.SlackBuild
index 5f6f4a00cff5..fbadac7d075e 100644
--- a/development/noweb/noweb.SlackBuild
+++ b/development/noweb/noweb.SlackBuild
@@ -1,22 +1,42 @@
#!/bin/bash
# Slackware build script for noweb
-# Written by Kyle Guinn <elyk03@gmail.com>
+
+# Copyright 2010-2021 Kyle Guinn <elyk03@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=noweb
-VERSION=${VERSION:-2.11b}
+VERSION=${VERSION:-2.12}
+SRCVER=$(echo $VERSION | tr . _)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
- case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$(uname -m) ;;
- esac
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$(uname -m) ;;
+ esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
@@ -31,20 +51,23 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM-$VERSION
OUTPUT=${OUTPUT:-/tmp}
-DOCS="CHANGES COPYRIGHT DATE README examples/"
+DOCS="CHANGES COPYRIGHT LICENSE README examples/"
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -52,18 +75,16 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
+cd $PRGNAM-$SRCVER
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+chmod -R u+w,go-w,a+rX-st .
-# Adds destdir support along with various other simplifications
-patch -p1 < $CWD/make_cleanup.diff
+# Adds PREFIX and DESTDIR support along with various other simplifications
+patch -p1 < $CWD/patches/make_cleanup.diff
+# Needed to bootstrap
+patch -p1 < $CWD/patches/toascii.diff
# Postpone texhash until doinst.sh
sed -i 's/texhash/true/g' src/Makefile
@@ -72,17 +93,16 @@ sed -i 's/texhash/true/g' src/Makefile
(cd src && ./awkname awk)
make -j1 -C src all install \
- ICONC="icont" \
- LIBSRC="icon" \
- BIN="/usr/bin" \
- LIB="/usr/libexec/$PRGNAM" \
- MAN="/usr/man" \
- TEXINPUTS="/usr/share/texmf-local/tex/latex/$PRGNAM" \
- ELISP="/usr/share/emacs/site-lisp" \
- CFLAGS="$SLKCFLAGS -DTEMPNAM" \
- DESTDIR="$PKG"
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+ ICONC="icont" \
+ LIBSRC="icon" \
+ PREFIX="/usr" \
+ MAN="/usr/man" \
+ TEXINPUTS="/usr/share/texmf-local/tex/latex/$PRGNAM" \
+ ELISP="/usr/share/emacs/site-lisp" \
+ CFLAGS="$SLKCFLAGS" \
+ DESTDIR="$PKG"
+
+find $PKG/usr/man -type f -exec gzip -9 {} +
for i in $(find $PKG/usr/man -type l); do ln -s $(readlink $i).gz $i.gz; rm $i; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/development/noweb/noweb.info b/development/noweb/noweb.info
index 6a410783c8d5..eb65898c445f 100644
--- a/development/noweb/noweb.info
+++ b/development/noweb/noweb.info
@@ -1,8 +1,8 @@
PRGNAM="noweb"
-VERSION="2.11b"
-HOMEPAGE="http://www.cs.tufts.edu/~nr/noweb/"
-DOWNLOAD="ftp://www.eecs.harvard.edu/pub/nr/noweb-2.11b.tgz"
-MD5SUM="1df580723497b2f2efde07646abf764c"
+VERSION="2.12"
+HOMEPAGE="https://www.cs.tufts.edu/~nr/noweb/"
+DOWNLOAD="https://github.com/nrnrnr/noweb/archive/v2_12/noweb-2_12.tar.gz"
+MD5SUM="a1b27919429c70398251584bd03d94ab"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="icon"
diff --git a/development/noweb/make_cleanup.diff b/development/noweb/patches/make_cleanup.diff
index a574778b38ec..72c23f08e8db 100644
--- a/development/noweb/make_cleanup.diff
+++ b/development/noweb/patches/make_cleanup.diff
@@ -1,37 +1,38 @@
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
-@@ -9,14 +9,16 @@
- CINAME=-Nv`echo $(VERSION) | tr . _`
- CIMSG=-f -m'standard checkin preparing to export version $(VERSION)'
-
+@@ -12,14 +12,16 @@
+ all:
+ @echo "You have no business running 'make' here; please look at the README file"
+ @exit 1
-source: ; for i in src; do (cd $$i; make source); done
-www: ; for i in src/xdoc examples; do (cd $$i; make www); done
+source:
-+ for i in src; do ($(MAKE) -C $$i source); done
++ for i in src; do $(MAKE) -C $$i $@; done
+www:
-+ for i in src/xdoc examples; do ($(MAKE) -C $$i www); done
++ for i in src/xdoc examples; do $(MAKE) -C $$i $@; done
clean:
- for i in src examples contrib; do (cd $$i; make clean); done
- rm -f nwsrcfilter *~ */*~
-+ for i in src examples contrib; do ($(MAKE) -C $$i clean); done
++ for i in src examples contrib; do $(MAKE) -C $$i $@; done
+ $(RM) nwsrcfilter *~ */*~
clobber: clean
- for i in src examples contrib; do (cd $$i; make clobber); done
-+ for i in src examples contrib; do ($(MAKE) -C $$i clobber); done
++ for i in src examples contrib; do $(MAKE) -C $$i $@; done
DATE:
(./echo -n "Version $(VERSION) of "; date) > DATE
-@@ -36,14 +38,14 @@
+@@ -39,21 +41,21 @@
tarnames: clean source nwsrcfilter DATE
find . -not -type d -not -name FAQ.old -print | ./nwsrcfilter
-tar: clean source nwsrcfilter DATE emacscheck
+tar: clean source nwsrcfilter DATE emacscheck
chmod +w src/Makefile
- rm -rf /tmp/noweb-$(VERSION)
+- rm -rf /tmp/noweb-$(VERSION)
- mkdir /tmp/noweb-$(VERSION)
++ $(RM) -r /tmp/noweb-$(VERSION)
+ mkdir -p /tmp/noweb-$(VERSION)
tar cvf - `find . ! -type d -not -name FAQ.old -print | ./nwsrcfilter` | (cd /tmp/noweb-$(VERSION) ; tar xf - )
(cd /tmp; tar cf - noweb-$(VERSION) ) | gzip -v > ../noweb-$(VERSION).tgz
@@ -41,15 +42,25 @@ diff --git a/Makefile b/Makefile
+ (cd .. && ln -s noweb-$(VERSION).tgz noweb.tgz)
chmod -w src/Makefile
+ ctan: clean source nwsrcfilter DATE emacscheck
+ chmod +w src/Makefile
+- (cd src; make boot)
+- rm -f ../noweb-$(VERSION)-ctan.zip
+- find ./* ! -type d -not -name FAQ.old -not -name '.git*' -print | ./nwsrcfilter | sed 's@^@noweb/@' | ( ln -s . noweb; zip ../noweb-$(VERSION)-ctan.zip -@; rm -f noweb )
++ $(MAKE) -C src boot
++ $(RM) ../noweb-$(VERSION)-ctan.zip
++ find ./* ! -type d -not -name FAQ.old -not -name '.git*' -print | ./nwsrcfilter | sed 's@^@noweb/@' | ( ln -s . noweb; zip ../noweb-$(VERSION)-ctan.zip -@; $(RM) noweb )
+ chmod -w src/Makefile
+
emacscheck:
-@@ -51,6 +53,4 @@
+@@ -61,6 +63,4 @@
diff src/elisp/noweb-mode.el $(HOME)/emacs/noweb-mode.el
checkin:
- (cd src; make "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin)
-
-
-+ ($(MAKE) -C src "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin)
++ $(MAKE) -C src "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" $@
diff --git a/contrib/Makefile b/contrib/Makefile
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -62,34 +73,37 @@ diff --git a/contrib/Makefile b/contrib/Makefile
-source: ; for i in $(DIRS); do (cd $$i; make source); done
-clean: ; for i in $(DIRS); do (cd $$i; make clean); done
+all:
-+ for i in $(DIRS); do ($(MAKE) -C $$i ICONC=$(ICONC) all); done
++ for i in $(DIRS); do $(MAKE) -C $$i ICONC=$(ICONC) $@; done
+install:
-+ for i in $(DIRS); do ($(MAKE) -C $$i LIB=$(LIB) BIN=$(BIN) install); done
++ for i in $(DIRS); do $(MAKE) -C $$i LIB=$(LIB) BIN=$(BIN) $@; done
+source:
-+ for i in $(DIRS); do ($(MAKE) -C $$i source); done
++ for i in $(DIRS); do $(MAKE) -C $$i $@; done
+clean:
-+ for i in $(DIRS); do ($(MAKE) -C $$i clean); done
++ for i in $(DIRS); do $(MAKE) -C $$i $@; done
clobber: clean
-
diff --git a/contrib/conrado/Makefile b/contrib/conrado/Makefile
--- a/contrib/conrado/Makefile
+++ b/contrib/conrado/Makefile
-@@ -1,7 +1,8 @@
+@@ -1,15 +1,16 @@
LIB=/dev/null # to be overridden by install
.SUFFIXES: .nw .icn
-.nw.icn: ; notangle -L'#line %-1L "%F"%N' $*.nw | cpif $*.icn
+.nw.icn:
-+ notangle -L'#line %-1L "%F"%N' $*.nw | cpif $*.icn
++ notangle -L'#line %-1L "%F"%N' $< | cpif $@
all: d2tex
source: d2tex
-@@ -10,6 +11,6 @@
+-install:
+- cp d2tex $(LIB)/dijkstra.filter
++install: all
++ cp d2tex $(DESTDIR)$(LIB)/dijkstra.filter
# TeX files.
hospital.tex: hospital.nw d2tex
- noweave -delay -filter ./d2tex hospital.nw > hospital.tex
-+ noweave -delay -filter $^ > $@
++ noweave -delay -filter ./d2tex $< > $@
clean:
- /bin/rm -f hospital.tex *.dvi *.aux *.log *.blg *.bbl *~
+ $(RM) hospital.tex *.dvi *.aux *.log *.blg *.bbl *~
@@ -105,7 +119,9 @@ diff --git a/contrib/davelove/Makefile b/contrib/davelove/Makefile
diff --git a/contrib/jobling/Makefile b/contrib/jobling/Makefile
--- a/contrib/jobling/Makefile
+++ b/contrib/jobling/Makefile
-@@ -1,9 +1,9 @@
+@@ -1,15 +1,17 @@
++BIN = /dev/null # to be overridden
++LIB = /dev/null # to be overridden
PROG = correct-refs
-DOCSRC = $(PROG).tex
-PROGSRC = $(PROG).csh
@@ -118,8 +134,23 @@ diff --git a/contrib/jobling/Makefile b/contrib/jobling/Makefile
correct-refs.tex: correct-refs.nw
noweave -delay -index $< > $@
-@@ -22,13 +22,13 @@
- cp *.awk $(HOME)/lib
+
+ correct-refs.csh: correct-refs.nw
+- notangle -Rcorrect-refs.csh $< | cpif $@
++ notangle -R$@ $< | cpif $@
+ chmod +x $@
+
+ all-scripts: correct-refs.nw
+@@ -17,18 +19,18 @@
+ notangle -Rawk-scripts.awk $< | cpif awk-scripts.awk
+ touch all-scripts
+
+-install:
+- cp correct-refs.csh $(HOME)/bin
+- cp *.awk $(HOME)/lib
++install: correct-refs.csh all-scripts
++ cp correct-refs.csh $(DESTDIR)$(BIN)
++ cp *.awk $(DESTDIR)$(LIB)
tidy:
- -rm *~ *% *.bak *.log *.blg
@@ -138,20 +169,133 @@ diff --git a/contrib/jobling/Makefile b/contrib/jobling/Makefile
diff --git a/contrib/jonkrom/Makefile b/contrib/jonkrom/Makefile
--- a/contrib/jonkrom/Makefile
+++ b/contrib/jonkrom/Makefile
-@@ -9,7 +9,7 @@
+@@ -1,15 +1,15 @@
+ LIB=/dev/null # override for installation
+ SHELL=/bin/sh
+ all: noxref.krom
+- chmod +x noxref.krom
+
+-install:
+- cp noxref.krom $(LIB)
++install: all
++ cp noxref.krom $(DESTDIR)$(LIB)
+
source: noxref.krom
noxref.krom: noxref.nw
- notangle -Rnoxref noxref.nw > noxref.krom
+ notangle -Rnoxref $< > $@
++ chmod +x $@
clean:
- /bin/rm -f *.tex *.dvi *.ilg *.idx *.aux *.log *.blg *.bbl *~ *.ind noxref.krom
+ $(RM) *.tex *.dvi *.ilg *.idx *.aux *.log *.blg *.bbl *~ *.ind noxref.krom
+diff --git a/contrib/kostas/Makefile.gnu b/contrib/kostas/Makefile.gnu
+--- a/contrib/kostas/Makefile.gnu
++++ b/contrib/kostas/Makefile.gnu
+@@ -1,6 +1,6 @@
+ # Only works with Gnu make.
+
+-LIB=/opt/noweb/lib
++LIB=/dev/null # to be overridden
+ ICONC=icont
+ # This is supposed to be the defns.nw file in the icon directory of the distribution.
+ defns=defns.nw
+@@ -10,36 +10,36 @@
+ .SUFFIXES: .nw .icn .tex .dvi
+
+
+-all: C.filter C++.filter icon.filter oot.filter math.filter\
+- autodefs.oot autodefs.math
++all: C.filter C++.filter icon.filter oot.filter math.filter \
++ autodefs.oot autodefs.math
+
+-install:
+- mv *.filter $(LIB)
+- mv autodefs.* $(LIB)
++install: all
++ cp *.filter $(DESTDIR)$(LIB)
++ cp autodefs.* $(DESTDIR)$(LIB)
+
+
+ # TeX files.
+-%.tex : %.nw
++%.tex: %.nw
+ $(WEAVE) $< > $@
+ pp.tex: pp.nw
+- noweave -delay -autodefs icon -filter icon.filter -index pp.nw > pp.tex
+-%.dvi : %.tex
++ noweave -delay -autodefs icon -filter icon.filter -index $< > $@
++%.dvi: %.tex
+ latex $<
+ # Don't delete the intermediate .tex file.
+-.PRECIOUS : %.tex
++.PRECIOUS: %.tex
+
+
+ # Icon files.
+-C.icn: pp.nw C_translation_table
+- $(TANGLE) -R"C" pp.nw > $@
+-C++.icn: pp.nw C++_translation_table
+- $(TANGLE) -R"C++" pp.nw > $@
+-icon.icn: pp.nw icon_translation_table
+- $(TANGLE) -R"Icon" pp.nw > $@
+-oot.icn: pp.nw oot_translation_table
+- $(TANGLE) -R"OOT" pp.nw > $@
+-math.icn: pp.nw math_translation_table
+- $(TANGLE) -R"Mathematica" pp.nw > $@
++C.icn: pp.nw C_translation_table
++ $(TANGLE) -R"C" $< > $@
++C++.icn: pp.nw C++_translation_table
++ $(TANGLE) -R"C++" $< > $@
++icon.icn: pp.nw icon_translation_table
++ $(TANGLE) -R"Icon" $< > $@
++oot.icn: pp.nw oot_translation_table
++ $(TANGLE) -R"OOT" $< > $@
++math.icn: pp.nw math_translation_table
++ $(TANGLE) -R"Mathematica" $< > $@
+
+ ootdefs.icn: ootdefs.nw
+ $(TANGLE) $< $(defns) > $@
+@@ -48,14 +48,14 @@
+
+
+ # Executables: filters.
+-%.filter : %.icn
++%.filter: %.icn
+ $(ICONC) -o $@ $<
+
+ # Executables: autodefs.
+ autodefs.oot: ootdefs.icn
+- $(ICONC) -o autodefs.oot ootdefs.icn
++ $(ICONC) -o $@ $<
+ autodefs.math: mathdefs.icn
+- $(ICONC) -o autodefs.math mathdefs.icn
++ $(ICONC) -o $@ $<
+
+
+ # Cleaning: remove all files that can be recreated from noweb sources.
+@@ -69,7 +69,4 @@
+
+ # Also remove the Icon files for the filters.
+ clean:
+- -rm -f $(rem) C.icn C++.icn icon.icn oot.icn math.icn *.filter autodefs.*
+-
+-
+-
++ $(RM) $(rem) C.icn C++.icn icon.icn oot.icn math.icn *.filter autodefs.*
diff --git a/contrib/kostas/Makefile.make b/contrib/kostas/Makefile.make
--- a/contrib/kostas/Makefile.make
+++ b/contrib/kostas/Makefile.make
-@@ -10,8 +10,8 @@
+@@ -1,6 +1,6 @@
+ # Only works with Gnu make.
+
+-LIB=/opt/noweb/lib
++LIB=/dev/null # to be overridden
+ ICONC=icont
+ # This is supposed to be the defns.nw file in the icon directory of the distribution.
+ defns=defns.nw
+@@ -10,36 +10,36 @@
.SUFFIXES: .nw .icn .tex .dvi
@@ -160,35 +304,49 @@ diff --git a/contrib/kostas/Makefile.make b/contrib/kostas/Makefile.make
+all: C.filter C++.filter icon.filter oot.filter math.filter \
+ autodefs.oot autodefs.math
- install:
- mv *.filter $(LIB)
-@@ -22,7 +22,7 @@
- %.tex : %.nw
+-install:
+- mv *.filter $(LIB)
+- mv autodefs.* $(LIB)
++install: all
++ cp *.filter $(DESTDIR)$(LIB)
++ cp autodefs.* $(DESTDIR)$(LIB)
+
+
+ # TeX files.
+-%.tex : %.nw
++%.tex: %.nw
$(WEAVE) $< > $@
pp.tex: pp.nw
- noweave -delay -autodefs icon -filter icon.filter -index pp.nw > pp.tex
+-%.dvi : %.tex
+ noweave -delay -autodefs icon -filter icon.filter -index $< > $@
- %.dvi : %.tex
++%.dvi: %.tex
latex $<
# Don't delete the intermediate .tex file.
-@@ -31,15 +31,15 @@
+-.PRECIOUS : %.tex
++.PRECIOUS: %.tex
+
# Icon files.
- C.icn: pp.nw C_translation_table
+-C.icn: pp.nw C_translation_table
- $(TANGLE) -R"C" pp.nw > $@
-+ $(TANGLE) -R"C" $< > $@
- C++.icn: pp.nw C++_translation_table
+-C++.icn: pp.nw C++_translation_table
- $(TANGLE) -R"C++" pp.nw > $@
-+ $(TANGLE) -R"C++" $< > $@
- icon.icn: pp.nw icon_translation_table
+-icon.icn: pp.nw icon_translation_table
- $(TANGLE) -R"Icon" pp.nw > $@
-+ $(TANGLE) -R"Icon" $< > $@
- oot.icn: pp.nw oot_translation_table
+-oot.icn: pp.nw oot_translation_table
- $(TANGLE) -R"OOT" pp.nw > $@
-math.icn: pp.nw math_translation_table
- $(TANGLE) -R"Mathematica" pp.nw > $@
++C.icn: pp.nw C_translation_table
++ $(TANGLE) -R"C" $< > $@
++C++.icn: pp.nw C++_translation_table
++ $(TANGLE) -R"C++" $< > $@
++icon.icn: pp.nw icon_translation_table
++ $(TANGLE) -R"Icon" $< > $@
++oot.icn: pp.nw oot_translation_table
+ $(TANGLE) -R"OOT" $< > $@
-+math.icn: pp.nw math_translation_table
++math.icn: pp.nw math_translation_table
+ $(TANGLE) -R"Mathematica" $< > $@
ootdefs.icn: ootdefs.nw
@@ -241,20 +399,20 @@ diff --git a/contrib/norman/Makefile b/contrib/norman/Makefile
-source: ; for i in $(DIRS); do (cd $$i; make source); done
-clean: ; for i in $(DIRS); do (cd $$i; make clean); done
+all:
-+ for i in $(DIRS); do ($(MAKE) -C $$i ICONC=$(ICONC) ICONT=$(ICONT) all); done
++ for i in $(DIRS); do $(MAKE) -C $$i ICONC=$(ICONC) ICONT=$(ICONT) $@; done
+install:
-+ for i in $(DIRS); do ($(MAKE) -C $$i LIB=$(LIB) BIN=$(BIN) install); done
++ for i in $(DIRS); do $(MAKE) -C $$i LIB=$(LIB) BIN=$(BIN) $@; done
+source:
-+ for i in $(DIRS); do ($(MAKE) -C $$i source); done
++ for i in $(DIRS); do $(MAKE) -C $$i $@; done
+clean:
-+ for i in $(DIRS); do ($(MAKE) -C $$i clean); done
++ for i in $(DIRS); do $(MAKE) -C $$i $@; done
iconlib: # cheap hack for slackmake
true
diff --git a/contrib/norman/numarkup/Makefile b/contrib/norman/numarkup/Makefile
--- a/contrib/norman/numarkup/Makefile
+++ b/contrib/norman/numarkup/Makefile
-@@ -6,23 +6,25 @@
+@@ -6,32 +6,31 @@
OBJS = main.o pass1.o latex.o input.o scraps.o names.o arena.o global.o
.SUFFIXES: .nw
@@ -271,12 +429,13 @@ diff --git a/contrib/norman/numarkup/Makefile b/contrib/norman/numarkup/Makefile
- make $(TARGET)
+ $(MAKE) $(TARGET)
- install:
- noweb -t numarkup.nw
+-install:
+- noweb -t numarkup.nw
- make $(TARGET)
-+ $(MAKE) $(TARGET)
++install: all
strip $(TARGET)
- cp $(TARGET) $(LIB)
+- cp $(TARGET) $(LIB)
++ cp $(TARGET) $(DESTDIR)$(LIB)
source: main.c pass1.c latex.c input.c scraps.c names.c arena.c global.c
@@ -286,8 +445,9 @@ diff --git a/contrib/norman/numarkup/Makefile b/contrib/norman/numarkup/Makefile
$(OBJS): global.h
-@@ -30,8 +32,7 @@
- $(CC) -o $(TARGET) $(OBJS)
+ $(TARGET): $(OBJS)
+- $(CC) -o $(TARGET) $(OBJS)
++ $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
numarkup.html: numarkup.nw
- noweave -filter l2h -html -index numarkup.nw > numarkup.html
@@ -309,6 +469,12 @@ diff --git a/contrib/ydirson/Makefile b/contrib/ydirson/Makefile
# nothing to tangle or weave
all:
+@@ -8,4 +8,4 @@
+ clean:
+
+ install:
+- cp -p $(FILTERS) $(LIB)
++ cp -p $(FILTERS) $(DESTDIR)$(LIB)
diff --git a/examples/Makefile b/examples/Makefile
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -322,13 +488,13 @@ diff --git a/examples/Makefile b/examples/Makefile
-.nw.m3: ; $(NOTANGLE) -L'<* LINE %L "%F" *>%N' $*.nw > $*.m3
-.tex.dvi: ; latex '\scrollmode \input '"$*"; while grep -s 'Rerun to get cross-references right' $*.log; do latex '\scrollmode \input '"$*"; done
+.nw.html:
-+ $(NOWEAVE) -filter l2h -filter btdefn -index -html $*.nw > $*.html
++ $(NOWEAVE) -filter l2h -filter btdefn -index -html $< > $@
+.nw.tex:
-+ $(NOWEAVE) -index -filter btdefn $*.nw > $*.tex
++ $(NOWEAVE) -index -filter btdefn $< > $@
+.nw.i3:
-+ $(NOTANGLE) -Rinterface -L'<* LINE %L "%F" *>%N' $*.nw > $*.i3
++ $(NOTANGLE) -Rinterface -L'<* LINE %L "%F" *>%N' $< > $@
+.nw.m3:
-+ $(NOTANGLE) -L'<* LINE %L "%F" *>%N' $*.nw > $*.m3
++ $(NOTANGLE) -L'<* LINE %L "%F" *>%N' $< > $@
+.tex.dvi:
+ latex '\scrollmode \input '"$*"; while grep -s 'Rerun to get cross-references right' $*.log; do latex '\scrollmode \input '"$*"; done
@@ -405,13 +571,13 @@ diff --git a/examples/Makefile.awk b/examples/Makefile.awk
-.nw.m3: ; $(NOTANGLE) -L'<* LINE %L "%F" *>%N' $*.nw > $*.m3
-.tex.dvi: ; latex '\scrollmode \input '"$*"; while grep -s 'Rerun to get cross-references right' $*.log; do latex '\scrollmode \input '"$*"; done
+.nw.html:
-+ $(NOWEAVE) -filter btdefn -index -html $*.nw > $*.html
++ $(NOWEAVE) -filter btdefn -index -html $< > $@
+.nw.tex:
-+ $(NOWEAVE) -index -filter btdefn $*.nw > $*.tex
++ $(NOWEAVE) -index -filter btdefn $< > $@
+.nw.i3:
-+ $(NOTANGLE) -Rinterface -L'<* LINE %L "%F" *>%N' $*.nw > $*.i3
++ $(NOTANGLE) -Rinterface -L'<* LINE %L "%F" *>%N' $< > $@
+.nw.m3:
-+ $(NOTANGLE) -L'<* LINE %L "%F" *>%N' $*.nw > $*.m3
++ $(NOTANGLE) -L'<* LINE %L "%F" *>%N' $< > $@
+.tex.dvi:
+ latex '\scrollmode \input '"$*"; while grep -s 'Rerun to get cross-references right' $*.log; do latex '\scrollmode \input '"$*"; done
@@ -478,7 +644,21 @@ diff --git a/examples/Makefile.awk b/examples/Makefile.awk
diff --git a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
-@@ -27,7 +27,7 @@
+@@ -18,16 +18,17 @@
+ # MAN7EXT is the extension for the nowebstyle man page (usually 7)
+ # TEXINPUTS is the directory for TeX macro files
+ # ELISP is the directory for emacs lisp files, or /dev/null not to install
+-BIN=/usr/local/noweb
+-LIB=/usr/local/noweb/lib
+-MAN=/usr/local/noweb/man
++PREFIX=/usr/local
++BIN=$(PREFIX)/bin
++LIB=$(PREFIX)/libexec/noweb
++MAN=$(PREFIX)/share/man
+ MANEXT=1
+ MAN7EXT=7
+-TEXINPUTS=/usr/local/tex/inputs
++TEXINPUTS=$(PREFIX)/tex/inputs
ELISP=/dev/null
# change WEAVE if you want a different version of noweave to be installed
@@ -487,7 +667,7 @@ diff --git a/src/Makefile b/src/Makefile
# Stop editing. No user-serviceable parts below.
SHELL=/bin/sh
-@@ -37,183 +37,181 @@
+@@ -37,186 +38,183 @@
MAN7DIR=$(MAN)/man$(MAN7EXT)
CATDIR=$(MAN)/cat$(MANEXT)
CAT7DIR=$(MAN)/cat$(MAN7EXT)
@@ -499,9 +679,9 @@ diff --git a/src/Makefile b/src/Makefile
- for i in shell lib xdoc tex; do (cd $$i; make all); done
- cd $(LIBSRC); make "ICONT=$(ICONT)" "ICONC=$(ICONC)" all
+all:
-+ $(MAKE) -C c "CC=$(CC)" "CFLAGS=$(CFLAGS)" all
-+ for i in shell lib xdoc tex; do ($(MAKE) -C $$i all); done
-+ $(MAKE) -C $(LIBSRC) "ICONT=$(ICONT)" "ICONC=$(ICONC)" all
++ $(MAKE) -C c "CC=$(CC)" "CFLAGS=$(CFLAGS)" $@
++ for i in shell lib xdoc tex; do $(MAKE) -C $$i $@; done
++ $(MAKE) -C $(LIBSRC) "ICONT=$(ICONT)" "ICONC=$(ICONC)" $@
FAQ: FAQ.html
- sleep 1; html2ascii FAQ.html > FAQ
@@ -517,11 +697,11 @@ diff --git a/src/Makefile b/src/Makefile
install: install-code install-man install-tex install-elisp
uninstall: uninstall-code uninstall-man uninstall-tex uninstall-elisp
-- -rmdir $(BIN) $(LIB) 2>/dev/null
-+ -rmdir $(DESTDIR)$(BIN) $(DESTDIR)$(LIB) 2>/dev/null
+- -rmdir $(BIN) $(LIB) 2>/dev/null || true
++ -rmdir $(DESTDIR)$(BIN) $(DESTDIR)$(LIB) 2>/dev/null || true
install-shell:
-- -mkdir $(BIN) $(LIB) 2>/dev/null
+- mkdir -p $(BIN) $(LIB)
- sed "s@|LIBDIR|@$(LIBNAME)@" shell/noweb > $(BIN)/noweb
- chmod +x $(BIN)/noweb
- sed "s@|LIBDIR|@$(LIBNAME)@" shell/notangle > $(BIN)/notangle
@@ -582,7 +762,7 @@ diff --git a/src/Makefile b/src/Makefile
- rm -f $(BIN)/htmltoc
- rm -f $(BIN)/noroff
- rm -f $(LIB)/toroff
-- rm $(LIB)/tmac.w
+- rm -f $(LIB)/tmac.w
+ $(RM) $(DESTDIR)$(BIN)/noweb
+ $(RM) $(DESTDIR)$(BIN)/notangle
+ $(RM) $(DESTDIR)$(BIN)/$(WEAVE)
@@ -597,25 +777,25 @@ diff --git a/src/Makefile b/src/Makefile
+ $(RM) $(DESTDIR)$(LIB)/tmac.w
install-code: install-shell
-- -mkdir $(BIN) $(LIB) 2>/dev/null
+- mkdir -p $(BIN) $(LIB)
+ mkdir -p $(DESTDIR)$(BIN) $(DESTDIR)$(LIB)
- strip c/nt c/markup c/mnt c/finduses
-- cp c/nt c/markup c/mnt c/finduses $(LIB)
+ strip c/nt c/markup c/mnt c/finduses c/nwmktemp
+- cp c/nt c/markup c/mnt c/finduses c/nwmktemp $(LIB)
- cd $(LIBSRC); make ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install
- cd lib; make LIB=$(LIB) install
-+ cp c/nt c/markup c/mnt c/finduses $(DESTDIR)$(LIB)
-+ $(MAKE) -C $(LIBSRC) DESTDIR=$(DESTDIR) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install
-+ $(MAKE) -C lib DESTDIR=$(DESTDIR) LIB=$(LIB) install
++ cp c/nt c/markup c/mnt c/finduses c/nwmktemp $(DESTDIR)$(LIB)
++ $(MAKE) -C $(LIBSRC) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install
++ $(MAKE) -C lib LIB=$(LIB) install
uninstall-code: uninstall-shell
-- rm $(LIB)/nt $(LIB)/markup $(LIB)/mnt $(LIB)/finduses
+- rm -f $(LIB)/nt $(LIB)/markup $(LIB)/mnt $(LIB)/finduses
- cd $(LIBSRC); make ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall
- cd lib; make LIB=$(LIB) uninstall
-+ $(RM) $(DESTDIR)$(LIB)/nt $(DESTDIR)$(LIB)/markup $(DESTDIR)$(LIB)/mnt $(DESTDIR)$(LIB)/finduses
-+ $(MAKE) -C $(LIBSRC) DESTDIR=$(DESTDIR) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall
-+ $(MAKE) -C lib DESTDIR=$(DESTDIR) LIB=$(LIB) uninstall
++ $(RM) $(DESTDIR)$(LIB)/nt $(DESTDIR)$(LIB)/markup $(DESTDIR)$(LIB)/mnt $(DESTDIR)$(LIB)/finduses $(DESTDIR)$(LIB)/nwmktemp
++ $(MAKE) -C $(LIBSRC) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall
++ $(MAKE) -C lib LIB=$(LIB) uninstall
install-man:
-- -mkdir $(MAN) $(MANDIR) $(MAN7DIR) 2>/dev/null
+- mkdir -p $(MAN) $(MANDIR) $(MAN7DIR)
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/cpif.1 > $(MANDIR)/cpif.$(MANEXT)
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/nodefs.1 > $(MANDIR)/nodefs.$(MANEXT)
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/noroots.1 > $(MANDIR)/noroots.$(MANEXT)
@@ -664,6 +844,7 @@ diff --git a/src/Makefile b/src/Makefile
- rm -f $(MAN7DIR)/nowebfilters.$(MAN7EXT)
- rm -f $(MANDIR)/noweave.$(MANEXT)
- rm -f $(MANDIR)/nountangle.$(MANEXT)
+- -rmdir $(MANDIR) $(MAN7DIR) $(MAN) 2>/dev/null || true
+ $(RM) $(DESTDIR)$(MANDIR)/cpif.$(MANEXT)
+ $(RM) $(DESTDIR)$(MANDIR)/nodefs.$(MANEXT)
+ $(RM) $(DESTDIR)$(MANDIR)/noroots.$(MANEXT)
@@ -678,8 +859,9 @@ diff --git a/src/Makefile b/src/Makefile
+ $(RM) $(DESTDIR)$(MAN7DIR)/nowebfilters.$(MAN7EXT)
+ $(RM) $(DESTDIR)$(MANDIR)/noweave.$(MANEXT)
+ $(RM) $(DESTDIR)$(MANDIR)/nountangle.$(MANEXT)
++ -rmdir $(DESTDIR)$(MANDIR) $(DESTDIR)$(MAN7DIR) $(DESTDIR)$(MAN) 2>/dev/null || true
install-gzipped-man:
-- -mkdir $(MAN) $(MANDIR) $(MAN7DIR) 2>/dev/null
+- mkdir -p $(MAN) $(MANDIR) $(MAN7DIR)
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/cpif.1 | gzip -9 > $(MANDIR)/cpif.$(MANEXT).gz
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/nodefs.1 | gzip -9 > $(MANDIR)/nodefs.$(MANEXT).gz
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/noroots.1 | gzip -9 > $(MANDIR)/noroots.$(MANEXT).gz
@@ -715,7 +897,7 @@ diff --git a/src/Makefile b/src/Makefile
+ (cd $(DESTDIR)$(MANDIR) && ln -s notangle.$(MANEXT).gz nountangle.$(MANEXT).gz)
install-preformat-man:
-echo "Warning: install-preformat-man is obsolete, even on Slackware systems" 1>&2
-- -mkdir $(MAN) $(CATDIR) $(CAT7DIR) 2>/dev/null
+- mkdir -p $(MAN) $(CATDIR) $(CAT7DIR)
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/cpif.txt | gzip > $(CATDIR)/cpif.$(MANEXT).gz
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/nodefs.txt | gzip > $(CATDIR)/nodefs.$(MANEXT).gz
- sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/noroots.txt | gzip > $(CATDIR)/noroots.$(MANEXT).gz
@@ -750,51 +932,55 @@ diff --git a/src/Makefile b/src/Makefile
+ $(RM) $(DESTDIR)$(CATDIR)/nountangle.$(MANEXT).gz
+ (cd $(DESTDIR)$(CATDIR) && ln -s notangle.$(MANEXT).gz nountangle.$(MANEXT).gz)
install-tex:
-- -mkdir $(TEXINPUTS) 2>/dev/null
+- mkdir -p $(TEXINPUTS)
- cp tex/nwmac.tex tex/noweb.sty $(TEXINPUTS)
+ mkdir -p $(DESTDIR)$(TEXINPUTS)
+ cp tex/nwmac.tex tex/noweb.sty $(DESTDIR)$(TEXINPUTS)
-texhash || echo "Program texhash not found or failed"
uninstall-tex:
-- rm -f $(TEXINPUTS)/nwmac.tex $(TEXINPUTS)/noweb.sty
-+ $(RM) $(DESTDIR)$(TEXINPUTS)/nwmac.tex $(DESTDIR)$(TEXINPUTS)/noweb.sty
+- rm -f $(TEXINPUTS)/nwmac.tex $(TEXINPUTS)/noweb.sty || true
++ $(RM) $(DESTDIR)$(TEXINPUTS)/nwmac.tex $(DESTDIR)$(TEXINPUTS)/noweb.sty || true
install-elisp:
-- -mkdir $(ELISP) 2>/dev/null
+- if [ "/dev/null" != "$(ELISP)" ]; then mkdir -p $(ELISP); fi
- cp elisp/noweb-mode.el $(ELISP)
-+ mkdir -p $(DESTDIR)$(ELISP)
-+ cp elisp/noweb-mode.el $(DESTDIR)$(ELISP)
++ if [ "/dev/null" != "$(ELISP)" ]; then mkdir -p $(DESTDIR)$(ELISP) && cp elisp/noweb-mode.el $(DESTDIR)$(ELISP); fi
uninstall-elisp:
-- rm -f $(ELISP)/noweb-mode.el
-+ $(RM) $(DESTDIR)$(ELISP)/noweb-mode.el
+- rm -f $(ELISP)/noweb-mode.el || true
++ if [ "/dev/null" != "$(ELISP)" ]; then $(RM) $(DESTDIR)$(ELISP)/noweb-mode.el; fi
checkin:
- for i in lib tex xdoc; do (cd $$i; make "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin); done
-+ for i in lib tex xdoc; do ($(MAKE) -C $$i "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin); done
- for i in c icon awk; do (cd $$i; ci -l $(CINAME) $(CIMSG) *.nw Makefile); done
- (cd elisp; ci -l $(CINAME) $(CIMSG) *.el)
+- for i in c icon awk; do (cd $$i; ci -l $(CINAME) $(CIMSG) *.nw Makefile); done
+- (cd elisp; ci -l $(CINAME) $(CIMSG) *.el)
++ for i in lib tex xdoc; do $(MAKE) -C $$i "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" $@; done
++ for i in c icon awk; do (cd $$i && ci -l $(CINAME) $(CIMSG) *.nw Makefile); done
++ (cd elisp && ci -l $(CINAME) $(CIMSG) *.el)
ci -l $(CINAME) $(CIMSG) Makefile.nw INSTALL INSTALL.DOS README FAQ COPYRIGHT nwmake *.nw
source: FAQ
- for i in c shell lib xdoc icon awk tex; do (cd $$i; make CPIF=">" source); done
-+ for i in c shell lib xdoc icon awk tex; do ($(MAKE) -C $$i CPIF=">" source); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i CPIF=">" $@; done
sleep 1
- for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done
-+ for i in c shell lib xdoc icon awk tex; do ($(MAKE) -C $$i touch); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i touch; done
touch:
touch FAQ
- for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done
-+ for i in c shell lib xdoc icon awk tex; do ($(MAKE) -C $$i touch); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i $@; done
+ boot:
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make boot); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i $@; done
clean:
- for i in c shell lib xdoc icon awk tex; do (cd $$i; make clean); done
- rm -f nwsrcfilter *~ */*~
-+ for i in c shell lib xdoc icon awk tex; do ($(MAKE) -C $$i clean); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i $@; done
+ $(RM) nwsrcfilter *~ */*~
clobber: clean
-- for i in c lib icon awk xdoc; do (cd $$i; make clobber); done
-+ for i in c lib icon awk xdoc; do ($(MAKE) -C $$i clobber); done
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make clobber); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i $@; done
Makefile: Makefile.nw
- chmod +w Makefile
@@ -807,7 +993,21 @@ diff --git a/src/Makefile b/src/Makefile
diff --git a/src/Makefile.nw b/src/Makefile.nw
--- a/src/Makefile.nw
+++ b/src/Makefile.nw
-@@ -32,7 +32,7 @@
+@@ -23,16 +23,17 @@
+ # MAN7EXT is the extension for the nowebstyle man page (usually 7)
+ # TEXINPUTS is the directory for TeX macro files
+ # ELISP is the directory for emacs lisp files, or /dev/null not to install
+-BIN=/usr/local/noweb
+-LIB=/usr/local/noweb/lib
+-MAN=/usr/local/noweb/man
++PREFIX=/usr/local
++BIN=$(PREFIX)/bin
++LIB=$(PREFIX)/libexec/noweb
++MAN=$(PREFIX)/share/man
+ MANEXT=1
+ MAN7EXT=7
+-TEXINPUTS=/usr/local/tex/inputs
++TEXINPUTS=$(PREFIX)/tex/inputs
ELISP=/dev/null
# change WEAVE if you want a different version of noweave to be installed
@@ -816,7 +1016,7 @@ diff --git a/src/Makefile.nw b/src/Makefile.nw
# Stop editing. No user-serviceable parts below.
SHELL=/bin/sh
-@@ -42,46 +42,44 @@
+@@ -42,46 +43,44 @@
MAN7DIR=$(MAN)/man$(MAN7EXT)
CATDIR=$(MAN)/cat$(MANEXT)
CAT7DIR=$(MAN)/cat$(MAN7EXT)
@@ -828,9 +1028,9 @@ diff --git a/src/Makefile.nw b/src/Makefile.nw
- for i in shell lib xdoc tex; do (cd $$i; make all); done
- cd $(LIBSRC); make "ICONT=$(ICONT)" "ICONC=$(ICONC)" all
+all:
-+ $(MAKE) -C c "CC=$(CC)" "CFLAGS=$(CFLAGS)" all
-+ for i in shell lib xdoc tex; do ($(MAKE) -C $$i all); done
-+ $(MAKE) -C $(LIBSRC) "ICONT=$(ICONT)" "ICONC=$(ICONC)" all
++ $(MAKE) -C c "CC=$(CC)" "CFLAGS=$(CFLAGS)" $@
++ for i in shell lib xdoc tex; do $(MAKE) -C $$i $@; done
++ $(MAKE) -C $(LIBSRC) "ICONT=$(ICONT)" "ICONC=$(ICONC)" $@
FAQ: FAQ.html
- sleep 1; html2ascii FAQ.html > FAQ
@@ -846,11 +1046,11 @@ diff --git a/src/Makefile.nw b/src/Makefile.nw
install: install-code install-man install-tex install-elisp
uninstall: uninstall-code uninstall-man uninstall-tex uninstall-elisp
-- -rmdir $(BIN) $(LIB) 2>/dev/null
-+ -rmdir $(DESTDIR)$(BIN) $(DESTDIR)$(LIB) 2>/dev/null
+- -rmdir $(BIN) $(LIB) 2>/dev/null || true
++ -rmdir $(DESTDIR)$(BIN) $(DESTDIR)$(LIB) 2>/dev/null || true
install-shell:
-- -mkdir $(BIN) $(LIB) 2>/dev/null
+- mkdir -p $(BIN) $(LIB)
+ mkdir -p $(DESTDIR)$(BIN) $(DESTDIR)$(LIB)
<<shell binaries>>
- cp shell/tmac.w $(LIB)
@@ -858,31 +1058,31 @@ diff --git a/src/Makefile.nw b/src/Makefile.nw
uninstall-shell:
<<uninstall shell binaries>>
-- rm $(LIB)/tmac.w
+- rm -f $(LIB)/tmac.w
+ $(RM) $(DESTDIR)$(LIB)/tmac.w
install-code: install-shell
-- -mkdir $(BIN) $(LIB) 2>/dev/null
+- mkdir -p $(BIN) $(LIB)
+ mkdir -p $(DESTDIR)$(BIN) $(DESTDIR)$(LIB)
- strip c/nt c/markup c/mnt c/finduses
-- cp c/nt c/markup c/mnt c/finduses $(LIB)
+ strip c/nt c/markup c/mnt c/finduses c/nwmktemp
+- cp c/nt c/markup c/mnt c/finduses c/nwmktemp $(LIB)
- cd $(LIBSRC); make ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install
- cd lib; make LIB=$(LIB) install
-+ cp c/nt c/markup c/mnt c/finduses $(DESTDIR)$(LIB)
-+ $(MAKE) -C $(LIBSRC) DESTDIR=$(DESTDIR) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install
-+ $(MAKE) -C lib DESTDIR=$(DESTDIR) LIB=$(LIB) install
++ cp c/nt c/markup c/mnt c/finduses c/nwmktemp $(DESTDIR)$(LIB)
++ $(MAKE) -C $(LIBSRC) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install
++ $(MAKE) -C lib LIB=$(LIB) install
uninstall-code: uninstall-shell
-- rm $(LIB)/nt $(LIB)/markup $(LIB)/mnt $(LIB)/finduses
+- rm -f $(LIB)/nt $(LIB)/markup $(LIB)/mnt $(LIB)/finduses
- cd $(LIBSRC); make ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall
- cd lib; make LIB=$(LIB) uninstall
-+ $(RM) $(DESTDIR)$(LIB)/nt $(DESTDIR)$(LIB)/markup $(DESTDIR)$(LIB)/mnt $(DESTDIR)$(LIB)/finduses
-+ $(MAKE) -C $(LIBSRC) DESTDIR=$(DESTDIR) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall
-+ $(MAKE) -C lib DESTDIR=$(DESTDIR) LIB=$(LIB) uninstall
++ $(RM) $(DESTDIR)$(LIB)/nt $(DESTDIR)$(LIB)/markup $(DESTDIR)$(LIB)/mnt $(DESTDIR)$(LIB)/finduses $(DESTDIR)$(LIB)/nwmktemp
++ $(MAKE) -C $(LIBSRC) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall
++ $(MAKE) -C lib LIB=$(LIB) uninstall
@ I do the [[<<shell binaries>>]] before [[$(LIBSRC)]] so that the
Icon version of [[htmltoc]], if present, will overwrite the Perl
version.
-@@ -91,36 +89,36 @@
+@@ -91,37 +90,37 @@
noroff
do
echo '@<<shell binaries@>>='
@@ -907,29 +1107,31 @@ diff --git a/src/Makefile.nw b/src/Makefile.nw
done
<<*>>=
install-man:
-- -mkdir $(MAN) $(MANDIR) $(MAN7DIR) 2>/dev/null
+- mkdir -p $(MAN) $(MANDIR) $(MAN7DIR)
+ mkdir -p $(DESTDIR)$(MANDIR) $(DESTDIR)$(MAN7DIR)
<<ordinary pages>>
uninstall-man:
<<uninstall ordinary pages>>
+- -rmdir $(MANDIR) $(MAN7DIR) $(MAN) 2>/dev/null || true
-@
++ -rmdir $(DESTDIR)$(MANDIR) $(DESTDIR)$(MAN7DIR) $(DESTDIR)$(MAN) 2>/dev/null || true
+@
Slackware no longer uses preformatted compressed pages, just
compressed pages.
<<*>>=
install-gzipped-man:
-- -mkdir $(MAN) $(MANDIR) $(MAN7DIR) 2>/dev/null
+- mkdir -p $(MAN) $(MANDIR) $(MAN7DIR)
+ mkdir -p $(DESTDIR)$(MANDIR) $(DESTDIR)$(MAN7DIR)
<<compressed pages>>
<<*>>=
install-preformat-man:
-echo "Warning: install-preformat-man is obsolete, even on Slackware systems" 1>&2
-- -mkdir $(MAN) $(CATDIR) $(CAT7DIR) 2>/dev/null
+- mkdir -p $(MAN) $(CATDIR) $(CAT7DIR)
+ mkdir -p $(DESTDIR)$(CATDIR) $(DESTDIR)$(CAT7DIR)
<<preformatted compressed pages>>
<<generate chunks>>=
NORMALPAGES="cpif nodefs noroots noweb noindex nuweb2noweb notangle noroff sl2h htmltoc"
-@@ -130,96 +128,96 @@
+@@ -131,98 +130,97 @@
for i in $NORMALPAGES; do
echo '@<<ordinary pages@>>='
@@ -1008,54 +1210,58 @@ diff --git a/src/Makefile.nw b/src/Makefile.nw
done
<<*>>=
install-tex:
-- -mkdir $(TEXINPUTS) 2>/dev/null
+- mkdir -p $(TEXINPUTS)
- cp tex/nwmac.tex tex/noweb.sty $(TEXINPUTS)
+ mkdir -p $(DESTDIR)$(TEXINPUTS)
+ cp tex/nwmac.tex tex/noweb.sty $(DESTDIR)$(TEXINPUTS)
-texhash || echo "Program texhash not found or failed"
uninstall-tex:
-- rm -f $(TEXINPUTS)/nwmac.tex $(TEXINPUTS)/noweb.sty
-+ $(RM) $(DESTDIR)$(TEXINPUTS)/nwmac.tex $(DESTDIR)$(TEXINPUTS)/noweb.sty
+- rm -f $(TEXINPUTS)/nwmac.tex $(TEXINPUTS)/noweb.sty || true
++ $(RM) $(DESTDIR)$(TEXINPUTS)/nwmac.tex $(DESTDIR)$(TEXINPUTS)/noweb.sty || true
install-elisp:
-- -mkdir $(ELISP) 2>/dev/null
+- if [ "/dev/null" != "$(ELISP)" ]; then mkdir -p $(ELISP); fi
- cp elisp/noweb-mode.el $(ELISP)
-+ mkdir -p $(DESTDIR)$(ELISP)
-+ cp elisp/noweb-mode.el $(DESTDIR)$(ELISP)
++ if [ "/dev/null" != "$(ELISP)" ]; then mkdir -p $(DESTDIR)$(ELISP) && cp elisp/noweb-mode.el $(DESTDIR)$(ELISP); fi
uninstall-elisp:
-- rm -f $(ELISP)/noweb-mode.el
+- rm -f $(ELISP)/noweb-mode.el || true
-@
-+ $(RM) $(DESTDIR)$(ELISP)/noweb-mode.el
++ if [ "/dev/null" != "$(ELISP)" ]; then $(RM) $(DESTDIR)$(ELISP)/noweb-mode.el; fi
+@
<<*>>=
checkin:
- for i in lib tex xdoc; do (cd $$i; make "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin); done
-+ for i in lib tex xdoc; do ($(MAKE) -C $$i "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin); done
- for i in c icon awk; do (cd $$i; ci -l $(CINAME) $(CIMSG) *.nw Makefile); done
- (cd elisp; ci -l $(CINAME) $(CIMSG) *.el)
+- for i in c icon awk; do (cd $$i; ci -l $(CINAME) $(CIMSG) *.nw Makefile); done
+- (cd elisp; ci -l $(CINAME) $(CIMSG) *.el)
++ for i in lib tex xdoc; do $(MAKE) -C $$i "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" $@; done
++ for i in c icon awk; do (cd $$i && ci -l $(CINAME) $(CIMSG) *.nw Makefile); done
++ (cd elisp && ci -l $(CINAME) $(CIMSG) *.el)
ci -l $(CINAME) $(CIMSG) Makefile.nw INSTALL INSTALL.DOS README FAQ COPYRIGHT nwmake *.nw
source: FAQ
- for i in c shell lib xdoc icon awk tex; do (cd $$i; make CPIF=">" source); done
-+ for i in c shell lib xdoc icon awk tex; do ($(MAKE) -C $$i CPIF=">" source); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i CPIF=">" $@; done
sleep 1
- for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done
-+ for i in c shell lib xdoc icon awk tex; do ($(MAKE) -C $$i touch); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i touch; done
touch:
touch FAQ
- for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done
-+ for i in c shell lib xdoc icon awk tex; do ($(MAKE) -C $$i touch); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i $@; done
+ boot:
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make boot); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i $@; done
clean:
- for i in c shell lib xdoc icon awk tex; do (cd $$i; make clean); done
- rm -f nwsrcfilter *~ */*~
-+ for i in c shell lib xdoc icon awk tex; do ($(MAKE) -C $$i clean); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i $@; done
+ $(RM) nwsrcfilter *~ */*~
clobber: clean
-- for i in c lib icon awk xdoc; do (cd $$i; make clobber); done
-+ for i in c lib icon awk xdoc; do ($(MAKE) -C $$i clobber); done
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make clobber); done
++ for i in c shell lib xdoc icon awk tex; do $(MAKE) -C $$i $@; done
Makefile: Makefile.nw
- chmod +w Makefile
@@ -1067,45 +1273,59 @@ diff --git a/src/Makefile.nw b/src/Makefile.nw
diff --git a/src/awk/Makefile b/src/awk/Makefile
--- a/src/awk/Makefile
+++ b/src/awk/Makefile
-@@ -6,33 +6,34 @@
- SHELL=/bin/sh
-
- LIBEXECS=totex noidx tohtml
+@@ -8,11 +8,10 @@
+ LIBEXECSBARE=noidx tohtml
+ LIBEXECSDEP=totex
+ LIBEXECS=$(LIBEXECSBARE) $(LIBEXECSDEP)
-BINEXECS=noindex
+BINEXECS=noindex
EXECS=$(BINEXECS) $(LIBEXECS)
-all: $(EXECS)
+- chmod +x $(EXECS)
+all: $(EXECS)
- chmod +x $(EXECS)
sources: $(EXECS)
touch: $(EXECS)
touch $(EXECS)
+@@ -20,28 +19,33 @@
+ touch $(EXECS)
install: all
-- cp $(LIBEXECS) $(LIB)
+- cp $(LIBEXECSBARE) $(LIB)
+- for i in $(LIBEXECSDEP); do sed "s@|LIBDIR|@$(LIB)@" "$$i" > $(LIB)/"$$i"; chmod +x $(LIB)/$$i; done
- cp $(BINEXECS) $(BIN)
-+ cp $(LIBEXECS) $(DESTDIR)$(LIB)
++ cp $(LIBEXECSBARE) $(DESTDIR)$(LIB)
++ for i in $(LIBEXECSDEP); do sed "s@|LIBDIR|@$(LIB)@" "$$i" > $(DESTDIR)$(LIB)/"$$i"; chmod +x $(DESTDIR)$(LIB)/$$i; done
+ cp $(BINEXECS) $(DESTDIR)$(BIN)
+ uninstall:
+- for i in $(LIBEXECS); do rm -f $(LIB)/$$i; done
+- for i in $(BINEXECS); do rm -f $(BIN)/$$i; done
++ for i in $(LIBEXECS); do $(RM) $(DESTDIR)$(LIB)/$$i; done
++ for i in $(BINEXECS); do $(RM) $(DESTDIR)$(BIN)/$$i; done
+
source: $(EXECS)
totex: totex.nw
- notangle -Rtotex totex.nw > totex
-+ notangle -Rtotex $< > $@
++ notangle -R$@ $< > $@
++ chmod +x $@
noidx: noidx.nw
- notangle noidx.nw > noidx
+ notangle $< > $@
++ chmod +x $@
tohtml: tohtml.nw
- notangle tohtml.nw > tohtml
+ notangle $< > $@
++ chmod +x $@
-noindex: noindex.nw
- notangle -Rnoindex noindex.nw > noindex
+noindex: noindex.nw
-+ notangle -Rnoindex $< > $@
++ notangle -R$@ $< > $@
++ chmod +x $@
-clean: ; rm -f *.log *.blg *.dvi *.toc *.aux *.tex *~ *.html
+clean:
@@ -1116,7 +1336,7 @@ diff --git a/src/awk/Makefile b/src/awk/Makefile
diff --git a/src/c/Makefile b/src/c/Makefile
--- a/src/c/Makefile
+++ b/src/c/Makefile
-@@ -14,15 +14,15 @@
+@@ -14,9 +14,9 @@
main.o errors.o columns.o
MARKUPOBJS=markmain.o strsave.o markup.o errors.o getline.o columns.o
FILES=markmain.nw markup.nw \
@@ -1129,14 +1349,7 @@ diff --git a/src/c/Makefile b/src/c/Makefile
SRCS=columns.h errors.h getline.h markup.h match.h modtrees.h \
modules.h notangle.h recognize.h strsave.h \
- columns.c errors.c getline.c finduses.c main.c markmain.c markup.c match.c \
- mnt.c modtrees.c modules.c notangle.c readme.c recognize.c strsave.c \
-- markup.ps
-+ markup.ps
- NAME='name of RCS version'
-
- NOTANGLE=notangle
-@@ -32,76 +32,76 @@
+@@ -32,81 +32,78 @@
CPIF=>
.SUFFIXES: .nw .tex .dvi .h
@@ -1146,29 +1359,29 @@ diff --git a/src/c/Makefile b/src/c/Makefile
- $(CC) $(CFLAGS) -c $*.c
-.nw.h: ; $(NOTANGLE) -Rheader $*.nw $(CPIF) $*.h
+.nw.tex:
-+ noweave $*.nw >$*.tex
++ noweave $< >$@
+.nw.c:
-+ $(NOTANGLE) -L $*.nw >$*.c
-+.nw.o:
-+ $(NOTANGLE) -L $*.nw >$*.c
-+ $(CC) $(CFLAGS) -c $*.c
++ $(NOTANGLE) -L $< >$@
+.nw.h:
-+ $(NOTANGLE) -Rheader $*.nw $(CPIF) $*.h
++ $(NOTANGLE) -Rheader $< $(CPIF) $@
--all: nt markup mnt finduses
-+all: nt markup mnt finduses
+-all: nt markup mnt finduses nwmktemp
++all: nt markup mnt finduses nwmktemp
-nt: $(TANGLEOBJS)
- $(CC) $(CFLAGS) -o nt $(TANGLEOBJS)
+nt: $(TANGLEOBJS)
+ $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
--finduses: $(FINDUSESOBJS)
-- $(CC) $(CFLAGS) -o finduses $(FINDUSESOBJS)
+ nwmktemp: nwmktemp.o
+- $(CC) $(CFLAGS) -o nwmktemp nwmktemp.o
+finduses: $(FINDUSESOBJS)
+markup: $(MARKUPOBJS)
+mnt: $(MNTOBJS)
+-finduses: $(FINDUSESOBJS)
+- $(CC) $(CFLAGS) -o finduses $(FINDUSESOBJS)
+-
-markup: $(MARKUPOBJS)
- $(CC) $(CFLAGS) -o markup $(MARKUPOBJS)
-
@@ -1180,6 +1393,10 @@ diff --git a/src/c/Makefile b/src/c/Makefile
touch: $(SRCS)
touch $(SRCS)
+-boot: ; touch $(SRCS)
++boot:
++ touch $(SRCS)
+
-clean: ; rm -f nt markup mnt finduses fakepretty
- rm -f core *.makelog *.tex *.log *.blg *.dvi *.o *.toc *~
- rm -f *.atac *.trace *.html
@@ -1228,7 +1445,7 @@ diff --git a/src/c/Makefile b/src/c/Makefile
fakepretty: $(FPOBJS)
- $(CC) $(CFLAGS) -o fakepretty $(FPOBJS)
--
+
-columns.o: columns.h
-errors.o: errors.h
-finduses.o: errors.h match.h getline.h recognize.h
@@ -1245,10 +1462,6 @@ diff --git a/src/c/Makefile b/src/c/Makefile
-modtrees.o: strsave.h modules.h modtrees.h errors.h
-modules.o: modules.h modtrees.h errors.h columns.h strsave.h
-notangle.o: strsave.h getline.h modules.h modtrees.h errors.h match.h notangle.h
--pretty.o: getline.h match.h errors.h pretty.h strsave.h
--readme.o:
--recognize.o:
--strsave.o: strsave.h errors.h
+markmain.o: errors.h markup.h getline.h columns.h
+markup.o: markup.h strsave.h errors.h
+match.o: match.h
@@ -1256,14 +1469,17 @@ diff --git a/src/c/Makefile b/src/c/Makefile
+modtrees.o: strsave.h modules.h modtrees.h errors.h
+modules.o: modules.h modtrees.h errors.h columns.h strsave.h
+notangle.o: strsave.h getline.h modules.h modtrees.h errors.h match.h notangle.h
+ nwmktemp.o:
+-pretty.o: getline.h match.h errors.h pretty.h strsave.h
+-recognize.o:
+-strsave.o: strsave.h errors.h
+pretty.o: getline.h match.h errors.h pretty.h strsave.h
-+readme.o:
+recognize.o:
+strsave.o: strsave.h errors.h
diff --git a/src/icon/Makefile b/src/icon/Makefile
--- a/src/icon/Makefile
+++ b/src/icon/Makefile
-@@ -6,13 +6,13 @@
+@@ -6,23 +6,23 @@
CPIF=| cpif # change to ">" to insure all sources always made
LIBEXECS=totex disambiguate noidx tohtml elide l2h docs2comments \
@@ -1272,24 +1488,47 @@ diff --git a/src/icon/Makefile b/src/icon/Makefile
autodefs.promela autodefs.lrtl autodefs.asdl autodefs.mmix xchunks pipedocs
LIBSPECIAL=autodefs.cee
BINEXECS=noindex sl2h htmltoc
- EXECS=$(LIBEXECS) $(BINEXECS) $(LIBSPECIAL)
+ EXECS=$(LIBEXECS) $(BINEXECS) $(LIBSPECIAL) pdcached
SRCS=totex.icn disambiguate.icn noidx.icn texdefs.icn icondefs.icn \
- yaccdefs.icn noindex.icn smldefs.icn tohtml.icn cdefs.icn elide.icn \
+ yaccdefs.icn noindex.icn smldefs.icn tohtml.icn cdefs.icn elide.icn \
l2h.icn sl2h.icn pascaldefs.icn promeladefs.icn lrtldefs.icn asdldefs.icn \
- mmixdefs.icn htmltoc.icn xchunks.icn
-
-@@ -32,112 +32,112 @@
+ mmixdefs.icn htmltoc.icn xchunks.icn docs2comments.icn pipedocs.icn pdcached.icn
+
+ .SUFFIXES: .nw .icn .html .tex .dvi
+ .nw.icn:
+- notangle -L'#line %-1L "%F"%N' $*.nw $(CPIF) $*.icn
++ notangle -L'#line %-1L "%F"%N' $< $(CPIF) $@
+ .nw.html:
+- noweave -filter l2h -autodefs icon -html -index $*.nw | htmltoc > $*.html
++ noweave -filter l2h -autodefs icon -html -index $< | htmltoc > $@
+ .nw.tex:
+- noweave -delay -autodefs icon -index $*.nw > $*.tex
++ noweave -delay -autodefs icon -index $< > $@
+ .tex.dvi:
+ latex $*; while grep -s 'Rerun to get cross' $*.log; do latex $*; done
+
+@@ -34,118 +34,118 @@
+ boot:
touch $(SRCS)
- install: $(EXECS)
+-install: $(EXECS)
- cp $(LIBEXECS) $(LIB)
- cp $(BINEXECS) $(BIN)
- cp $(LIBSPECIAL) $(LIB)/autodefs.c
++install: all
+ cp $(LIBEXECS) $(DESTDIR)$(LIB)
+ cp $(BINEXECS) $(DESTDIR)$(BIN)
+ cp $(LIBSPECIAL) $(DESTDIR)$(LIB)/autodefs.c
+ uninstall:
+- for i in $(LIBEXECS); do rm -f $(LIB)/$$i; done
+- for i in $(BINEXECS); do rm -f $(BIN)/$$i; done
+- rm -f $(LIB)/autodefs.c
++ for i in $(LIBEXECS); do $(RM) $(DESTDIR)$(LIB)/$$i; done
++ for i in $(BINEXECS); do $(RM) $(DESTDIR)$(BIN)/$$i; done
++ $(RM) $(DESTDIR)$(LIB)/autodefs.c
+
clean:
- /bin/rm -f *.tex *.dvi *.aux *.log *.blg *.bbl *~ *.toc *.html *.u1 *.u2
- /bin/rm -f *.[ch] *.ps *.gz
@@ -1397,14 +1636,14 @@ diff --git a/src/icon/Makefile b/src/icon/Makefile
l2h.icn: l2h.nw
- notangle -L'#line %-1L "%F"%N' -R'l2h.icn' l2h.nw $(CPIF) l2h.icn
-+ notangle -L'#line %-1L "%F"%N' -R'l2h.icn' $< $(CPIF) $@
++ notangle -L'#line %-1L "%F"%N' -R$@ $< $(CPIF) $@
l2h: l2h.icn
- $(ICONT) -o l2h l2h.icn # no longer compiles with iconc
+ $(ICONT) -o $@ $< # no longer compiles with iconc
sl2h.icn: l2h.nw
- notangle -L'#line %-1L "%F"%N' -R'sl2h.icn' l2h.nw $(CPIF) sl2h.icn
-+ notangle -L'#line %-1L "%F"%N' -R'sl2h.icn' $< $(CPIF) $@
++ notangle -L'#line %-1L "%F"%N' -R$@ $< $(CPIF) $@
sl2h: sl2h.icn
- $(ICONT) -o sl2h sl2h.icn # no longer compiles with iconc
+ $(ICONT) -o $@ $< # no longer compiles with iconc
@@ -1439,25 +1678,35 @@ diff --git a/src/icon/Makefile b/src/icon/Makefile
diff --git a/src/lib/Makefile b/src/lib/Makefile
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
-@@ -11,9 +11,9 @@
+@@ -11,15 +11,14 @@
chmod +x unmarkup emptydefn toascii nwmtime pipedocs h2a btdefn
install: all
-- cp unmarkup emptydefn toascii nwmtime h2a btdefn $(LIB)
+- cp unmarkup emptydefn nwmtime btdefn $(LIB)
- sed 's@|LIBDIR|@$(LIB)@g' pipedocs > $(LIB)/pipedocs
-- chmod +x $(LIB)/pipedocs
-+ cp unmarkup emptydefn toascii nwmtime h2a btdefn $(DESTDIR)$(LIB)
+- sed 's@|LIBDIR|@$(LIB)@g' toascii > $(LIB)/toascii
+- sed 's@|LIBDIR|@$(LIB)@g' h2a > $(LIB)/h2a
+- chmod +x $(LIB)/pipedocs $(LIB)/toascii $(LIB)/h2a
++ cp unmarkup emptydefn nwmtime btdefn $(DESTDIR)$(LIB)
+ sed 's@|LIBDIR|@$(LIB)@g' pipedocs > $(DESTDIR)$(LIB)/pipedocs
-+ chmod +x $(DESTDIR)$(LIB)/pipedocs
++ sed 's@|LIBDIR|@$(LIB)@g' toascii > $(DESTDIR)$(LIB)/toascii
++ sed 's@|LIBDIR|@$(LIB)@g' h2a > $(DESTDIR)$(LIB)/h2a
++ chmod +x $(DESTDIR)$(LIB)/pipedocs $(DESTDIR)$(LIB)/toascii $(DESTDIR)$(LIB)/h2a
+
+ uninstall:
+- for i in unmarkup emptydefn toascii nwmtime h2a btdefn; do rm -f $(LIB)/$$i; done
+- rm -f $(LIB)/pipedocs
++ for i in unmarkup emptydefn toascii nwmtime pipedocs h2a btdefn; do $(RM) $(DESTDIR)$(LIB)/$$i; done
checkin:
ci -l $(CINAME) $(CIMSG) $(RCSFILES)
-@@ -23,8 +23,9 @@
+@@ -31,8 +30,10 @@
touch toascii
toascii: toascii.nw
- notangle -Rtoascii toascii.nw > toascii
-+ notangle -Rtoascii $< > $@
++ notangle -R$@ $< > $@
++ chmod +x $@
-clean: ; rm -f *.log *.blg *.dvi *.toc *.aux *.tex *~
+clean:
@@ -1468,7 +1717,15 @@ diff --git a/src/lib/Makefile b/src/lib/Makefile
diff --git a/src/shell/Makefile b/src/shell/Makefile
--- a/src/shell/Makefile
+++ b/src/shell/Makefile
-@@ -9,25 +9,27 @@
+@@ -1,7 +1,6 @@
+ # Copyright 1993 by Norman Ramsey. All rights reserved.
+ # See file COPYRIGHT for more information.
+ SHELL=/bin/sh
+-LIB=/usr/public/pkg/noweb/lib
+
+ EXEC=noweave noweb notangle noroff toroff
+ SRCS=$(EXEC) tmac.w
+@@ -9,9 +8,9 @@
CINAME=
CIMSG=
@@ -1478,46 +1735,47 @@ diff --git a/src/shell/Makefile b/src/shell/Makefile
-touch: $(SRCS)
+touch: $(SRCS)
touch $(SRCS)
-
- checkin:
+ boot:
+ touch $(SRCS)
+@@ -20,16 +19,18 @@
ci -l $(CINAME) $(CIMSG) $(RCSFILES)
noweave: noweave.nw
- notangle -Rnoweave noweave.nw > noweave
-+ notangle -Rnoweave $< > $@
++ notangle -R$@ $< > $@
notangle: notangle.nw
- notangle -Rnotangle notangle.nw > notangle
-+ notangle -Rnotangle $< > $@
++ notangle -R$@ $< > $@
-noweb: noweb.nw
- notangle -Rnoweb noweb.nw > noweb
+noweb: noweb.nw
-+ notangle -Rnoweb $< > $@
++ notangle -R$@ $< > $@
noroff toroff tmac.w: roff.nw
- noweb -t roff.nw
+ noweb -t $<
--clean: ; rm -f *.log *.blg *.dvi *.toc *.aux *.tex *~
+-clean: ; rm -f *.log *.blg *.dvi *.toc *.aux *.tex *~ *.nwt roff.mm
-clobber: clean ; rm -f $(SRCS)
+clean:
-+ $(RM) *.log *.blg *.dvi *.toc *.aux *.tex *~
++ $(RM) *.log *.blg *.dvi *.toc *.aux *.tex *~ *.nwt roff.mm
+clobber: clean
+ $(RM) $(SRCS)
diff --git a/src/tex/Makefile b/src/tex/Makefile
--- a/src/tex/Makefile
+++ b/src/tex/Makefile
-@@ -12,14 +12,14 @@
+@@ -14,15 +14,15 @@
ci -l $(CINAME) $(CIMSG) $(RCSFILES)
nwmac.tex: support.nw
- notangle -Rnwmac.tex support.nw > nwmac.tex
-+ notangle -Rnwmac.tex $< > $@
++ notangle -R$@ $< > $@
noweb.sty: support.nw
- notangle -Rnoweb.sty support.nw > noweb.sty
-+ notangle -Rnoweb.sty $< > $@
++ notangle -R$@ $< > $@
support.tex: support.nw
- noweave -delay -x support.nw > support.tex
@@ -1529,6 +1787,7 @@ diff --git a/src/tex/Makefile b/src/tex/Makefile
+clean:
+ $(RM) *~ *.dvi *.aux *.log *.blg *.bbl *.toc
+ $(RM) support.tex
+ clobber: clean
diff --git a/src/xdoc/Makefile b/src/xdoc/Makefile
--- a/src/xdoc/Makefile
+++ b/src/xdoc/Makefile
@@ -1541,13 +1800,13 @@ diff --git a/src/xdoc/Makefile b/src/xdoc/Makefile
-.7.txt: ; nroff -man $*.7 > $*.txt
-.7.ps: ; psroff -t -man $*.7 > $*.ps
+.1.txt:
-+ nroff -man $*.1 > $*.txt
++ nroff -man $< > $@
+.1.ps:
-+ psroff -t -man $*.1 > $*.ps
++ psroff -t -man $< > $@
+.7.txt:
-+ nroff -man $*.7 > $*.txt
++ nroff -man $< > $@
+.7.ps:
-+ psroff -t -man $*.7 > $*.ps
++ psroff -t -man $< > $@
MANPAGES=notangle.1 cpif.1 noweb.1 nodefs.1 noroots.1 noindex.1 \
- nowebstyle.7 nowebfilters.7 nuweb2noweb.1 sl2h.1 htmltoc.1 \
@@ -1559,7 +1818,7 @@ diff --git a/src/xdoc/Makefile b/src/xdoc/Makefile
noroff.txt
SRCS=$(MANPAGES) $(TXTPAGES)
-@@ -30,52 +34,52 @@
+@@ -32,52 +36,52 @@
ci -l $(CINAME) $(CIMSG) $(RCSFILES)
$(WWW)/onepage.ps: onepage.ps
@@ -1576,11 +1835,11 @@ diff --git a/src/xdoc/Makefile b/src/xdoc/Makefile
notangle.1: manpage.nw ../shell/noweave.nw docdate.nw
- notangle -t8 -Rnotangle.1 manpage.nw ../shell/noweave.nw docdate.nw | $(DOVERSION) > notangle.1
-+ notangle -t8 -Rnotangle.1 $^ | $(DOVERSION) > $@
++ notangle -t8 -R$@ $^ | $(DOVERSION) > $@
nowebstyle.7: manpage.nw ../tex/support.nw docdate.nw
- notangle -t8 -Rnowebstyle.7 manpage.nw ../tex/support.nw docdate.nw | $(DOVERSION) > nowebstyle.7
-+ notangle -t8 -Rnowebstyle.7 $^ | $(DOVERSION) > $@
++ notangle -t8 -R$@ $^ | $(DOVERSION) > $@
nowebfilters.7: nowebfilters.nw docdate.nw
- notangle -t8 nowebfilters.nw docdate.nw | $(DOVERSION) > nowebfilters.7
@@ -1588,7 +1847,7 @@ diff --git a/src/xdoc/Makefile b/src/xdoc/Makefile
noweb.1: manpage.nw docdate.nw
- notangle -t8 -Rnoweb.1 manpage.nw docdate.nw | $(DOVERSION) > noweb.1
-+ notangle -t8 -Rnoweb.1 $^ | $(DOVERSION) > $@
++ notangle -t8 -R$@ $^ | $(DOVERSION) > $@
nodefs.1: nodefs.nw docdate.nw
- notangle -t8 nodefs.nw docdate.nw | $(DOVERSION) > nodefs.1
@@ -1612,11 +1871,11 @@ diff --git a/src/xdoc/Makefile b/src/xdoc/Makefile
cpif.1: manpage.nw docdate.nw
- notangle -t8 -Rcpif.1 manpage.nw docdate.nw | $(DOVERSION) > cpif.1
-+ notangle -t8 -Rcpif.1 $^ | $(DOVERSION) > $@
++ notangle -t8 -R$@ $^ | $(DOVERSION) > $@
nuweb2noweb.1: manpage.nw docdate.nw
- notangle -t8 -Rnuweb2noweb.1 manpage.nw docdate.nw | $(DOVERSION) > nuweb2noweb.1
-+ notangle -t8 -Rnuweb2noweb.1 $^ | $(DOVERSION) > $@
++ notangle -t8 -R$@ $^ | $(DOVERSION) > $@
noroff.1: noroff.nw docdate.nw
- notangle -t8 noroff.nw docdate.nw | $(DOVERSION) > noroff.1
@@ -1628,7 +1887,7 @@ diff --git a/src/xdoc/Makefile b/src/xdoc/Makefile
techrep.dvi: techrep.tex wc.tex
latex '\scrollmode \input '"techrep"
-@@ -86,23 +90,23 @@
+@@ -88,23 +92,23 @@
while grep -s 'Rerun to get cross-references right' onepage.log; do latex '\scrollmode \input '"onepage"; done
onepage.ps: onepage.dvi
@@ -1644,8 +1903,9 @@ diff --git a/src/xdoc/Makefile b/src/xdoc/Makefile
+ dvips -P cmz -o $@ guide
guide.uu: guide.ps
- gzip < guide.ps > guide.ps.gz
+- gzip < guide.ps > guide.ps.gz
- uuencode guide.ps.gz < guide.ps.gz > guide.uu
++ gzip < $< > guide.ps.gz
+ uuencode guide.ps.gz < guide.ps.gz > $@
guide.html: guide.dvi
diff --git a/development/noweb/patches/toascii.diff b/development/noweb/patches/toascii.diff
new file mode 100644
index 000000000000..a6f7fd2e81be
--- /dev/null
+++ b/development/noweb/patches/toascii.diff
@@ -0,0 +1,143 @@
+diff --git a/src/.gitignore b/src/.gitignore
+--- a/src/.gitignore
++++ b/src/.gitignore
+@@ -1,3 +1,2 @@
+ /texhash
+ /solmake
+-/lib/toascii
+diff --git a/src/lib/toascii b/src/lib/toascii
+new file mode 100755
+--- /dev/null
++++ b/src/lib/toascii
+@@ -0,0 +1,131 @@
++#!/bin/sh
++delay=0 noindex=0
++for i do
++ case $i in
++ -delay) delay=1 ;;
++ -noindex) noindex=1 ;;
++ *) echo "This can't happen -- $i passed to toascii" 1>&2 ; exit 1 ;;
++ esac
++done
++awkfile=$(mktemp)
++textfile=$(mktemp)
++tagsfile=$(mktemp)
++export awkfile textfile tagsfile
++trap 'rm -f $awkfile $textfile $tagsfile' 0 1 2 10 14 15
++nawk 'BEGIN { textfile=ENVIRON["textfile"]
++ tagsfile=ENVIRON["tagsfile"] }
++ /^@begin code/ { ++secno }
++ /^@xref label/ { print $3, secno >tagsfile }
++ /^@((begin|end) (docs|code))/ { print >textfile }
++ /^@(text|nl|defn|use)/ { print >textfile }
++ /^@xref (ref|notused)/ { print >textfile }
++ /^@xref (begin|end)(defs|uses)/ { print >textfile }
++ /^@xref (def|use)item/ { print >textfile}
++ /^@xref ((begin|end)chunks)|(chunk(begin|use|defn|end))/ { print >textfile }
++ /^@index (begin|end)(defs|uses)/ { print >textfile }
++ /^@index (is(us|defin)ed)|((def|use)item)/ { print >textfile }
++ /^@index ((begin|end)index)|(entry(begin|use|defn|end))/ { print >textfile }'
++nawk 'BEGIN {
++ textfile = ENVIRON["textfile"]
++ tagsfile = ENVIRON["tagsfile"]
++ tfmt="detex | fmt -79"
++ cfmt="expand -4 | fold -75 | sed \"s/^/ /\""
++ xfmt="fold -75 | sed \"s/^/ /\""
++ zfmt="cat"
++ while (getline <tagsfile > 0)
++ tag[$1] = $2
++ close(tagsfile)
++ }
++ /^@begin docs/ { out = tfmt }
++ /^@end docs/ { close(out) }
++ /^@begin code/ { out = cfmt; code = 1; ++secno }
++ /^@end code/ { endcode(); close(out); printf "\n" }
++ /^@text/ { printf "%s", substr($0, 7) | out }
++ /^@nl/ { # printf "(->%s)", formatname(out) | out ;
++ printf "\n" | out }
++ /^@xref ref/ { lastxrefref = tag[substr($0, 11)] }
++ /^@defn/ { name = convquote(substr($0, 7))
++ printf "\n### %d ### %s%s=",
++ secno, chunkname(name, lastxrefref), defn[name]
++ defn[name] = "+" }
++ /^@use/ { name = convquote(substr($0, 6))
++ printf "%s", chunkname(name, lastxrefref) | out }
++ /^@xref begindefs/ { endcode()
++ printf "This definition continued in" | out }
++ /^@xref beginuses/ { endcode()
++ printf "This code used in" | out }
++ /^@xref notused/ { endcode()
++ print "This code not used in this document." | out }
++ /^@xref (def|use)item/ { addlist(tag[$3]) }
++ /^@xref end(defs|uses)/ { printlist() }
++ $0 ~ /^@index begindefs/ && !noindex {
++ endcode()
++ print "Defines:" | out }
++
++ $0 ~ /^@index isused/ && !noindex {
++ if (tag[$3] != lastxrefref) addlist(tag[$3]) }
++
++ $0 ~ /^@index defitem/ && !noindex {
++ printf " %s,", $3 | out
++ if (nlist == 0) printf " not used in this document.\n" | out
++ else { printf " used in" | out; printlist() } }
++ $0 ~ /^@index beginuses/ && !noindex { endcode(); printf "Uses" | out }
++ $0 ~ /^@index isdefined/ && !noindex { lastuse = tag[$3] }
++ $0 ~ /^@index useitem/ && !noindex { addlist(sprintf("%s %s", $3, lastuse)) }
++ $0 ~ /^@index enduses/ && !noindex { printlist() }
++ /^@xref beginchunks/ { close(out); out = zfmt
++ print "List of code chunks\n" | out }
++ /^@xref chunkbegin/ { name = convquote(substr($0, length($3) + 19))
++ printf "%s\n", chunkname(name, tag[$3]) | out }
++ /^@xref chunkuse/ { addlist(tag[$3]) }
++ /^@xref chunkdefn/ { }
++ /^@xref chunkend/ { if (nlist == 0)
++ print " Not used in this document." | out
++ else { printf " Used in" | out; printlist() } }
++ /^@xref endchunks/ { }
++ $0 ~ /^@index beginindex/ && !noindex { print "\nList of identifiers (defini" \
++ "tion in parentheses)\n" | out }
++ $0 ~ /^@index entrybegin/ && !noindex { name = substr($0, length($3 + 19))
++ lastdefn = tag[$3]
++ printf "%s: ", $4 | out }
++ $0 ~ /^@index entryuse/ && !noindex { addlist(tag[$3]) }
++ $0 ~ /^@index entrydefn/ && !noindex { }
++ $0 ~ /^@index entryend/ && !noindex { for (i = 1; i <= nlist; i++)
++ if (list[i] == lastdefn)
++ sub(/.*/, "(&)", list[i])
++ if (nlist == 0)
++ print "Not used." | out
++ else printlist() }
++ $0 ~ /^@index endindex/ && !noindex { }
++ /^@fatal / { exit 1 }
++ END {
++ close(out)
++ }
++ function endcode() {
++ if (code == 1) {
++ code = 0
++ close(out)
++ out = xfmt
++ printf "\n" | out } }
++ function addlist(s, i) {
++ for (i = 1; i <= nlist; i++)
++ if (s == list[i]) return
++ list[++nlist] = s }
++
++ function printlist( i) {
++ if (nlist == 1) printf " %s.\n", list[1] | out
++ else if (nlist == 2) printf " %s and %s.\n", list[1], list[2] | out
++ else {
++ for (i = 1; i < nlist; i++)
++ printf " %s,", list[i] | out
++ printf " and %s.\n", list[nlist] | out }
++ for (i in list) delete list[i]
++ nlist = 0 }
++ function convquote(s) { gsub(/\[\[|\]\]/, "", s); return s }
++ function chunkname(name, number) {
++ if (number == 0)
++ return sprintf("<%s>", name)
++ else
++ return sprintf("<%s %d>", name, number)
++ }' noindex=$noindex $textfile
++exit $?