racket/csug/Makefile
Andy Keep a80f0fb0b3 - added custom install options. workarea creates an empty config.h,
and configure creates a config.h that sets the default scheme heap
  path and scheme-script name based on the actual configuration.
    configure, newrelease, workarea, checkin,
    c/Mf-base, scheme.c, main.c,
    Mf-install.in
- renamed the installed example directory from lib to examples.
    Mf-install.in,
    scheme.1.in
- added force option to gzip during man page install to prevent gzip from
  asking for permission to overwrite existing man page files.
    Mf-install.in
- removed ~/lib/csv%v/%m from the default scheme heap path on unix-like
  systems.  documented inclusion of %x\..\..\boot\%m in the Windows
  default scheme heap path.
    main.c,
    use.stex
- added new configuration options: --installbin, --installlib,
  --installschemename, --installpetitename, and --installscriptname.
    configure
- updated the example library link to the nanopass framework.
    CONTRIBUTING.md
- now cleaning up petite.1 and scheme.1 left behind by make install
    Makefile-workarea.in, checkin
- now removing workarea after cleaning csug and release_notes so
  Mf-stex (included from csug/Makefile and release_notes/Makefile)
  doesn't complain trying to determine the machine type.
    Makefile.in
- added installsh support for --ifdiff so the csug make file can use it
  for the install target.
    installsh,
    csug/Makefile
- added instructions for building (cross-compiling) a boot file for
  a supported machine type for which a boot file is not built by default.
    BUILDING

original commit: df4194c83a9e67d1ec20165fc3e2def4ed8e8986
2016-05-06 18:30:06 -04:00

159 lines
4.7 KiB
Makefile

m = a6le
Scheme=../$m/bin/$m/scheme -b ../$m/boot/$m/petite.boot -b ../$m/boot/$m/scheme.boot
STEXLIB=../stex
installdir=/tmp/csug9
INSTALL=../$m/installsh
x = csug
latex = pdflatex
stexmacrofiles = tspl4-prep
bib = $(x).bib
index=yes
TSPL=tspl4
DIR=$(shell basename `pwd`)
target: logcheck1 logcheck2 checklibs $(x).html
install: target
$(INSTALL) -m 2755 -d $(installdir)
$(INSTALL) -m 0644 --ifdiff *.html *.css $(installdir)
$(INSTALL) -m 2755 -d $(installdir)/canned
$(INSTALL) -m 0644 --ifdiff canned/* $(installdir)/canned
$(INSTALL) -m 2755 -d $(installdir)/gifs
$(INSTALL) -m 0644 --ifdiff gifs/*.gif $(installdir)/gifs
$(INSTALL) -m 2755 -d $(installdir)/$(mathdir)
$(INSTALL) -m 0644 --ifdiff $(mathdir)/*.gif $(installdir)/$(mathdir)
(cd $(installdir); ln -s -f $(x).html index.html)
# thrice is not enough when starting from scratch
logcheck1: $(x).thirdrun
@if [ -n "`grep 'Warning: Label(s) may have changed' $(x).log`" ] ; then\
/bin/rm -f $(x).thirdrun ;\
$(MAKE) $(x).thirdrun;\
fi
rerun: $(x).thirdrun
logcheck2: $(x).thirdrun
@if [ -n "`grep Warning $(x).log | grep -v pdftex.map`" ] ; then\
echo "`grep Warning $(x).log | grep -v pdftex.map`";\
false;\
fi
@if [ -n "`grep Overfull $(x).log | grep -v pdftex.map`" ] ; then\
echo "`grep Overfull $(x).log | grep -v pdftex.map`";\
false;\
fi
include $(STEXLIB)/Mf-stex
stexsrc = csug.stex title.stex copyright.stex contents.stex\
preface.stex intro.stex use.stex expeditor.stex debug.stex foreign.stex\
binding.stex control.stex objects.stex numeric.stex io.stex\
libraries.stex syntax.stex system.stex smgmt.stex threads.stex\
compat.stex bibliography.stex summary.stex
texsrc = ${stexsrc:%.stex=%.tex}
title.tex contents.tex bibliography.tex:
/bin/rm -f $*.tex
echo "%%% DO NOT EDIT THIS FILE" > $*.tex
echo "%%% Edit the .stex version instead" >> $*.tex
echo "" >> $*.tex
cat $*.stex >> $*.tex
chmod -w $*.tex
title.tex: title.stex
contents.tex: contents.stex
bibliography.tex: bibliography.stex
$(x).firstrun: $(x).prefirstrun
$(x).prefirstrun: tspl.aux tspl.rfm tspl.idx
touch $x.sfm
cat tspl.aux > $x.aux
cat tspl.rfm > $x.rfm
cat tspl.idx > $x.idx
touch $(x).prefirstrun
$(x).secondrun: $(x).presecondrun
$(x).presecondrun: $(x).firstrun
cat tspl.aux >> $x.aux
cat tspl.rfm >> $x.rfm
echo '(summary-make "$x")' | $(Scheme) setup.ss summary.ss
cat tspl.idx >> $x.idx
touch $(x).presecondrun
$(x).thirdrun: $(x).prethirdrun canned/cisco-logo.png
$(x).prethirdrun: $(x).secondrun
cat tspl.aux >> $x.aux
cat tspl.rfm >> $x.rfm
echo '(summary-make "$x")' | $(Scheme) setup.ss summary.ss
cat tspl.idx >> $x.idx
touch $(x).prethirdrun
$(x).hfirstrun: $(x).hprefirstrun csug8.hcls
$(x).hprefirstrun: $(x).thirdrun tspl.haux in.hidx
cat tspl.aux >> $x.aux
cat tspl.rfm >> $x.rfm
cat tspl.idx >> $x.idx
cat tspl.haux > $x.haux
touch $(x).hprefirstrun
$(x).hsecondrun: $(x).hpresecondrun
$(x).hpresecondrun: $(x).hfirstrun
cat tspl.haux >> $x.haux
touch $(x).hpresecondrun
$(x).hthirdrun: $(x).hprethirdrun
$(x).hprethirdrun: $(x).hsecondrun
cat tspl.haux >> $x.haux
touch $(x).hprethirdrun
$(x).prefirstrun: $(texsrc) csug8.cls csug810.clo
$(x).firstrun: scheme.sty
tspl.aux: ${TSPL}/tspl.aux
cat ${TSPL}/*.aux | grep '\\newlabel' | \
sed -e 's/\\newlabel{\(.*\){\([^}]*\)}}/\\newlabel{TSPL:\1{t\2}}/' > tspl.aux
tspl.haux: ${TSPL}/tspl.haux
sed -e 's/(putprop (quote /(putprop (quote |TSPL|:/' ${TSPL}/tspl.haux | \
sed -e 's;url) ";url) "${TSPL}/;' > tspl.haux
tspl.rfm: ${TSPL}/tspl.rfm
sed -e 's/\\pageref{/\\pageref{TSPL:/' ${TSPL}/tspl.rfm > tspl.rfm
# this version leaves tspl entries out of the printed index
#tspl.idx:
# echo -n > tspl.idx
# this version includes tspl entries in the printed index
tspl.idx: ${TSPL}/tspl.idx
sed -e 's/{\([1-9][0-9]*\)}$$/{t\1}/' ${TSPL}/tspl.idx | \
sed -e 's/{\([ivx][ivx]*\)}$$/{t\1}/' > tspl.idx
in.hidx: ${TSPL}/out.hidx
sed -e 's;"\(.*\)\.html#;"${TSPL}/\1.html#;' ${TSPL}/out.hidx | \
sed -e 's/"")$$/"t")/' > in.hidx
$(texsrc): tspl4-prep.stex priminfo.ss ../s/primdata.ss
checklibs: $(x).thirdrun
sort libsrecorded | uniq > libsrecorded.sort
sort libslisted | uniq > libslisted.sort
diff libsrecorded.sort libslisted.sort
code: $(stexsrc)
extract.pl $(stexsrc) > code
echo '(load "code" pretty-print)' | $(Scheme) -q
$(x).clean:
-/bin/rm -f $(x).rfm $(x).sfm $(x).prefirstrun $(x).presecondrun\
$(x).prethirdrun $(x).ans\
$(x).hprefirstrun $(x).hpresecondrun $(x).hprethirdrun\
tspl.aux tspl.haux tspl.rfm tspl.idx in.hidx\
libsrecorded{,.sort} libslisted{,.sort}\
code
$(x).reallyclean:
$(x).reallyreallyclean: