Subject: v12i012: Cake, a make replacement, Part06/09 Newsgroups: comp.sources.unix Sender: sources Approved: rs@uunet.UU.NET Submitted-by: Zoltan Somogyi Posting-number: Volume 12, Issue 12 Archive-name: cake/part06 #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # README # Archive # C # Grammar # Lex # Main # Newtext # Newtext.defs # Newtext.doc # Nuprolog # Rcs # Sccs # System # Text # Textdefs # Uas # Vlsi # Yacc # Zs_defs # Zs_newdefs # This archive created: Wed Oct 14 20:46:47 1987 echo mkdir Lib mkdir Lib echo cd Lib cd Lib export PATH; PATH=/bin:/usr/bin:$PATH echo shar: "extracting 'README'" '(1351 characters)' if test -f 'README' then echo shar: "will not over-write existing file 'README'" else sed 's/^X//' << \SHAR_EOF > 'README' XThis directory contains some "standard" cakefiles. X XEach cakefile has its own documentation, except Newtext, for which the Xdocumentation is in Newtext.defs and Newtext.doc. Many cakefiles need Xthe programs and shell- and awk-scripts distributed with cake. X XIt contains cakefiles for C programs, yacc and lex either separately X(the files Yacc, Lex) or together (Grammar), and for NU-Prolog programs. XThese can be used together with the cakefiles Main or System, which Xlook after linking, checking, printing etc, for directories with one Xand many executables respectively. X XThe cakefile Newtext is a fairly general-purpose text-processing system Xfor ditroff. You should go through this file and modify any default Xvalues which are not appropriate for your site; the names of the Xprinters in particular are site-dependent. X XThe cakefile Text is an older version of Newtext; you should probably Xthrow it away and rename Newtext to Text. The cakefiles Zs_* are Xsite-dependent definitions for Text and Newtext. You may want to Xlook at them, and perhaps modify them, but it is unlikely that they Xwill be very useful as they are. X XThe Vlsi cakefile (for the UNSW VLSI system) does the job of the XUNSW "bake" program. X XThis directory also contains cakefiles for RCS, SCCS and "ar", Xas well as for my (zs's) microassembler; if you want a copy of uas, Xjust ask. SHAR_EOF if test 1351 -ne "`wc -c < 'README'`" then echo shar: "error transmitting 'README'" '(should have been 1351 characters)' fi fi echo shar: "extracting 'Archive'" '(397 characters)' if test -f 'Archive' then echo shar: "will not over-write existing file 'Archive'" else sed 's/^X//' << \SHAR_EOF > 'Archive' X$ Cakefile to handle archives. X X$ Define ARCH to be the name of the archive you want files X$ to be automatically extracted from. The first rule performs X$ this extraction; the second updates the archive. X X#ifndef ARCH X it's no use trying to use Archive without defining ARCH X#endif X X%1: ARCH if {{ar t ARCH | grep \\\^%1\\\$}} X ar x ARCH %1 X XARCH.up&: [[ar t ARCH]] X ar ru ARCH [[ar t ARCH]] SHAR_EOF if test 397 -ne "`wc -c < 'Archive'`" then echo shar: "error transmitting 'Archive'" '(should have been 397 characters)' fi fi echo shar: "extracting 'C'" '(1857 characters)' if test -f 'C' then echo shar: "will not over-write existing file 'C'" else sed 's/^X//' << \SHAR_EOF > 'C' X$ Cakefile to handle C programs. X X$ The value of the macro CC names the C compiler. The values X$ of the macros CPPFLAGS, CFLAGS and LDFLAGS are passed on to X$ cpp, cc and ld respectively. By default, the object file X$ depends only on the source file. This can be changed. You X$ should define DEPCCINCL if you want the .o file to depend X$ on the files included in .c; the value of CCINCLFLAGS will X$ be passed along to ccincl. You may define DEPHDR instead, X$ in which case the .o file will depend on either the files X$ named in the macro HDR (without the .h suffix), or on all X$ the .h files in the current directory. In any case, you X$ may define OBJDEP yourself. X X$ This cakefile was written to work in conjunction with the X$ cakefile Grammar (or Lex and Yacc) and the cakefile Main X$ or System. The order of inclusion of these should be e.g. X$ Grammar, C, and Main. X X#ifndef CC X#define CC cc X#endif X#ifndef CPPFLAGS X#define CPPFLAGS X#endif X#ifndef CFLAGS X#define CFLAGS X#endif X#ifndef LINTFLAGS X#define LINTFLAGS X#endif X#ifndef LDFLAGS X#define LDFLAGS X#endif X#ifndef OBJDEP X# ifdef DEPCCINCL X# ifndef CCINCLFLAGS X# define CCINCLFLAGS X# endif X# define OBJDEP [[ccincl CCINCLFLAGS %.c]] X# define WHENFLAG * X# else X# ifdef DEPHDR X# ifdef HDR X# define OBJDEP [[sub X X.h HDR]] X# else X# define OBJDEP [[ls *.h]] X# endif X# else X# define OBJDEP X# endif X# endif X#endif X#ifndef WHENFLAG X#define WHENFLAG X#endif X X%.o: %.c WHENFLAG OBJDEP X CC CPPFLAGS CFLAGS -c %.c X X#define LINK_CMD CC LDFLAGS -o % X#define CHECK_CMD lint CPPFLAGS LINTFLAGS X#define TAGS_CMD ctags X#define DEFS_CMD defn X X#define SRCSUFF .c X#define OBJSUFF .o X X#ifndef SUFFIXLIST X#ifdef USE_YACC X#ifdef USE_LEX X#define SUFFIXLIST .c .l .y X#else X#define SUFFIXLIST .c .y X#endif X#else X#ifdef USE_LEX X#define SUFFIXLIST .c .l X#else X#define SUFFIXLIST .c X#endif X#endif X#endif SHAR_EOF if test 1857 -ne "`wc -c < 'C'`" then echo shar: "error transmitting 'C'" '(should have been 1857 characters)' fi fi echo shar: "extracting 'Grammar'" '(1436 characters)' if test -f 'Grammar' then echo shar: "will not over-write existing file 'Grammar'" else sed 's/^X//' << \SHAR_EOF > 'Grammar' X$ Cakefile to handle coupled lex and yacc files. X X$ This file assumes that yacc sources are in files whose names X$ are of the form %_g.y (the g is for grammar) and that lex X$ sources are in files whose names are of the form %_s.l (the X$ s is for scanner). It assumes that yacc and lex sources occur X$ in pairs, i.e. %_g.y and %_s.l for the same value of %. X$ It renames the output files of yacc and lex so that they X$ have the same basename as their source files, and it massages X$ the generated sources using yyrepl(1). This enables one to put X$ more than one parser/scanner pair in the same directory without X$ conflict over yy* variables. You should define the macro TABLES X$ if you wish to keep the tables generated by the -v options X$ of yacc and lex. X X$ This cakefile was written to work with the cakefile C and one X$ of the cakefiles Main and System. X X#ifdef TABLES X#define YFLAGS -dv X#define LFLAGS -v X X%_g.c^ %_g.h@ %_g.t: %_g.y X yacc YFLAGS %_g.y X @mv y.tab.h %_g.h X @mv y.tab.c %_g.c X @mv y.output %_g.t X @yyrepl %_g.y %_g.c %_g.h X X%_s.c^ %_s.t: %_s.l %_g.h X lex LFLAGS %_s.l > %_s.t X @mv lex.yy.c %_s.c X @yyrepl %_g.y %_s.c X#else X#define YFLAGS -d X#define LFLAGS X X%_g.c^ %_g.h@: %_g.y X yacc YFLAGS %_g.y X @mv y.tab.h %_g.h X @mv y.tab.c %_g.c X @yyrepl %_g.y %_g.c %_g.h X X%_s.c^: %_s.l %_g.h X lex LFLAGS %_s.l X @mv lex.yy.c %_s.c X @yyrepl %_g.y %_s.c X#endif X X#define USE_YACC X#define USE_LEX SHAR_EOF if test 1436 -ne "`wc -c < 'Grammar'`" then echo shar: "error transmitting 'Grammar'" '(should have been 1436 characters)' fi fi echo shar: "extracting 'Lex'" '(397 characters)' if test -f 'Lex' then echo shar: "will not over-write existing file 'Lex'" else sed 's/^X//' << \SHAR_EOF > 'Lex' X$ Cakefile to handle lex files. X X$ It renames the output file of lex so that it has the same X$ basename as the source file. The value of the macro LFLAGS X$ is passed on to lex. X X$ This cakefile was written to work with the cakefile C and one X$ of the cakefiles Main and System. X X#ifndef LFLAGS X#define LFLAGS X#endif X X%.c^: %.l if exist %.l X lex LFLAGS %.l X @mv lex.yy.c %.c X X#define USE_LEX SHAR_EOF if test 397 -ne "`wc -c < 'Lex'`" then echo shar: "error transmitting 'Lex'" '(should have been 397 characters)' fi fi echo shar: "extracting 'Main'" '(3153 characters)' if test -f 'Main' then echo shar: "will not over-write existing file 'Main'" else sed 's/^X//' << \SHAR_EOF > 'Main' X$ Cakefile to handle programs. X X$ Using Main is appropriate if a directory contains the sources X$ for a single binary; if the number of binaries is greater than X$ one, you should use the cakefile System. Main (and System) can X$ handle programs written in any language, as long as the cakefile X$ for that language defines the macros expected by Main. These X$ macros are LINK_CMD, SRCSUFF, OBJSUFF and SUFFIXLIST. Currently X$ there exist cakefiles for C and NU-Prolog. These cakefile should X$ be included before Main. X X$ You should define the macro FILES to contain the list of source X$ files WITHOUT their suffix, and optionally MAIN as the name of X$ the binary (default: the name of the first file in FILES). X$ With these defined, you can make the targets MAIN (link the X$ object files), print (print all sources), uprint (print those X$ sources which were modified after the last printing), count X$ (run wc on all sources), ssize (sort the output of wc), X$ clean (remove generated files) and clobber (remove generated X$ files and the binary). Printing is done by PRINT_CMD if X$ defined, lpr -p otherwise; removal is done by RM_CMD if X$ defined, rmv otherwise (rmv copies its args to /tmp). X X$ You may define DEST as the name of an installation directory X$ or HOME as where HOME/bin is the installation directory, X$ and you can invoke the target install to do the installation X$ (using INST_CMD if defined, cp otherwise). You may define X$ LIB as a list of libraries to pass on to LINK and CHECK CMDs. X X$ The rules for the targets lint, tags and defs depend on X$ values for the macros CHECK_CMD, TAGS_CMD and DEFS_CMD, X$ which should be language-specific utilities; the macros X$ should be defined in the language's cakefile. X X#ifndef FILES X it's no use trying to use Main without defining FILES X#endif X#ifndef LINK_CMD X it's no use trying to use Main without defining LINK_CMD X#endif X#ifndef SRCSUFF X it's no use trying to use Main without defining SRCSUFF X#endif X#ifndef OBJSUFF X it's no use trying to use Main without defining OBJSUFF X#endif X#ifndef SUFFIXLIST X it's no use trying to use Main without defining SUFFIXLIST X#endif X X#ifndef PRINT_CMD X#define PRINT_CMD lpr -p X#endif X#ifndef INST_CMD X#define INST_CMD cp X#endif X#ifndef RM_CMD X#define RM_CMD rmv X#endif X X#ifndef MAIN X#define MAIN [[echo FILES | awk '{ print $1; }']] X#endif X#ifndef LIB X#define LIB X#endif X X#define SRC [[sub X X''SRCSUFF FILES]] X#define OBJ [[sub X X''OBJSUFF FILES]] X X%:: OBJ if % in MAIN X LINK_CMD OBJ LIB X X#ifdef DEST Xinstall&: MAIN X INST_CMD MAIN DEST X#else X#ifdef HOME Xinstall&: MAIN X INST_CMD MAIN HOME/bin X#endif X#endif X X#ifdef CHECK_CMD X#ifdef IRREL Xlint&: SRC X CHECK_CMD SRC LIB |& irrel IRREL X#else Xlint&: SRC X CHECK_CMD SRC LIB X#endif X#endif X Xprint&: X PRINT_CMD [[usrc SUFFIXLIST FILES]] X @-touch .print X Xuprint&: X PRINT_CMD [[later .print [[usrc SUFFIXLIST FILES]]]] X @-touch .print X X#ifdef TAGS_CMD Xtags: SRC X TAGS_CMD SRC X#endif X X#ifdef DEFS_CMD Xdefs: SRC X DEFS_CMD SRC X#endif X Xcount&: X wc -v [[usrc SUFFIXLIST FILES]] X Xssize&: X ssize [[usrc SUFFIXLIST FILES]] X Xclean&: X RM_CMD OBJ [[gsrc SUFFIXLIST FILES]] X Xclobber&: clean X RM_CMD MAIN SHAR_EOF if test 3153 -ne "`wc -c < 'Main'`" then echo shar: "error transmitting 'Main'" '(should have been 3153 characters)' fi fi echo shar: "extracting 'Newtext'" '(7630 characters)' if test -f 'Newtext' then echo shar: "will not over-write existing file 'Newtext'" else sed 's/^X//' << \SHAR_EOF > 'Newtext' X$ New cakefile for text processing. X X$ For documentation see Newtext.doc and Newtext.defs. X X#ifndef MOREFLAG X#define MOREFLAG X#endif X#ifndef PRINTFLAG X#define PRINTFLAG X#endif X X#ifndef MORECMD X#define MORECMD more X#endif X#ifndef BIBCMD X#define BIBCMD bib X#endif X#ifndef PICCMD X#define PICCMD pic X#endif X#ifndef TBLCMD X#define TBLCMD dtbl X#endif X#ifndef EQNCMD X#define EQNCMD deqn X#endif X#ifndef DITROFFCMD X#ifdef LOCALDITROFF X#define DITROFFCMD ditroff.q X#else X#define DITROFFCMD ditroff X#endif X#endif X#ifndef CITCMD X#define CITCMD lookindex -s X#endif X X#ifndef SYMBOLIMAGEN X#define SYMBOLIMAGEN X#endif X#ifndef SYMBOLAPPLE X#define SYMBOLAPPLE X#endif X#ifndef LASERDEV X#ifdef IP X#define LASERDEV -Pip X#define LASERTYPE -Tip X#define SYMBOLS SYMBOLIMAGEN X#else X#ifdef LW X#define LASERDEV -Plw X#define LASERTYPE -Tlw X#define CHUNK 6 X#define SYMBOLS SYMBOLAPPLE X#else X#ifdef LWR X#define LASERDEV -Plwr X#define LASERTYPE -Tlw X#define CHUNK 6 X#define SYMBOLS SYMBOLAPPLE X#else X#ifdef LW226 X#define LASERDEV -Plw.226 X#define LASERTYPE -Tlw X#define CHUNK 6 X#define SYMBOLS SYMBOLAPPLE X#else X#ifdef OFF X#define LASERDEV -Poff X#define LASERTYPE -Tlw X#define CHUNK 6 X#define SYMBOLS SYMBOLAPPLE X#else X#ifdef AN X#define LASERDEV -Pan X#define LASERTYPE -Tlw X#define CHUNK 6 X#define SYMBOLS SYMBOLAPPLE X#else X#define LASERDEV -Pan X#define LASERTYPE -Tlw X#define CHUNK 6 X#define SYMBOLS SYMBOLAPPLE X#endif X#endif X#endif X#endif X#endif X#endif X#endif X X#ifndef PRINTLASER X#define PRINTLASER LASERDEV -n X#endif X#ifndef PRINTGEN X#define PRINTGEN LASERDEV X#endif X#ifndef LBLOPTS X#define LBLOPTS X#endif X#ifndef ALLLBLOPTS X#define ALLLBLOPTS LBLOPTS X#endif X#ifndef BIBINDEX X#define BIBINDEX -p INDEX X#endif X#ifndef BIBSTYLE X#define BIBSTYLE -t std X#endif X#ifndef BIBOPTS X#define BIBOPTS X#endif X#ifndef ALLBIBOPTS X#define ALLBIBOPTS BIBINDEX BIBSTYLE BIBOPTS X#endif X#ifndef LISTREFOPTS X#define LISTREFOPTS X#endif X#ifndef ALLLISTREFOPTS X#define ALLLISTREFOPTS BIBSTYLE LISTREFOPTS X#endif X#ifndef PICOPTS X#define PICOPTS X#endif X#ifndef ALLPICOPTS X#define ALLPICOPTS LASERTYPE PICOPTS X#endif X#ifndef TBLOPTS X#define TBLOPTS X#endif X#ifndef ALLTBLOPTS X#define ALLTBLOPTS LASERTYPE TBLOPTS X#endif X#ifndef EQNOPTS X#define EQNOPTS X#endif X#ifndef ALLEQNOPTS X#define ALLEQNOPTS LASERTYPE EQNOPTS X#endif X#ifndef MACROPACK X#define MACROPACK -me X#endif X#ifndef OTHERMACS X#define OTHERMACS X#endif X#ifndef DITROFFINIT X#define DITROFFINIT X#endif X#ifndef DITROFFOPTS X#define DITROFFOPTS X#endif X#ifndef ALLDITROFFOPTS X#define ALLDITROFFOPTS -t LASERDEV DITROFFOPTS MACROPACK OTHERMACS SYMBOLS DITROFFINIT X#endif X#ifndef CITINDEX X#define CITINDEX /usr/bib/gnu/bib/INDEX X#endif X#ifndef CHNROPTS X#define CHNROPTS X#endif X#ifndef CHEQOPTS X#define CHEQOPTS X#endif X#ifndef SPELLDICT X#define SPELLDICT /dev/null X#endif X#ifndef ISPELLOPTS X#define ISPELLOPTS -Sx X#endif X#ifndef SPELLOPTS X#define SPELLOPTS X#endif X#ifndef DICTOPTS X#define DICTOPTS X#endif X#ifndef MODSTYLE X#define MODSTYLE 16 X#endif X#ifndef HARDSTYLE X#define HARDSTYLE 19 X#endif X#ifndef LONGSTYLE X#define LONGSTYLE 25 X#endif X#ifndef STYLEOPTS X#define STYLEOPTS X#endif X#ifndef ALLSTYLEOPTS X#define ALLSTYLEOPTS MACROPACK STYLEOPTS X#endif X X#ifndef IDIR X#define IDIR /tmp X#endif X#ifndef FDIR X#define FDIR /tmp X#endif X X#define FSUFF laser X#define ISUFF bib,lbl,dte,de,d X#define ASUFF astyle,base,cheq,chnr,cit,count,dict,exp,hard,long,mod,ocount,ol,pass,refs,spell,srefs,style X X#define need(prog) prog in [[needed %.orig]] X X/* general services */ X%.m&: % MOREFLAG X MORECMD % X X%1.%2.p&: %1.%2 PRINTFLAG if not %2 in laser X lpr PRINTGEN %1.%2 X X#ifdef CHUNK X%1.%2.p&: %1.%2 PRINTFLAG if %2 in laser X @-/bin/rm -f chunk* >& /dev/null X troffchunk -n CHUNK %1.%2 X lpr PRINTLASER chunk* X#else X%1.%2.p&: %1.%2 PRINTFLAG if %2 in laser X lpr PRINTLASER %1.%2 X#endif X X/* frames */ X%.orig: %.frame [[soincl %.frame]] if exist %.frame X soelim %.frame > %.orig X X%1.%2.each&: [[sub X.orig X.%2 [[soincl %1.frame]]]] if exist %1.frame X X/* lbl */ X#ifdef IDIR X%.lbl: %.orig* if need(lbl) X lbl ALLLBLOPTS %.orig > IDIR/%.lbl X ln -s IDIR/%.lbl . X#else X%.lbl: %.orig* if need(lbl) X lbl ALLLBLOPTS %.orig > %.lbl X#endif X X%.lbl: %.orig* if not need(lbl) X @-/bin/rm -f %.lbl >& /dev/null X ln -s [[/bin/pwd]]/%.orig %.lbl X X/* bib */ X#ifdef IDIR X%.bib: %.lbl %.orig* if need(bib) X @-/bin/rm -f %.bib >& /dev/null X BIBCMD ALLBIBOPTS %.lbl > IDIR/%.bib X ln -s IDIR/%.bib . X#else X%.bib: %.lbl %.orig* if need(bib) X BIBCMD ALLBIBOPTS %.lbl > %.bib X#endif X X#ifdef IDIR X%.bib: %.lbl %.orig* if need(listrefs) X @-/bin/rm -f %.bib >& /dev/null X listrefs LISTREFOPTS %.lbl > IDIR/%.bib X ln -s IDIR/%.bib . X#else X%.bib: %.lbl %.orig* if need(listrefs) X listrefs LISTREFOPTS %.lbl > %.bib X#endif X X%.bib: %.lbl %.orig* if not need(bib) and not need(listrefs) X @-/bin/rm -f %.bib >& /dev/null X ln -s %.lbl %.bib X X/* laser pic */ X#ifdef IDIR X%.dte INTFLAG: %.bib %.orig* if need(pic) X @-/bin/rm -f %.dte >& /dev/null X PICCMD ALLPICOPTS %.bib > IDIR/%.dte X ln -s IDIR/%.dte . X#else X%.dte INTFLAG: %.bib %.orig* if need(pic) X PICCMD ALLPICOPTS %.bib > %.dte X#endif X X%.dte INTFLAG: %.bib %.orig* if not need(pic) X @-/bin/rm -f %.dte >& /dev/null X ln -s %.bib %.dte X X/* laser tbl */ X#ifdef IDIR X%.de INTFLAG: %.dte %.orig* if need(tbl) X @-/bin/rm -f %.de >& /dev/null X TBLCMD ALLTBLOPTS %.dte > IDIR/%.de X ln -s IDIR/%.de . X#else X%.de INTFLAG: %.dte %.orig* if need(tbl) X TBLCMD ALLTBLOPTS %.dte > %.de X#endif X X%.de INTFLAG: %.dte %.orig* if not need(tbl) X @-/bin/rm -f %.de >& /dev/null X ln -s %.dte %.de X X/* laser eqn */ X#ifdef IDIR X%.d INTFLAG: %.de %.orig* if need(eqn) X @-/bin/rm -f %.d >& /dev/null X EQNCMD ALLEQNOPTS %.de > IDIR/%.d X ln -s IDIR/%.d . X#else X%.d INTFLAG: %.de %.orig* if need(eqn) X EQNCMD ALLEQNOPTS %.de > %.d X#endif X X%.d INTFLAG: %.de %.orig* if not need(eqn) X @-/bin/rm -f %.d >& /dev/null X ln -s %.de %.d X X/* laser troff */ X#ifdef FDIR X%.laser: %.d X @-/bin/rm -f %.laser >& /dev/null X DITROFFCMD ALLDITROFFOPTS %.d > FDIR/%.laser X ln -s FDIR/%.laser . X#else X%.laser: %.d X DITROFFCMD ALLDITROFFOPTS %.d > %.laser X#endif X X/* analysis services */ X%.all&: %.spell %.style %.exp %.mod %.long %.pass %.dict %.chnr X X%.base: %.orig X base < %.orig > %.base X X%.refs: %.orig X refs < %.orig > %.refs X X%.srefs: %.refs X sort -u %.refs > %.srefs X X%.cit: %.srefs X CITCMD CITINDEX < %.srefs > %.icit X sortbib %.icit > %.cit X @-/bin/rm -f %.icit >& /dev/null X X%.chnr: %.orig X checknr CHNROPTS %.orig > %.chnr X X%.cheq: %.orig X -checkeq CHEQOPTS %.orig > %.cheq X X%.ol: %.orig X ol %.orig > %.ol X X%.fix&: %.orig X fix -d SPELLDICT %.orig X X%.ispell&: %.orig X ispell ISPELLOPTS %.orig X X%.spell: %.base X spell SPELLOPTS %.base | tr A-Z a-z | comm -23 - SPELLDICT > %.spell X X%.dict: %.base X diction DICTOPTS %.base > %.dict X X%.style: %.base X style ALLSTYLEOPTS %.base > %.style X X%.astyle: %.base X style ALLSTYLEOPTS -a %.base > %.astyle X X%.exp: %.base X style ALLSTYLEOPTS -e %.base > %.exp X X%.mod: %.base X style ALLSTYLEOPTS -r MODSTYLE %.base > %.mod X X%.hard: %.base X style ALLSTYLEOPTS -r HARDSTYLE %.base > %.hard X X%.long: %.base X style ALLSTYLEOPTS -l LONGSTYLE %.base > %.long X X%.pass: %.base X style ALLSTYLEOPTS -p %.base > %.pass X X%.count: %.base X wc %.base > %.count X X%.ocount: %.orig X wc %.orig > %.ocount X X%.clean&: X @echo cleaning up % X @-/bin/rm %.{ISUFF,FSUFF,ASUFF} >& /dev/null X X%.vclean&: X @echo cleaning up % very carefully X @-/bin/mv %.orig /tmp/%.orig.$$ >& /dev/null X Xxyzzy&: X @echo no default action in Newtext X Xclean&: [[sub -i X.orig X.clean *]] Xclean&: [[sub -i X.frame X.vclean *]] SHAR_EOF if test 7630 -ne "`wc -c < 'Newtext'`" then echo shar: "error transmitting 'Newtext'" '(should have been 7630 characters)' fi fi echo shar: "extracting 'Newtext.defs'" '(2178 characters)' if test -f 'Newtext.defs' then echo shar: "will not over-write existing file 'Newtext.defs'" else sed 's/^X//' << \SHAR_EOF > 'Newtext.defs' XThis file lists and defines the macros used by the cakefile Newtext. X XSYMBOLIMAGEN Files containing symbol definitions for imagens XSYMBOLAPPLE and laserwriters; defaults are empty. X XLASERDEV If you define LASERDEV (as -Pip etc), you should XLASERTYPE also define LASERTYPE and SYMBOLS. Otherwise, XSYMBOLS Text will define them, based on the presence X XIP of one of these macros. IP directs output to XLW the imagen, LW to the computation lab, LW226 XLW226 to 226, LWR to to the computation lab (rotated), XLWR OFF to the office, and AN to the annexe. Only XOFF the first of these definitions has any effect. XAN AN is the default. (These are site-dependent.) X XPRINTGEN Argument to lpr for printing general stuff. XPRINTLASER Argument to lpr for printing ditroff output. X XLBLOPTS All these options are given to the program XBIBOPTS from whose name they are derived. The defaults XLISTREFOPTS are empty strings. XPICOPTS XTBLOPTS XEQNOPTS XDITROFFOPTS XCHEQOPTS XCHNROPTS XSPELLOPTS XISPELLOPTS XDICTOPTS XSTYLEOPTS X XBIBINDEX These are the "required" options of bib. XBIBSTYLE X XMACROPACK These are the "required" options of ditroff. XOTHERMACS XDITROFFINIT X XCITINDEX This is the "required" option of CITCMD. X XSPELLDICT This is the "required" option of fix. X XMODSTYLE These are the "required" options of style XHARDSTYLE when caking %.mod, %.hard and %.long. XLONGSTYLE X XALLLBLOPTS These macros warp up the "optional" options XALLBIBOPTS (e.g. BIBOPTS) and the "required" options XALLLISTREFOPTS (e.g. BIBINDEX and BIBSTYLE) of the respective XALLPICOPTS commands. XALLTBLOPTS XALLEQNOPTS XALLDITROFFOPTS XALLSTYLEOPTS X XMORECMD You can define any of these macros to replace XBIBCMD the standard programs more, bib, pic, ditroff XPICCMD and lookup (e.g. with less, refer, ideal, XDITROFFCMD ditroff.q and lookindex). If you define the XCITCMD macro LOCALDITROFF, you will get ditroff.q X as default. X XMOREFLAG If you define MORE or PRINTFLAG to be ^, files XPRINTFLAG you run %1.%2.m(p) on will be deleted after the XINTFLAG the command. If you define INTFLAG, intermediate X files will be similarly deleted. X XFDIR Directories to put final and intermediate files XIDIR of ditroff in. The default is /tmp. SHAR_EOF if test 2178 -ne "`wc -c < 'Newtext.defs'`" then echo shar: "error transmitting 'Newtext.defs'" '(should have been 2178 characters)' fi fi echo shar: "extracting 'Newtext.doc'" '(2265 characters)' if test -f 'Newtext.doc' then echo shar: "will not over-write existing file 'Newtext.doc'" else sed 's/^X//' << \SHAR_EOF > 'Newtext.doc' XDocumentation for the cakefile Newtext. X XThis file explains what you can do with Newtext; the macros used by XNewtext are described in Newtext.defs. X XNewtext assumes that your document is in a file with a .orig or .frame Xsuffix; if the suffix is .frame it assumes that it is a skeleton Xwith .so statements including the "meat" of the document. In either case Xthe file should have a line containing the word NEED followed by a list Xof program names from the set lbl, bib, listrefs, pic, tbl and eqn. XThis line may be a ditroff comment (a line beginning with .\") Xand should preferably occur near the beginning of the file. X XThe targets available through Newtext are: X X%.laser: Ditroff output, after putting %.orig through the listed X preprocessors. (The names of the preprocessor commands X and their options may be altered (see Newtext.defs).) X X%.refs: The list of bib references in the document. X%.srefs: %.refs sorted without duplicates. X%.cit: %.srefs looked up in a source bibliography. X This is useful for making a local copy of the X necessary references, allowing faster retrieval. X%.chnr: The output of checknr. X%.cheq: The output of checkeq. X%.ol: Outline for -me documents. X%.fix: A pseudo-target to invoke fix, an ispell-type spelling X corrector. X%.ispell: A pseudo-target to invoke ispell. X%.spell: A list of misspelled words in the document. X%.dict: Questionable phrases used in the document. X%.style: Readability indexes for the document. X%.astyle: Readability indexes for every sentence in the document. X%.exp: Expletives in the document (as defined by style(1)). X%.mod: Moderately hard-to-read sentences in the document. X%.hard: Hard-to-read sentences in the document. X%.long: Long sentences in the document. X%.pass: Sentences containing passives. X X%.all: Run the most useful document analysis programs: X %.spell, %.style, %.exp, %.mod, %.long, %.pass, %.dict X and %.chnr. X X%.count: X%.ocount: The number of words in a document, measured in two ways. X %.count counts equations, references, programs etc X as one word; %.ocount counts them as they appear. X X%.clean: Remove the files generated from %.orig. X%.vclean: Remove the files generated from %.frame. X Xclean: Run %.clean for all %.orig. Xvclean: Run %.vclean for all %.frame. SHAR_EOF if test 2265 -ne "`wc -c < 'Newtext.doc'`" then echo shar: "error transmitting 'Newtext.doc'" '(should have been 2265 characters)' fi fi echo shar: "extracting 'Nuprolog'" '(452 characters)' if test -f 'Nuprolog' then echo shar: "will not over-write existing file 'Nuprolog'" else sed 's/^X//' << \SHAR_EOF > 'Nuprolog' X#ifndef NC X#define NC nc X#endif X#ifndef NCFLAGS X#define NCFLAGS X#endif X#ifndef NITFLAGS X#define NITFLAGS X#endif X#ifndef LDFLAGS X#define LDFLAGS X#endif X X%.no: %.ns X NC NCFLAGS -c %.ns X X%.ns^: %.nl X NC NCFLAGS -S %.nl X X#define LINK_CMD NC LDFLAGS -o % X#define CHECK_CMD nit NITFLAGS X#define TAGS_CMD ptags X X#define SRCSUFF .nl X#define OBJSUFF .no X X#ifndef SUFFIXLIST X#ifdef USE_DCGS X#define SUFFIXLIST .nl .?? X#else X#define SUFFIXLIST .nl X#endif X#endif SHAR_EOF if test 452 -ne "`wc -c < 'Nuprolog'`" then echo shar: "error transmitting 'Nuprolog'" '(should have been 452 characters)' fi fi echo shar: "extracting 'Rcs'" '(853 characters)' if test -f 'Rcs' then echo shar: "will not over-write existing file 'Rcs'" else sed 's/^X//' << \SHAR_EOF > 'Rcs' X$ Cakefile for RCS. X X$ If you include this cakefile, every file you to update will X$ be checked if it can be retrieved from the RCS directory, X$ using co with the macro GETFLAGS as argument (default is -u). X$ You can check out files explicitly, in which case the argument X$ is COFLAG (default -l), and check in files, using ci, CIFLAGS X$ and CIMSG (both defaults empty). The targets get, co and ci X$ perform the respective action for all RCS files. X X#ifndef GETFLAGS X#define GETFLAGS -u X#endif X#ifndef COFLAGS X#define COFLAGS -l X#endif X#ifndef CIFLAGS X#define CIFLAGS X#endif X#ifndef CIMSG X#define CIMSG X#endif X X%: RCS/%,v if exist RCS/%,v X co GETFLAGS % X X%.co&: RCS/%,v if exist RCS/%,v X co COFLAGS % X X%.ci&: % if exist RCS/%,v X ci CIFLAGS CIMSG % X Xget&: [[sub RCS/X,v X RCS/*]] X Xco&: [[sub RCS/X,v X.co RCS/*]] X Xci&: [[sub RCS/X,v X.ci RCS/*]] SHAR_EOF if test 853 -ne "`wc -c < 'Rcs'`" then echo shar: "error transmitting 'Rcs'" '(should have been 853 characters)' fi fi echo shar: "extracting 'Sccs'" '(315 characters)' if test -f 'Sccs' then echo shar: "will not over-write existing file 'Sccs'" else sed 's/^X//' << \SHAR_EOF > 'Sccs' X$ Cakefile for SCCS. X X$ If you include this cakefile, every file you to update will X$ be checked if it can be retrieved from the SCCS directory, X$ using sccs get with the macro GETFLAGS as argument (default X$ is empty). X X#ifndef GETFLAGS X#define GETFLAGS X#endif X X%: SCCS/s.% if exist SCCS/s.% X sccs get GETFLAGS % SHAR_EOF if test 315 -ne "`wc -c < 'Sccs'`" then echo shar: "error transmitting 'Sccs'" '(should have been 315 characters)' fi fi echo shar: "extracting 'System'" '(3459 characters)' if test -f 'System' then echo shar: "will not over-write existing file 'System'" else sed 's/^X//' << \SHAR_EOF > 'System' X$ Cakefile to handle programs. X X$ Using System is appropriate if a directory contains the sources X$ for more than one binary; if the number of binaries is one, X$ you should use the cakefile Main. System (and Main) can handle X$ programs written in any language, as long as the cakefile X$ for that language defines the macros expected by System. These X$ macros are LINK_CMD, SRCSUFF, OBJSUFF and SUFFIXLIST. Currently X$ there exist cakefiles for C and NU-Prolog. These cakefile should X$ be included before System. X X$ System is intended to behave like Main; for basic documentation X$ see Main. The difference is that whereas the configuration of X$ a program can be given to Main as a single macro (FILES), a X$ file is needed to convey it to System. This file is named by the X$ macro CONF (default Conf). Each line of this file has on it X$ first, the name of the binary, second, a list of the names X$ of the sourcefiles that make up this binary (the source names X$ should not have the language-specific suffix; i.e. you should X$ strip the .c from the names of C source files). X X$ The target available with System are much the same as with Main. X$ The difference is that they are available in two versions. X$ When they are prefixed by the name of a binary, they apply X$ only to that binary; when they are not prefixed, they apply X$ to all binaries. For example, cake bin.lint runs CHECK_CMD on X$ the sources for the binary bin, while cake lint runs it on X$ the sources for all the binaries, using one run of CHECK_CMD X$ per binary. X X#ifndef PRINT_CMD X#define PRINT_CMD lpr -p X#endif X#ifndef INST_CMD X#define INST_CMD cp X#endif X#ifndef RM_CMD X#define RM_CMD rmv X#endif X X#ifndef LIB X#define LIB X#endif X X#ifndef CONF X#define CONF Conf X#endif X X#define MAINS [[mainfile "" CONF]] X#define FILES(x) [[extract x "" CONF]] X#define SRC(x) [[extract x SRCSUFF CONF]] X#define OBJ(x) [[extract x OBJSUFF CONF]] X#define ALLFILES [[extract "" "" CONF | sort -u]] X#define ALLSRC [[extract "" SRCSUFF CONF | sort -u]] X#define ALLOBJ [[extract "" OBJSUFF CONF | sort -u]] X Xxyzzy&:: MAINS X X%: OBJ(%) if % in MAINS X LINK_CMD OBJ(%) LIB X X#ifdef DEST X%.install&: % if % in MAINS X INST_CMD % DEST X#else X#ifdef HOME X%.install&: % if % in MAINS X INST_CMD % HOME/bin X#else X#define NOINSTALL X#endif X#endif X X#ifndef NOINSTALL Xinstall&: [[mainfile .install CONF]] X#endif X X#ifdef CHECK_CMD X#ifdef IRREL X%.lint&: SRC(%) if % in MAINS X CHECK_CMD SRC(%) LIB |& irrel IRREL X#else X%.lint&: SRC(%) if % in MAINS X CHECK_CMD SRC(%) LIB X#endif X Xlint&: [[mainfile .lint CONF]] X#endif X X%.print&: if % in MAINS X PRINT_CMD [[usrc SUFFIXLIST FILES(%)]] X @-touch .print.% X X%.uprint&: if % in MAINS X PRINT_CMD [[later .print.% [[usrc SUFFIXLIST FILES(%)]]]] X @-touch .print.% X Xprint&: X PRINT_CMD [[usrc SUFFIXLIST ALLFILES]] X @-touch .print X Xuprint&: X PRINT_CMD [[later .print [[usrc SUFFIXLIST ALLFILES]]]] X @-touch .print X X#ifdef TAGS_CMD Xtags: ALLSRC X TAGS_CMD ALLSRC X#endif X X#ifdef DEFS_CMD Xdefs: ALLSRC X DEFS_CMD ALLSRC > defs X#endif X X%.count&: if % in MAINS X wc -v [[usrc SUFFIXLIST FILES(%)]] X X%.ssize&: if % in MAINS X ssize [[usrc SUFFIXLIST FILES(%)]] X Xcount&: X wc -v [[usrc SUFFIXLIST ALLFILES]] X Xssize&: X ssize [[usrc SUFFIXLIST ALLFILES]] X X%.clean&: if % in MAINS X RM_CMD OBJ(%) [[gsrc SUFFIXLIST FILES(%)]] X X%.clobber&: %.clean if % in MAINS X RM_CMD % X Xclean&: X RM_CMD ALLOBJ [[gsrc SUFFIXLIST ALLFILES]] X Xclobber&: clean X RM_CMD MAINS SHAR_EOF if test 3459 -ne "`wc -c < 'System'`" then echo shar: "error transmitting 'System'" '(should have been 3459 characters)' fi fi echo shar: "extracting 'Text'" '(7149 characters)' if test -f 'Text' then echo shar: "will not over-write existing file 'Text'" else sed 's/^X//' << \SHAR_EOF > 'Text' X$ Obsolete cakefile for text processing. X X$ Use Newtext instead. X X#ifndef NOSPACE X#define SPACE X#endif X X#ifndef MPAC X#define MPAC -me X#endif X#ifndef LBLOPTS X#define LBLOPTS X#endif X#ifndef ROFFOPTS X#define ROFFOPTS X#endif X#ifndef BIBPROG X#define BIBPROG bib X#endif X#ifndef LASDEV X#define LASDEV -Pip X#endif X#ifndef PAGER X#define PAGER more X#endif X#ifndef PRINT X#define PRINT lpr X#endif X#ifndef PNDK X#define PNDK -Pcl X#endif X#ifndef PLASER X#define PLASER LASDEV -n X#endif X#ifndef PGEN X#define PGEN -Pbds X#endif X X#define need(prog) prog in [[needed %.orig]] X X#ifdef SPACE X#ifndef IDIR X#define IDIR /tmp/ X#endif X#ifndef FDIR X#define FDIR /tmp/ X#endif X#ifndef ADIR X#define ADIR X#endif X#define ISUFF lbl bib dte de d ne n base X#define FSUFF laser more nice fine X#define ASUFF refs cit chnr cheq ol spell double dict style astyle exp hard mod long pass count Count X#define NOSUFF frame orig all fix clean vclean X#else X#define IDIR X#define FDIR X#define ADIR X#endif X X/* general services */ X#ifndef SPACE X%1.%2.m&: %1.%2 X PAGER %1.%2 X X#ifdef CHUNK X%1.%2.p&: %1.%2 if %2 in laser X -@/bin/rm chunk* X troffchunk -n 6 %1.%2 X PRINT PLASER chunk* X#else X%1.%2.p&: %1.%2 if %2 in laser X PRINT PLASER %1.%2 X#endif X X%1.%2.p&: %1.%2 if %2 in fine nice X PRINT PNDK %1.%2 X X%1.%2.p&: %1.%2 if not %2 in laser fine nice X PRINT PGEN %1.%2 X X#else X%1.%2.m&: %1.%2 if %2 in NOSUFF X PAGER %1.%2 X X%1.%2.m&: IDIR/**/%1.%2 if %2 in ISUFF X PAGER IDIR/**/%1.%2 X X%1.%2.m&: FDIR/**/%1.%2 if %2 in FSUFF X PAGER FDIR/**/%1.%2 X X%1.%2.m&: ADIR/**/%1.%2 if %2 in ASUFF X PAGER ADIR/**/%1.%2 X X%1.%2.p&: %1.%2 if %2 in NOSUFF X PRINT PGEN %1.%2 X X%1.%2.p&: IDIR/**/%1.%2 if %2 in ISUFF X PRINT PGEN IDIR/**/%1.%2 X X#ifdef CHUNK X%1.%2.p&: FDIR/**/%1.%2 if %2 in laser X -@/bin/rm -f chunk* X troffchunk -n 6 FDIR/**/%1.%2 X PRINT PLASER chunk* X#else X%1.%2.p&: FDIR/**/%1.%2 if %2 in laser X PRINT PLASER FDIR/**/%1.%2 X#endif X X%1.%2.p&: FDIR/**/%1.%2 if %2 in more X PRINT PGEN FDIR/**/%1.%2 X X%1.%2.p&: FDIR/**/%1.%2 if %2 in fine nice X PRINT PNDK FDIR/**/%1.%2 X X%1.%2.p&: ADIR/**/%1.%2 if %2 in ASUFF X PRINT PGEN ADIR/**/%1.%2 X#endif X X#ifdef SPACE X%1.%2&: IDIR/**/%1.%2 if %2 in ISUFF and {{nonnull IDIR}} and not {{sub X1/X2 NULL %1 >& /dev/null}} X%1.%2&: FDIR/**/%1.%2 if %2 in FSUFF and {{nonnull FDIR}} and not {{sub X1/X2 NULL %1 >& /dev/null}} X%1.%2&: ADIR/**/%1.%2 if %2 in ASUFF and {{nonnull ADIR}} and not {{sub X1/X2 NULL %1 >& /dev/null}} X#endif X X/* soelim */ X%.orig: %.frame [[soincl %.frame]] if exist %.frame X soelim %.frame > %.orig X X/* lbl */ XIDIR/**/%.lbl^: %.orig* if need(lbl) X lbl LBLOPTS %.orig > IDIR/**/%.lbl X XIDIR/**/%.lbl^: %.orig* if not need(lbl) X @/bin/rm -f IDIR/**/%.lbl X ln -s [[/bin/pwd]]/%.orig IDIR/**/%.lbl X X/* bib */ XIDIR/**/%.bib^: IDIR/**/%.lbl %.orig* BIB if need(bib) X BIBPROG -p/**/BIBS -t/**/STYLE IDIR/**/%.lbl > IDIR/**/%.bib X XIDIR/**/%.bib^: IDIR/**/%.lbl %.orig* if need(listrefs) X listrefs -t/**/STYLE IDIR/**/%.lbl > IDIR/**/%.bib X XIDIR/**/%.bib^: IDIR/**/%.lbl %.orig* if not need(bib) and not need(listrefs) X @/bin/rm -f IDIR/**/%.bib X ln -s IDIR/**/%.lbl IDIR/**/%.bib X X/* laser pic */ XIDIR/**/%.dte^: IDIR/**/%.bib %.orig* if need(pic) X pic LASDEV PMAC IDIR/**/%.bib > IDIR/**/%.dte X XIDIR/**/%.dte^: IDIR/**/%.bib %.orig* if not need(pic) X @/bin/rm -f IDIR/**/%.dte X ln -s IDIR/**/%.bib IDIR/**/%.dte X X/* laser tbl */ XIDIR/**/%.de^: IDIR/**/%.dte %.orig* if need(tbl) X dtbl LASDEV IDIR/**/%.dte > IDIR/**/%.de X XIDIR/**/%.de^: IDIR/**/%.dte %.orig* if not need(tbl) X @/bin/rm -f IDIR/**/%.de X ln -s IDIR/**/%.dte IDIR/**/%.de X X/* laser eqn */ XIDIR/**/%.d^: IDIR/**/%.de %.orig* if need(eqn) X deqn LASDEV EMAC IDIR/**/%.de > IDIR/**/%.d X XIDIR/**/%.d^: IDIR/**/%.de %.orig* if not need(eqn) X @/bin/rm -f IDIR/**/%.d X ln -s IDIR/**/%.de IDIR/**/%.d X X/* laser troff */ XFDIR/**/%.laser:IDIR/**/%.d X ditroff -t LASDEV ROFFOPTS MPAC IMAGEN SIMLAS TMAC IDIR/**/%.d > FDIR/**/%.laser X X/* ndk tbl */ XIDIR/**/%.ne^: IDIR/**/%.bib %.orig* if need(tbl) X tbl IDIR/**/%.bib > IDIR/**/%.ne X XIDIR/**/%.ne^: IDIR/**/%.bib %.orig* if not need(tbl) X @/bin/rm -f IDIR/**/%.ne X ln -s IDIR/**/%.bib IDIR/**/%.ne X X/* ndk eqn */ XIDIR/**/%.n^: IDIR/**/%.ne %.orig* if need(eqn) X neqn EMAC IDIR/**/%.ne > IDIR/**/%.n X XIDIR/**/%.n^: IDIR/**/%.ne %.orig* if not need(eqn) X @/bin/rm -f IDIR/**/%.n X ln -s IDIR/**/%.ne IDIR/**/%.n X X/* ndk nroff */ XFDIR/**/%.more: IDIR/**/%.n X nroff ROFFOPTS MPAC SIMNDK TMAC IDIR/**/%.n > FDIR/**/%.more X XFDIR/**/%.nice: IDIR/**/%.n X nroff -F -e -TNDK12 ROFFOPTS MPAC SIMNDK TMAC IDIR/**/%.n > IDIR/**/%.tmp X @ndk -igrs IDIR/**/%.tmp | expand > FDIR/**/%.nice X @/bin/rm -f IDIR/**/%.tmp X XFDIR/**/%.fine: IDIR/**/%.n X nroff -F -e -TNDK10 ROFFOPTS MPAC SIMNDK TMAC IDIR/**/%.n > IDIR/**/%.tmp X @ndk -irs IDIR/**/%.tmp | expand > FDIR/**/%.fine X @/bin/rm -f IDIR/**/%.tmp X X/* analysis services */ X%.all&: %.spell %.double %.style %.exp %.mod %.long %.pass %.dict %.chnr X XIDIR/**/%.base^:%.orig* X base < %.orig | sed -e 's/XXX//g' > IDIR/**/%.base X XADIR/**/%.refs: %.orig* X refs < %.orig | tr ',' '\\\\012' | sed -e 's/^ *//' | sort -u > ADIR/**/%.refs X XADIR/**/%.cit: %.refs X lookup -p/**/BIBS < %.refs > ADIR/**/%.icit X @gred "No references found." ADIR/**/%.icit X sortbib ADIR/**/%.icit > ADIR/**/%.cit X @/bin/rm ADIR/**/%.icit X XADIR/**/%.chnr: %.orig* X checknr CHNROPTS TMAC %.orig > ADIR/**/%.chnr X XADIR/**/%.cheq: %.orig* X -checkeq CHEQOPTS EMAC %.orig > ADIR/**/%.cheq X XADIR/**/%.ol: %.orig* X ol %.orig > ADIR/**/%.ol X X%.fix&: %.orig* X fix -d DICT %.orig X XADIR/**/%.double:%.orig* X double %.orig > ADIR/**/%.double X XADIR/**/%.spell:IDIR/**/%.base X spell SPELLOPTS IDIR/**/%.base | tr A-Z a-z | comm -23 - DICT > ADIR/**/%.spell X XADIR/**/%.dict: IDIR/**/%.base X diction IDIR/**/%.base > ADIR/**/%.dict X XADIR/**/%.style:IDIR/**/%.base X style MPAC STYLEOPTS IDIR/**/%.base > ADIR/**/%.style X XADIR/**/%.astyle:IDIR/**/%.base X style MPAC STYLEOPTS -a IDIR/**/%.base > ADIR/**/%.astyle X XADIR/**/%.exp: IDIR/**/%.base X style MPAC STYLEOPTS -e IDIR/**/%.base > ADIR/**/%.exp X XADIR/**/%.hard: IDIR/**/%.base X style MPAC STYLEOPTS -r HARD IDIR/**/%.base > ADIR/**/%.hard X XADIR/**/%.mod: IDIR/**/%.base X style MPAC STYLEOPTS -r MOD IDIR/**/%.base > ADIR/**/%.mod X XADIR/**/%.long: IDIR/**/%.base X style MPAC STYLEOPTS -l LONG IDIR/**/%.base > ADIR/**/%.long X XADIR/**/%.pass: IDIR/**/%.base X style MPAC STYLEOPTS -p IDIR/**/%.base > ADIR/**/%.pass X XADIR/**/%.count:IDIR/**/%.base X deroff IDIR/**/%.base | wc > ADIR/**/%.count X XADIR/**/%.ocount:%.orig* X wc %.orig > ADIR/**/%.ocount X X%.clean&: X @echo cleaning up % X -@/bin/rm %.spell %.style %.astyle >& /dev/null X -@/bin/rm %.exp %.hard %.mod %.long %.pass >& /dev/null X -@/bin/rm %.dict %.count %.ocount %.base >& /dev/null X -@/bin/rm %.refs %.double %.ol %.chnr %.cheq >& /dev/null X -@/bin/rm %.dte %.de %.d %.ne %.n >& /dev/null X -@/bin/rm %.laser %.nice %.fine %.more >& /dev/null X X%.vclean&: X @echo cleaning up % very carefully X -@/bin/mv %.orig /tmp/%.orig.$$ >& /dev/null X Xclean&: [[sub -i X.orig X.clean *]] Xclean&: [[sub -i X.frame X.vclean *]] SHAR_EOF if test 7149 -ne "`wc -c < 'Text'`" then echo shar: "error transmitting 'Text'" '(should have been 7149 characters)' fi fi echo shar: "extracting 'Textdefs'" '(1276 characters)' if test -f 'Textdefs' then echo shar: "will not over-write existing file 'Textdefs'" else sed 's/^X//' << \SHAR_EOF > 'Textdefs' X$ This is a guide to the definitions needed by the Cakefile Text. X X#define BIBDIR /* pathname of your bibliography (90x) */ X#define LIBDIR /* pathname of your library (both) */ X X/* the following are on the 3240 */ X#define TMAC /* pathname of your nroff/troff macros */ X#define EMAC /* pathname of your equation macros */ X#define PMAC /* pathname of your troff macros for pic */ X X#define IMAGEN /* pathname of your troff macros for imagen */ X#define SIMLAS /* pathname of your symbol macros for imagen */ X#define SIMNDK /* pathname of your symbol macros for ndk */ X X/* the following are on the 90x */ X#define DICT /* pathname of your spell dictionary */ X#define STYLE /* pathname of your bib style file */ X X#define SPELLOPTS /* any spell options you wish, e.g. -b */ X#define STYLEOPTS /* any extra style options you wish */ X#define CHNROPTS /* any checknr options you wish */ X#define CHEQOPTS /* any checkeq options you wish */ X#define ROFFOPTS /* any extra xroff options (eg -o12-) */ X X#define HARD /* Readability Index you consider hard */ X#define MOD /* RI you consider moderately hard */ X#define LONG /* length of too long sentences */ X X#define BIB /* pathname of your own personal bibliography */ X#define BIBS /* list of pathnames of bibliographies for bib */ SHAR_EOF if test 1276 -ne "`wc -c < 'Textdefs'`" then echo shar: "error transmitting 'Textdefs'" '(should have been 1276 characters)' fi fi echo shar: "extracting 'Uas'" '(170 characters)' if test -f 'Uas' then echo shar: "will not over-write existing file 'Uas'" else sed 's/^X//' << \SHAR_EOF > 'Uas' X$ Cakefile for the uas machine-independent microassembler. X X#ifndef UASOPTS X#define UASOPTS X#endif X X%.uo %.ul %.um: [[uarch %.us]] %.us X uas UASOPTS [[uarch %.us]] %.us SHAR_EOF if test 170 -ne "`wc -c < 'Uas'`" then echo shar: "error transmitting 'Uas'" '(should have been 170 characters)' fi fi echo shar: "extracting 'Vlsi'" '(2395 characters)' if test -f 'Vlsi' then echo shar: "will not over-write existing file 'Vlsi'" else sed 's/^X//' << \SHAR_EOF > 'Vlsi' X$ Cakefile for VLSI X$ by Raymond Leung X$ University of New South Wales X X#ifndef plotter X# define plotter $TERM X#endif plotter X X#ifndef lambda X# define lambda 2.5 X#endif lambda X X#ifndef layers X# define layers d X#endif layers X X#ifndef PLOTSITE X# define PLOTCMD X#else X# define PLOTCMD | lpr PLOTSITE X#endif X X#define CADLIB /cad/lib X X$=================================================================== X Xhelp&: X @cat /cad/lib/bake.help X X%.tt: %.fdl X fidel < %.fdl > %.tt X X%.sl: %.tt if exist %.fdl X spla -t nmos -o % %.tt; X X%.pla&: %.tt X spla -t nmos -o % %.tt; X @echo "PLA is in file %.sl" X X%.cif: %.sl X jigsaw % X X%.slplot&: %.sl X slplot -t plotter % PLOTCMD X X%.cif: %.kic X (echo lambda; echo %.kic; echo layers) | kictocif | grep -s succ X X%.root&: %.cif X (echo n; echo lambda; echo %.cif) | ciftokic | grep -s succ X X%.plot&: %.cif X @echo "Try 'bake %.cplot'"; exit 1 X X%.cplot&: %.cif X cifplot -t plotter -h %.cif %.cif PLOTCMD X X%.sim: %.cif X galah %.cif X @-grep -v '^|' < %.sim | tr " " "\012" | grep '#' | sort -u > %.x2 X @-if [ -s %.x2 ]; then \ X echo many nodes, one name:; cat %.x2 \ X else \ X echo \ X fi X @-if [ -s %.al ]; then \ X echo many names, one node:; cat %.al \ X else \ X echo \ X fi X X%.tout: %.tin %.sim X trek %.sim < %.tin X X%.tplot&: %.tout X simplot -t plotter -h % %.tout PLOTCMD X X%.tprint: %.tout if not exist %.f X simprint %.tout > %.tprint X X%.tprint: %.tout %.f if exist %.f X simprint -f %.f %.tout > %.tprint X X%.spice %.names: %.sim X simtospice %.sim X X%.spint: %.sim X runspice -n % X X%.spout: %.spice %.spin %.names X runspice % X @echo X @echo "Spice finished" X X%.splot&: %.spout X schange % | simplot -t plotter -h % PLOTCMD X X%.ssplot&: %.spout X spiceplot -t plotter %.spout PLOTCMD X X%.sprint: %.spout if not exist %.f X schange % | simprint > %.sprint X X%.sprint: %.spout %.f if exist %.f X schange % | simprint -f %.f > %.sprint X X%.box: %.cif X ciftobox %.cif > %.box X X%.vplot&: %.vout X vchange %.vout | simplot -t plotter -h % PLOTCMD X X%.vprint: %.vout if not exist %.f X vchange %.vout | simprint > %.vprint X X%.vprint: %.vout %.f if exist %.f X vchange %.vout | simprint -f %.f > %.vprint X X%.aout: %.ain %.sim X asim %.sim < %.ain X X%.aplot&: %.aout X simplot -t plotter -h % %.aout PLOTCMD X Xclean&: X -/bin/rm *.log *.rec *.drc *.def *.list *.names *.temp *.nodes cifplot.kic *[0-9][0-9][0-9] >& /dev/null SHAR_EOF echo shar: "1 control character may be missing from 'Vlsi'" if test 2395 -ne "`wc -c < 'Vlsi'`" then echo shar: "error transmitting 'Vlsi'" '(should have been 2395 characters)' fi fi echo shar: "extracting 'Yacc'" '(548 characters)' if test -f 'Yacc' then echo shar: "will not over-write existing file 'Yacc'" else sed 's/^X//' << \SHAR_EOF > 'Yacc' X$ Cakefile to handle yacc files. X X$ It renames the output file of yacc so that it has the same X$ basename as the source file. The value of the macro YFLAGS X$ is passed on to yacc. X X$ This cakefile was written to work with the cakefile C and one X$ of the cakefiles Main and System. X X#ifndef YFLAGS X#define YFLAGS -d X#endif X X%.c^ %.h@: %.y if exist %.y and "-d" in [[echo YFLAGS]] X yacc YFLAGS %.y X @mv y.tab.h %.h X @mv y.tab.c %.c X X%.c^: %.y if exist %.y and not "-d" in [[echo YFLAGS]] X yacc YFLAGS %.y X @mv y.tab.c %.c X X#define USE_YACC SHAR_EOF if test 548 -ne "`wc -c < 'Yacc'`" then echo shar: "error transmitting 'Yacc'" '(should have been 548 characters)' fi fi echo shar: "extracting 'Zs_defs'" '(767 characters)' if test -f 'Zs_defs' then echo shar: "will not over-write existing file 'Zs_defs'" else sed 's/^X//' << \SHAR_EOF > 'Zs_defs' X$ Site-dependent definitions for the obsolete cakefile Text. X X#ifdef LW X#define LASDEV -Plw X#endif X#ifdef AN X#define LASDEV -Pan X#endif X X#define LIBDIR HOME/lib X#define BIBDIR /usr/bib X X#define TMAC LIBDIR/tmac.e.zs X#define EMAC LIBDIR/emac.zs X#define PMAC LIBDIR/pmac.zs X X#define IMAGEN LIBDIR/imagen X#define SIMLAS LIBDIR/Symbols.Imagen X#define SIMNDK LIBDIR/Symbols.NDK X X#define DICT LIBDIR/dict X#define STYLE LIBDIR/style X X#define STYLEOPTS X#define SPELLOPTS -b X#define CHEQOPTS X#define CHNROPTS X X#define MOD 16 X#define HARD 19 X#define LONG 25 X X#define JAS BIBDIR/jas/INDEX X#define LOGIC BIBDIR/logic/INDEX X#define VLSI BIBDIR/vlsi/INDEX X#define BIB BIBDIR/zs/INDEX X$define BIBS JAS,LOGIC,VLSI,BIB X$define BIBS JAS,INDEX X$define BIBS INDEX,JAS X#define BIBS INDEX SHAR_EOF if test 767 -ne "`wc -c < 'Zs_defs'`" then echo shar: "error transmitting 'Zs_defs'" '(should have been 767 characters)' fi fi echo shar: "extracting 'Zs_newdefs'" '(379 characters)' if test -f 'Zs_newdefs' then echo shar: "will not over-write existing file 'Zs_newdefs'" else sed 's/^X//' << \SHAR_EOF > 'Zs_newdefs' X$ Site-dependent definitions for the cakefile Newtext. X X#define LIBDIR /u/pgrad/zs/lib X X#define DITROFFINIT LIBDIR/init.me X#define SYMBOLIMAGEN LIBDIR/Symbols.imagen X#define SYMBOLAPPLE LIBDIR/Symbols.apple X#define OTHERMACS LIBDIR/tmac.e.zs X#define EQNOPTS LIBDIR/emac.zs X#define SPELLDICT LIBDIR/dict X#define SPELLOPTS -b X#define BIBSTYLE -t LIBDIR/style X X#define INTFLAG ^ SHAR_EOF if test 379 -ne "`wc -c < 'Zs_newdefs'`" then echo shar: "error transmitting 'Zs_newdefs'" '(should have been 379 characters)' fi fi exit 0 # End of shell archive