Below is the current copy of SEP.idoc.rules. You might also like to look at SEP.defs but it is not very interesting to read, and certainly not worth printing here.
/* keywords: idoc idocrules idocrule idoc.rules idoc.rules rules rule */ #ifndef FIGLIST #define FIGLIST #endif #ifndef FIGDIR #define FIGDIR . #endif#include <SEP.class.defs>
$ make .ps and/or .ps.save figures&: [[ sub -i X X.figure FIGLIST ]] $ remove .v .ps .A burn&: [[ sub -i X X.burn FIGLIST ]] $ remove .ps burnps&: [[ sub -i X X.burnps FIGLIST ]] $ show .v or .v3 (or .save) tube&: [[ sub -i X X.tube FIGLIST ]] $ show .v or .v3 even out-of-date otube&: [[ sub -i X X.otube FIGLIST ]] $ make .v and .v3 vplots&: [[ sub -i X X.vplot FIGLIST ]] $ caption interaction pushbutton. idoc&: [[ sub -i X X.idoc FIGLIST ]] $ $ the next three rules are unannounced $ if .v.saved exists, remove .v unvplot&: [[ sub -i X X.unvpl FIGLIST ]] $ mv %.orig % restore&: [[ sub -i X X.restore FIGLIST ]] $ if .p.orig exists, remove .p makecd&: [[ sub -i X X.makecd FIGLIST ]]
#define REDUNDANT ( exist FIGDIR/%.v.save and exist FIGDIR/%.v ) %.unvpl& : if REDUNDANT /bin/rm FIGDIR/%.v
%.unvpl& : if not REDUNDANT
%.burn&: %.burnA -/bin/rm -f FIGDIR/%.ps -/bin/rm -f FIGDIR/%.v
%.burnA&: if exist FIGDIR/%.A -Rm FIGDIR/%.A
%.burnA&: if not exist FIGDIR/%.A $ echo "nothing to do"
%.burnps& : if not exist FIGDIR/%.v.save -/bin/rm -f FIGDIR/%.ps
%.burnps& : if exist FIGDIR/%.v.save -/bin/rm -f FIGDIR/%.ps.save
%.figure&: FIGDIR/%.ps.save if exist FIGDIR/%.v.save
%.figure&: FIGDIR/%.ps if not exist FIGDIR/%.v.save
%.vplot&: FIGDIR/%.v if cando FIGDIR/%.v
%.vplot&: if not cando FIGDIR/%.v
#ifndef PSARGS # ifdef HARDCOPY # define PSARGS color=n fat=1 fatmult=1.5 $# define PSARGS color=n fat=1 fatmult=1.5 invras=n # else # define PSARGS color=y # endif #endif
#define PSTEXPEN(A,B) pstexpen FIGDIR/A FIGDIR/B PSARGS FIGDIR/%.ps.save : FIGDIR/%.v.save PSTEXPEN(%.v.save,%.ps.save)
FIGDIR/%.ps : FIGDIR/%.v PSTEXPEN(%.v,%.ps)
#define TUBEMOVIE ( cando FIGDIR/%.v3 or exist FIGDIR/%.v3.save ) %.tube&: %.tube1 if not TUBEMOVIE
%.tube&: %.tube3 if TUBEMOVIE
/* if all else fails bring up ghostview Martin */ %.tube&: %.tubeg if not cando %.tube1 and not cando %.tube3
%.tube1&: FIGDIR/%.v if cando FIGDIR/%.v TUBE FIGDIR/%.v
%.tube1&: FIGDIR/%.v.save if exist FIGDIR/%.v.save and not cando FIGDIR/%.v TUBE FIGDIR/%.v.save
%.tube3&: FIGDIR/%.v3 if cando FIGDIR/%.v3 TUBE FIGDIR/%.v3
%.tube3&: FIGDIR/%.v3.save if exist FIGDIR/%.v3.save and not cando FIGDIR/%.v3 TUBE FIGDIR/%.v3.save
%.tubeg&: if exist FIGDIR/%.ps ghostview FIGDIR/%.ps
%.tubeg&: if exist FIGDIR/%.ps.save ghostview FIGDIR/%.ps.save
%.otube&: %.otube1 if not TUBEMOVIE
%.otube&: %.otube3 if TUBEMOVIE
%.otube1&: TUBE FIGDIR/%.v
%.otube3&: TUBE FIGDIR/%.v3
/*********************************************/
%.idoc & : %.action if cando %.action
%.idoc & : %.defaction if not cando %.action
%.idoc & : %.tube if ( not cando %.action and not cando %.defaction )
%.defaction& : FIGDIR/%.A if cando FIGDIR/%.A < FIGDIR/%.A MOVIE
%.defaction& : FIGDIR/%.A.save if not cando FIGDIR/%.A and exist FIGDIR/%.A.save < FIGDIR/%.A.save MOVIE
/*************************************************************/ /* latest and greatest menu and xtpanel interaction from Martin and Dave*/
#ifdef NOXTPANEL #define XTPANEL exist fred_the_fireman #define XTPANELCPP exist bob_the_butcher #define EDPAR exist joe_the_baker #else #define XTPANEL ( exist %.p.orig or exist %.panel ) #define XTPANELCPP ( exist %.panel.pp ) #define EDPAR ( ( exist %.p.orig and not exist %.panel ) and ok %.vplot ) $#define EDPAR ( exist %.p.orig and not exist %.panel ) #endif
#define ALL_P [[ sub X.p X.p.orig [[ echo -n *.p.orig |sed 's,p.orig,,g' ]] ]]
#define ALL_ORIG [[ sub X X.restore [[ echo -n *.orig |sed 's,.orig,,g' ]] ]]
/* we have no real interaction provided */ #define CANT_INTERACT ( (not cando %.action ) and (not cando %.defaction) )
/* truely non reproducable: we do not want destroy/rebuild buttons */ #define NONREP ( not cando FIGDIR/%.ps )
#define FIGWARN ( exist %.warning )
/* those *.xtpanel files live in /usr/local/lib/X11/xtpanel */ /* source is in interact/chooser */
%.defaction&: if EDPAR xtpanel -var name % -file chooser.xtpanel
%.defaction&: %.panel if XTPANEL xtpanel -file %.panel
%.defaction&: %.panel.pp if XTPANELCPP xtpanel -cpp -file %.panel.pp
/* cake -DNOXTPANEL %.idoc*/
/*********************************************/
/* alternatively to cake %.idoc issued from the document, */ /* we can issue cake %.menu, then we get a menu that to work interactively */
%.menu&: if ( CANT_INTERACT and NONREP and FIGWARN ) xtpanel -cpp -var mechanism cake -var name % -DNOREBUILD -DFIGWARN -file builder.xtpanel >&/dev/null &
%.menu&: if ( CANT_INTERACT and NONREP ) xtpanel -cpp -var mechanism cake -var name % -DNOREBUILD -file builder.xtpanel >&/dev/null &
%.menu&: if ( CANT_INTERACT and FIGWARN ) xtpanel -cpp -var mechanism cake -var name % -DFIGWARN -file builder.xtpanel >&/dev/null &
%.menu&: if ( NONREP and FIGWARN ) xtpanel -cpp -var mechanism cake -var name % -DINTERACT -DNOREBUILD -DFIGWARN -file builder.xtpanel >&/dev/null &
%.menu&: if ( CANT_INTERACT ) xtpanel -cpp -var mechanism cake -var name % -file builder.xtpanel >&/dev/null &
%.menu&: if ( NONREP ) xtpanel -cpp -var mechanism cake -var name % -DINTERACT -DNOREBUILD -file builder.xtpanel >&/dev/null &
%.menu&: if ( FIGWARN ) xtpanel -cpp -var mechanism cake -var name % -DINTERACT -DFIGWARN -file builder.xtpanel >&/dev/null &
/* this is default */
%.menu&: xtpanel -cpp -var mechanism cake -var name % -DINTERACT -file builder.xtpanel >&/dev/null &
/*********************************************/ /* restoration of crucial files */
/* called from cleaner.xtpanel */ all.restore&: ALL_ORIG
%.saverestore&: if exist %.orig and not exist % /bin/cp %.orig %
%.saverestore&: if not (exist %.orig and not exist %) @echo % not restored since % exists already
%.restore& : if exist %.orig /bin/cp %.orig %
%.makecd& : if exist %.p.orig /bin/rm %.p
/********************************************/
dvi& : PAPER.dvi
PAPER.dvi : figures PAPER.tex @-/bin/rm -f .aux .bbl texpr TEXPROPTS -v -bib -d PAPER.tex
view& read&: figures PAPER.dvi texpr TEXPROPTS -v PAPER.dvi
ghost&: figures PAPER.dvi xtex -useGhostScript true PAPER.dvi
print&: figures PAPER.tex @-/bin/rm -f .aux .bbl texpr TEXPROPTS -bib PAPER.tex
/*********************************************/ /* cleaning rules */
$ martin's tex cleanup texclean&: -RM_CMD *.dvi *.aux *.bbl *.blg *.log TEX*
jclean&: klean.usual klean.fort klean.cmfort
klean.usual& : @-/bin/rm -f .o .x .H .A .M .ps .v .v3 .V .trace @-/bin/rm -f junk @-/bin/rm -f core @-/bin/rm -f a.out @-/bin/rm -f mon.out @-/bin/rm -f paper.log
klean.fort& : [[ sub -i X.f X.klean * ]]
#define CAN_MAKE_FORT exist %.r or exist %.rs or exist %.rt or exist %.rst or exist %.fs %.klean&: if CAN_MAKE_FORT @-/bin/rm %.f
%.klean&: if not ( CAN_MAKE_FORT )
klean.cmfort& : [[ sub -i X.fcm X.klean * ]]
#define CAN_MAKE_CMFORT exist %.rcm %.klean&: if CAN_MAKE_CMFORT @-/bin/rm %.fcm
%.klean&: if not ( CAN_MAKE_CMFORT )
$ Make a dummy install target for every cakefile. install&: $ This is done sequentially with nontrivial install targets, if any. $ There should be some way to turn off the message "install is up to date"