## Library Index Makefile # # These programs and files create the HTML files describing the # Icon program library. Configure file names below. # # Type "make" to build everything, altering nothing outside this directory. # Type "make install" to copy the HTML files to their final locations. # Type "make install-all" to copy source files, too. # Type "make clean" to remove files created by the build process. # # May 23, 1996; November 27, 1996; September 30, 1997; October 6, 1997; # August 8, 2000 # # May 3, 2001 made pages self-contained (own css, gif; abs ref to icon home) # May 3, 2001 added version number to headers # Apr 12, 2010 removed mincl/mprocs/mprogs # Jul 18, 2020 got things working again, with some reconfiguration # # Gregg Townsend ## configuration # # IPL = name of the IPL directory that is to be used as input. # DEST = name of the directory in which files are to be installed. ISRC = /Users/gmt/v9 DEST = /Users/gmt/iwww/library IPL = $(ISRC)/ipl VERH = $(ISRC)/src/h/version.h V = VERSION ## ----------- end of configuration section .SUFFIXES: .icn .pdx .htm .icn: ; $(IC) -us $< IC = icont IFLAGS = -us M4DEXE = m4d/m4d M4D = $(M4DEXE) -DVERSION=`<$V` PROGS = fileprep iplindex procprep libdoc tagpdx $(M4DEXE) PDX = procs.pdx gprocs.pdx PDH = pdx.htm gpdx.htm CFUNCS = $(IPL)/cfuncs CSECT = cincl.htm cgincl.htm \ cprocs.htm cgprocs.htm ccfuncs.htm \ cprogs.htm cgprogs.htm SSECT = sincl.htm sgincl.htm \ sprocs.htm sgprocs.htm scfuncs.htm \ sprogs.htm sgprogs.htm FSECT = fincl.htm fgincl.htm \ fprocs.htm fgprocs.htm fcfuncs.htm \ fprogs.htm fgprogs.htm BUNDLES = incl.bun gincl.bun \ procs.bun gprocs.bun cfuncs.bun \ progs.bun gprogs.bun ALL = $(PDH) $(CSECT) $(SSECT) $(FSECT) $(BUNDLES) ipl.htm all.htm CTS = incl.cts gincl.cts \ procs.cts gprocs.cts cfuncs.cts \ progs.cts gprogs.cts .SUFFIXES: .m4d .htm .m4d.htm: ; $(M4D) $< >$@ # main build targets default: $(ALL) all: $(ALL) progs: $(PROGS) pdh: $(PDH) $V: $(VERH) sed -n <$(VERH) >$V 's/^#define VersionNumber "\(.*\)"/\1/p' @echo ==================== VERSION = `<$V` ==================== # keyword indexes $(PDH): tagpdx pdx.head gpdx.head pdx.tail $(M4DEXE) pdx.htm: procs.pdx $V ./tagpdx procs pdx.htm gpdx.htm: gprocs.pdx $V ./tagpdx gprocs gpdx.htm $(PDX): procprep iplindex procs.pdx: d=`pwd`; (cd $(IPL)/procs; $$d/procprep) | \ ./iplindex -p 25 | uniq > procs.pdx gprocs.pdx: d=`pwd`; (cd $(IPL)/gprocs; $$d/procprep) | \ ./iplindex -p 25 | uniq > gprocs.pdx # to make .fdx files (not used / not tested) # visit all directories (*incl, *procs, *progs) # replace procprep with fileprep, and run iplindex with no parameters # contents files $(M4DEXE): cd m4d; $(MAKE) incl.cts incl.full incl.summ incl.bun: $(M4DEXE) libdoc hit $V ./libdoc 'Basic Preprocessor Definitions' incl `./hit $(IPL)/incl` gincl.cts gincl.full gincl.summ gincl.bun: $(M4DEXE) libdoc hit $V ./libdoc 'Graphics Preprocessor Definitions' gincl `./hit $(IPL)/gincl` procs.cts procs.full procs.summ procs.bun: $(M4DEXE) libdoc hit $V ./libdoc 'Basic Procedures' procs `./hit $(IPL)/procs` gprocs.cts gprocs.full gprocs.summ gprocs.bun: $(M4DEXE) libdoc hit $V ./libdoc 'Graphics Procedures' gprocs `./hit $(IPL)/gprocs` cfuncs.cts cfuncs.full cfuncs.summ cfuncs.bun: $(M4DEXE) libdoc hit cfuncs.m4d $V ./libdoc 'Loadable C Functions' cfuncs $(CFUNCS)/*.c progs.cts progs.full progs.summ progs.bun: $(M4DEXE) libdoc hit $V ./libdoc 'Basic Programs' progs `./hit $(IPL)/progs` gprogs.cts gprogs.full gprogs.summ gprogs.bun: $(M4DEXE) libdoc hit $V ./libdoc 'Graphics Programs' gprogs `./hit $(IPL)/gprogs` cincl.htm: cont.m4d incl.cts ;$(M4D) cont.m4d incl.cts >cincl.htm cgincl.htm: cont.m4d gincl.cts ;$(M4D) cont.m4d gincl.cts >cgincl.htm cprocs.htm: cont.m4d procs.cts ;$(M4D) cont.m4d procs.cts >cprocs.htm cgprocs.htm: cont.m4d gprocs.cts ;$(M4D) cont.m4d gprocs.cts>cgprocs.htm ccfuncs.htm: cont.m4d cfuncs.cts ;$(M4D) cont.m4d cfuncs.cts>ccfuncs.htm cprogs.htm: cont.m4d progs.cts ;$(M4D) cont.m4d progs.cts >cprogs.htm cgprogs.htm: cont.m4d gprogs.cts ;$(M4D) cont.m4d gprogs.cts>cgprogs.htm sincl.htm: summ.m4d incl.cts ;$(M4D) summ.m4d incl.cts >sincl.htm sgincl.htm: summ.m4d gincl.cts ;$(M4D) summ.m4d gincl.cts >sgincl.htm sprocs.htm: summ.m4d procs.cts ;$(M4D) summ.m4d procs.cts >sprocs.htm sgprocs.htm: summ.m4d gprocs.cts ;$(M4D) summ.m4d gprocs.cts>sgprocs.htm scfuncs.htm: summ.m4d cfuncs.cts ;$(M4D) summ.m4d cfuncs.cts>scfuncs.htm sprogs.htm: summ.m4d progs.cts ;$(M4D) summ.m4d progs.cts >sprogs.htm sgprogs.htm: summ.m4d gprogs.cts ;$(M4D) summ.m4d gprogs.cts>sgprogs.htm fincl.htm: full.m4d incl.cts ;$(M4D) full.m4d incl.cts >fincl.htm fgincl.htm: full.m4d gincl.cts ;$(M4D) full.m4d gincl.cts >fgincl.htm fprocs.htm: full.m4d procs.cts ;$(M4D) full.m4d procs.cts >fprocs.htm fgprocs.htm: full.m4d gprocs.cts ;$(M4D) full.m4d gprocs.cts>fgprocs.htm fcfuncs.htm: full.m4d cfuncs.cts ;$(M4D) full.m4d cfuncs.cts>fcfuncs.htm fprogs.htm: full.m4d progs.cts ;$(M4D) full.m4d progs.cts >fprogs.htm fgprogs.htm: full.m4d gprogs.cts ;$(M4D) full.m4d gprogs.cts>fgprogs.htm ipl.htm: $(M4DEXE) all.htm: $(CTS) $(M4DEXE) # basic sanity checks lint: weblint -x netscape *htm # install installs all HTML files but does not copy the source code # install-all installs everything install: install-contents install-details : ******** make "install-source" to also install .icn [etc.] files install-all: install install-source install-contents: cp *.css *.gif *.htm $(DEST) install-details: (cd $(DEST); sh) /dev/null (cd $(DEST)/src; rm -rf incl gincl procs gprocs cfuncs progs gprogs) (cd $(DEST)/src; mkdir incl gincl procs gprocs cfuncs progs gprogs) cp $(IPL)/cfuncs/icall.h $(DEST)/src/cfuncs cp $(IPL)/cfuncs/mkfunc.sh $(DEST)/src/cfuncs cp $(IPL)/cfuncs/mklib.sh $(DEST)/src/cfuncs cd $(IPL)/incl; cp *.icn $(DEST)/src/incl cd $(IPL)/gincl; cp *.icn $(DEST)/src/gincl cd $(IPL)/procs; cp *.icn $(DEST)/src/procs cd $(IPL)/gprocs; cp *.icn $(DEST)/src/gprocs cd $(IPL)/cfuncs; cp *.c $(DEST)/src/cfuncs cd $(IPL)/progs; cp *.icn $(DEST)/src/progs cd $(IPL)/gprogs; cp *.icn $(DEST)/src/gprogs clean: cd m4d; $(MAKE) clean rm -f $(PROGS) $V *.fdx *.pdx *.cts *.summ *.full *.htm *.bun rm -rf incl gincl rm -rf procs gprocs cfuncs rm -rf progs gprogs