# By Julian H. Stacey jhs@ # Called as .include # Source: ~jhs/public_html/src/bsd/fixes/FreeBSD/src/jhs/share/mk/berklix2.mk # Target: /usr/share/mk/berklix2.mk -> ../../../site/usr/share/mk/berklix2.mk # Copyright Julian Stacey 1995-2003, Releasable as per BSD. # # Makefile macros for text data, to specify default dependencies & rules for: # Formats: Tex Groff, Html, Postscript, Fax, etc # Tools: Latex, Groff, Le, tbl, soelim, etc # WYSIWYG Combination Tools: {vi + ghostview}, {vi + chimera}, # {vi + xfig} # JJLATER Add something to keep all the null for loops quiet # when doing a make clean. # JJLATER Add a wysiwig macro to vi *.txt files # JJLATER Add something to SUBDIR to stop clean descending into .xvpics # that has no Makefile # JJLATER Reduce duplicate .tiff & .tif rules to a symbolic link # JJLATER BUG: # Never let a filename have an = in ! # If a directory contains files names eg # amsterdam.tiff # london=londres.tiff # typing "make" will first produce amsterdam.pdf, then recurse # infinitely trying to make london=londres.pdf, because it # will invoke a sub make, of form "make london=londres.pdf" # & make sees that as assigning value londres.pdf to variable # named london & then provides no target name to make, so it # defaults to making l_rof recursively. #------------------------------------------------------------------------------ # Where a Makefile uses both # .include # .include # they should be in the above order, bsd.prog.mk before berklix.mk so that the # clean: dependency works, for instance # ~jhs/public_html/src/bsd/jhs/bin/public/satelite/ # will not clean the satelite.o if it''s the other way round. #------------------------------------------------------------------------------ # Analysis of make operators. # Definition Command Issued Result # XX := ls *.ps ls *.ps ls *.ps # XX := `ls *.ps` `ls *.ps` aa.ps bb.ps date.ps # XX := echo *.ps echo *.ps echo *.ps # XX := `echo *.ps` `echo *.ps` aa.ps bb.ps date.ps # XX != ls *.ps aa.ps bb.ps aa.ps bb.ps # XX != `ls *.ps` null null # XX != echo *.ps aa.ps bb.ps aa.ps bb.ps # XX != `echo *.ps` null null # xx: # date > date.ps # echo x${XX}x # It''s better to use `ls *.l_rof` than `echo *.l_rof` # for the case where there is no *.l_rof #============================================================================= # Suffix precedence order for default rules. # Ref. 4.9-RELEASE/usr/share/doc/psd/12.make/paper.ascii.gz. # - A precursor line containing just ".SUFFIXES:" would flush all suffixes # before defining my own, but I''m not that draconian. # - The more to the left a suffix is, the higher priority it has to be source # rather than some other source, when choosing a source to make a dependency. # Whether the dependency is to left or right of source make no difference # I believe. If both Thing.high & Thing.low exist, with either of these # .SUFFIXES: .high .low .out # .SUFFIXES: .out .high .low # Thing.out will be built from Thing.high. # I think it''s also nice (though not necessary) to list in this order: # .SUFFIXES: .high .low .out # I haven''t yet checked the next SUFFIX line complies with this requirement # .SUFFIXES: .m4 .l_rof .e_rof .rof .l_lmth .e_lmth .lmth .l_html \ # .e_html .html .vhtml .l_tex .e_tex .tex .fig .vfig \ # .fax .tiff .tif .dvi .pdf .ps .vps .Vps .txt .lst \ # .dos .latin1 .pcl_ps .pcl_rof .ppm .wav .mp3 .epson .bjccolor \ # .bjc600 .vbjccolor .vbjc600 .cdj670 .vcdj670 .jpg \ # .gif .gif_transparent # Above is pre 2011_11_30, below is cos I moved .jpg before .tif # (to conert scans from jes@) .SUFFIXES: \ .m4 \ .l_rof \ .e_rof \ .rof \ .l_lmth \ .e_lmth \ .lmth \ .l_html \ .e_html \ .html \ .vhtml \ .l_tex \ .e_tex \ .tex \ .fig \ .vfig \ .fax \ .jpg \ .tiff \ .tif \ .dvi \ .pdf \ .ps \ .vps \ .Vps \ .txt \ .lst \ .dos \ .latin1 \ .pcl_ps \ .pcl_rof \ .ppm \ .wav \ .mp3 \ .epson \ .bjccolor \ .bjc600 \ .vbjccolor \ .vbjc600 \ .cdj670 \ .vcdj670 \ .gif \ .gif_transparent \ # EXTRACTION: # First we create 2 (or more) sym links, one per language to extract, # so each language has a visible rebuild dependency when the master changes. # Then we make language extracted files. # .l_rof: A dual language master file, to be extracted in le format, # to 2 or more seperate .rof language files, # (le extracts 1 language from several, including common chunks). # .e_rof: Symbolic links (one per language) pointing to a common # multiple language .l_rof file in ``le'' format. Example: # document_e.e_rof@ -> document.l_rof # document_g.e_rof@ -> document.l_rof # .rof A file to be text formatted by groff to output eg postscript. # .l_lmth: A dual language .lmth to be extracted with ``le'' to produce 2 # .lmth files # .e_lmth Symbolic links (one per language) to a common .l_lmth file. # used by ``le'' to produce 2 or more .lmth files. # .lmth: Needs something prepending & appending before producing .html. # .bjc600 is bjc monochrome, # .bjccolor is bjc colour # A .bjccolor seems to print black, even if the black tank # is removed, making the black from a combination of colours, # so unless the electronics is detecting tank absence & # compensating, it may regularly be doing that, in whih case, # best to put in the other black only tank. # .pdf & .ps # I raised priority of PDF above PS, as eg a downloaded PDF (GEA Prog, # with a few pictures in colour) of 150K became 3.8M of .ps & shrank # again to 111K of .pcl. # ghif # Only places that manipulate gifs are ~/public_html/gifs/ # http://www.berklix.com/vsl/Makefile # http://www.berklix.com/vsl/card.gif.comment # Fax order is problematic: there are both fax2ps & ps2fax commands. #------------------------------------------------------------------------------ T_JHS = "berklix2.mk:" # Tag in typescript log to assist searching. T_START = "echo ${T_JHS} START LABEL" T_END = "echo ${T_JHS} END LABEL" # DEBUG = yes .if ! defined (DEBUG) #{ ECHO_BUILD = true ECHO_END = true ECHO_START = true CMD_FOR_BUILD = @-for CMD_FOR_CLEAN = @for ECHO_DOING = true .else #}{ ECHO_BUILD = echo ECHO_END = echo ECHO_START = echo CMD_FOR_BUILD = -for CMD_FOR_CLEAN = for ECHO_DOING = echo .endif #} #------------------------------------------------------------------------------ BERKLIX_MK = /usr/share/mk/berklix.mk PATH_MK = http://www.berklix.com/src/share/mk PATH_LE = http://www.berklix.com/src/bin/le BERKLIX_SRC = ${PATH_MK}/berklix.mk BERKLIX2_SRC = ${PATH_MK}/berklix2.mk A4_HEIGHT_I = 11.6944 # from man gs, if vertical portrait A4_WIDTH_I = 8.26389 # from man gs, if vertical portrait ACROREAD = /usr/local/bin/acroread CMPD = /usr/local/bin/cmpd DJPEG = /usr/local/bin/djpeg DVIPS = /usr/local/bin/dvips DVIPS2ASCII = /usr/local/bin/dvips2ascii FAX2PS = /usr/local/bin/fax2ps GHOSTVIEW = /usr/local/bin/ghostview GS = /usr/local/bin/gs GV = /usr/local/bin/gv INFO = /usr/local/bin/info INFOKEY = /usr/local/bin/infokey INSTALL-INFO = /usr/local/bin/install-info ISPELL = /usr/local/bin/ispell ISPELLAFTERVI = /home/jhs/bin/.sh/ispell_after_vi LAME = /usr/local/bin/lame LATEX = /usr/local/bin/latex LATEX2HTML = /usr/local/bin/latex2html LE = /usr/local/bin/le MAKEINFO = /usr/local/bin/makeinfo PDF2PS = /usr/local/bin/pdf2ps PDFLATEX = /usr/local/bin/pdflatex PNMTOJPEG = /usr/local/bin/pnmtojpeg # ppmtojpeg -> pnmtojpeg PNMTOTIFF = /usr/local/bin/pnmtotiff PPMTOGIF = /usr/local/bin/ppmtogif PS2PDF = /usr/local/bin/ps2pdf PSNUP = /usr/local/bin/psnup PSSELECT = /usr/local/bin/psselect PSTOPNM = /usr/local/bin/pstopnm PSTOPS = /usr/local/bin/pstops TEXI2DVI = /usr/local/bin/texi2dvi TEXI2PDF = /usr/local/bin/texi2pdf TEXINDEX = /usr/local/bin/texindex TIDYAFTERVI = /home/jhs/bin/.sh/tidy_after_vi TIFF2PS = /usr/local/bin/tiff2ps TIFF2PS_ARGS = -a TIFF2PS_ARGS_LANDSCAPE = -h${A4_WIDTH_I} -w${A4_HEIGHT_I} TIFF2PS_ARGS_PORTRAIT = -h${A4_HEIGHT_I} -w${A4_WIDTH_I} XDVI = /usr/local/bin/xdvi XPDF = /usr/local/bin/xpdf UMLAUTS_INC = /usr/share/tmac/umlauts.rof COMMON_INC = /usr/share/tmac/common.rof #------------------------------------------------------------------------------ # Later possible additions: # - html2ascii using lynx -dump # - latex2html using tth # - latex2ps direct # - latex2pdf direct #------------------------------------------------------------------------------ # Keep this as first target, .if !target(all) #{ all: _all .endif #} #------------------------------------------------------------------------------ _all: le @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" make all2 @# all2 cannot be on dependency line, as we need to re-evaluate @# dependencies after links are made by le @${ECHO_END} "${T_END} $@" # } #------------------------------------------------------------------------------ .if !target(all2) #{ all2: l_lmth e_lmth lmth l_html e_html html l_rof e_rof rof \ l_tex e_tex tex dvi pdf ps .if defined(ALL) #{ make ${ALL} .endif #} @# No: epson txt lst dos latin1 fax fig @# Too big to generate by default: bjccolor bjc600 .endif #} #------------------------------------------------------------------------------ .if !target(install) #{ install: @# Dummy, to satisfy a standard recursive make from $(HOME) @echo "berklix.mk assigns a dummy $@ label in `pwd`" .endif #} #------------------------------------------------------------------------------ .if !target(obj) #{ obj: @# Dummy, to satisfy a standard recursive make from $(HOME) @echo "berklix.mk assigns a dummy $@ label in `pwd`" .endif #} #------------------------------------------------------------------------------ .if !target(cleandir) #{ cleandir: @# Dummy, to satisfy a standard recursive make from $(HOME) @echo "berklix.mk assigns a dummy $@ label in `pwd`" .endif #} #------------------------------------------------------------------------------ SIG_REOPEN = SIGUSR1 # SIG_REOPEN is the signal(2) sent for a # reload by {ghostview, chimera, xfig}. #------------------------------------------------------------------------------ # Explanation of `ls *.rof` type usage: # If a directory just has just 2 files photo.ps & photo.pcl # then the command # for i # in `ls *.rof` ; rm `basename $i .rof`.ps ; done # will unwantedly # remove photo.ps, as *.rof gets passed to $i as un unevaluated # literal, this also happens with for i in `echo *.rof`, # however # with for i in `ls *.rof` it is safe. # The 2> /dev/null was # added to stop too many noisy for loops emitting eg: # ls: # *.l_html: No such file or directory #------------------------------------------------------------------------------ DONT_EDIT = "DO NOT EDIT ${.TARGET} Built from ${.IMPSRC}" #------------------------------------------------------------------------------ # Only define FOR* eg FOR_L_ROF in individual Makefiles # in the # unlikely event you dont want the for loops to run # on all *.l_rof # or to generate output files such as .ps files # Example: I do define # FOR_L_ROF in my cv directory # as I have special rules there. .if !defined(FOR_TXT) #{ FOR_TXT := `ls *.txt 2> /dev/null` .endif #} .if !defined(FOR_CDJ670) #{ FOR_CDJ670 := `ls *.cdj670 2> /dev/null` .endif #} .if !defined(FOR_BJC600) #{ FOR_BJC600 := `ls *.bjc600 2> /dev/null` .endif #} .if !defined(FOR_BJCCOLOR) #{ FOR_BJCCOLOR := `ls *.bjccolor 2> /dev/null` .endif #} .if !defined(FOR_DVI) #{ FOR_DVI := `ls *.dvi 2> /dev/null` .endif #} .if !defined(FOR_EPSON) #{ FOR_EPSON := `ls *.epson1 2> /dev/null` .endif #} .if !defined(FOR_E_HTML) #{ FOR_E_HTML := `ls *.e_html 2> /dev/null` .endif #} .if !defined(FOR_E_LMTH) #{ FOR_E_LMTH := `ls *.e_lmth 2> /dev/null` .endif #} .if !defined(FOR_E_ROF) #{ FOR_E_ROF := `ls *.e_rof 2> /dev/null` .endif #} .if !defined(FOR_E_TEX) #{ FOR_E_TEX := `ls *.e_tex 2> /dev/null` .endif #} .if !defined(FOR_FAX) #{ FOR_FAX := `ls *.fax 2> /dev/null` .endif #} # I believe fax is a tiff format, whether it''s bidirectionally 1:1 # format # & tiff always == fax I dont know. Comment welcome. # # scanjet outputs .tiff using scanimage in http://www.berklix.com/scanjet/ .if !defined(FOR_TIFF) #{ FOR_TIFF := `ls *.tiff 2> /dev/null` .endif #} # tiffsplit outputs .tif .if !defined(FOR_TIF) #{ FOR_TIF := `ls *.tif 2> /dev/null` .endif #} .if !defined(FOR_FIG) #{ FOR_FIG := `ls *.fig 2> /dev/null` .endif #} .if !defined(FOR_HTML) #{ FOR_HTML := `ls *.html 2> /dev/null` .endif #} .if !defined(FOR_LATIN1) #{ FOR_LATIN1 := `ls *.latin1 2> /dev/null` .endif #} .if !defined(FOR_LMTH) #{ FOR_LMTH := `ls *.lmth 2> /dev/null` .endif #} .if !defined(FOR_L_HTML) #{ FOR_L_HTML := `ls *.l_html 2> /dev/null` .endif #} .if !defined(FOR_L_LMTH) #{ FOR_L_LMTH := `ls *.l_lmth 2> /dev/null` .endif #} .if !defined(FOR_L_ROF) #{ FOR_L_ROF := `ls *.l_rof 2> /dev/null` .endif #} .if !defined(FOR_L_TEX) #{ FOR_L_TEX := `ls *.l_tex 2> /dev/null` .endif #} .if !defined(FOR_PCL_ROF) #{ FOR_PCL_ROF := `ls *.pcl_rof 2> /dev/null` .endif #} .if !defined(FOR_PCL_PS) #{ FOR_PCL_PS := `ls *.pcl_ps 2> /dev/null` .endif #} .if !defined(FOR_PS) #{ FOR_PS := `ls *.ps 2> /dev/null` .endif #} .if !defined(FOR_PDF) #{ FOR_PDF := `ls *.pdf 2> /dev/null` .endif #} .if !defined(FOR_ROF) #{ FOR_ROF := `ls *.rof 2> /dev/null` .endif #} .if !defined(FOR_TEX) #{ FOR_TEX := `ls *.tex 2> /dev/null` .endif #} .if !defined(FOR_TIFF2PS) #{ FOR_TIFF2PS := `ls *.tiff 2> /dev/null` .endif #} .if !defined(FOR_GROFF_HTML_JUNK) #{ FOR_GROFF_HTML_JUNK := `ls groff-html-[0-9]*-[0-9]*.png 2> /dev/null` .endif #} LANGS ?= e g # LANGS e g for english & german, used by le -e & le -g, & also used in # filename_e.tex file_g.ps etc. # Sometimes the le program is not used to filter languages, but other things, # eg ~/job/groff/card/paper/Makefile uses it for different people``s # business cards. .if !defined(FOR_WAV) #{ FOR_WAV := `ls *.wav 2> /dev/null` .endif #} .if !defined(FOR_PS) #{ FOR_MP3 := `ls *.mp3 2> /dev/null` .endif #} #============================================================================== # SINGLE TARGETS LE EXTRACTORS # Example: label rof generates all *.rof files. #------------------------------------------------------------------------------ .if !target(le) #{ le: l_ e_ @# This creates seperate language copies of any multi language masters @# JJLATER do I need le to depend on e_ as well as l_ ? @# Probably not, now I''ve seperated naming for link & extract stages. @# . l_: l_rof l_lmth l_html l_tex e_: e_rof e_lmth e_html e_tex .if defined(SUBDIR) # Allow recursion. # Occasionally I need to manualy call le to recurse down # before then calling clean. As a clean on its own wont otherwise see # longer names to purge. le: _SUBDIR .endif .endif #} #------------------------------------------------------------------------------ # MORE SINGLE TARGETS IN ALPHABETIC ORDER #------------------------------------------------------------------------------ # bsd.subdir.mk also has a target .txt, with no .if before it. .if !target(txt) #{ txt: rof ps # ps is for tex > ps > txt @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_ROF} ; do \ make `basename $$i .rof`.txt ; \ done @# I could add something to ignore warnings such as @# warning: can''t find font ``H'' ${CMD_FOR_BUILD} i in ${FOR_TEX} ; do \ make `basename $$i .tex`.txt ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(bjccolor) #{ bjccolor: ps @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_PS} ; do \ make `basename $$i .ps`.bjccolor ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(cdj670) #{ cdj670: ps @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_PS} ; do \ make `basename $$i .ps`.cdj670 ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(bjc600) #{ bjc600: ps @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_PS} ; do \ make `basename $$i .ps`.bjc600 ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean) #{ clean: _clean .endif #} _clean: \ clean_gif clean_pcl_rof clean_pcl_ps clean_cdj670 clean_bjccolor clean_bjc600 \ clean_epson clean_dos clean_latin1 clean_txt clean_lst \ clean_vfig clean_fig clean_vps clean_aux clean_css clean_log \ clean_Vps clean_ps clean_pdf clean_mp3 clean_fax clean_tiff \ clean_tif clean_dvi clean_vhtml clean_html clean_e_html \ clean_l_html clean_lmth clean_e_lmth clean_l_lmth clean_tex \ clean_e_tex clean_l_tex clean_rof clean_e_rof clean_l_rof @# test -e JJLATER add an eval here of ${CLEAN} & if empty, skip it. rm -f ${CLEAN} @# end_test @# rm -rf .xvpics # We clean the lowest dependency first, then crawl back to top source; that # way sub rules dont have to know every source a .pcl can come from #------------------------------------------------------------------------------ # Clean Explanations. Take example clean_ps: # a smarter replacement for "rm *.ps" # (can''t be done that crudely as we have .ps masters eg photos in docs). # It cleans all .ps that could be rebuilt from an exisiting immediate # source. (ie a .rof would get a .ps removed). More distant sources # such as a .e_rof with no .rof, also get a .ps removed, to ensure a # clean really does remove all it can, even if an intermediate file # is missing, The body of the rule does not itself clean things a .ps # could be used to generate, it sets dependencies to do that. #------------------------------------------------------------------------------ .if !target(clean_txt) #{ clean_txt: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.txt ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.txt ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.txt ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.txt ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.txt ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.txt ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_bjc600) #{ clean_bjc600: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_PS} ; do \ rm -f `basename $$i .ps`.bjc600 ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.bjc600 \ `basename $$i .rof`.[0-9]*.bjc600 ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.bjc600 \ `basename $$i .tex`.[0-9]*.bjc600 ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.bjc600 \ `basename $$i .e_rof`_$$j.[0-9]*.bjc600 ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.bjc600 \ `basename $$i .l_rof`_$$j.[0-9]*.bjc600 ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.bjc600 \ `basename $$i .e_tex`_$$j.[0-9]*.bjc600 ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.bjc600 \ `basename $$i .l_tex`_$$j.[0-9]*.bjc600 ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_cdj670) #{ clean_cdj670: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_PS} ; do \ rm -f `basename $$i .ps`.cdj670 ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.cdj670 \ `basename $$i .rof`.[0-9]*.cdj670 ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.cdj670 \ `basename $$i .tex`.[0-9]*.cdj670 ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.cdj670 \ `basename $$i .e_rof`_$$j.[0-9]*.cdj670 ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.cdj670 \ `basename $$i .l_rof`_$$j.[0-9]*.cdj670 ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.cdj670 \ `basename $$i .e_tex`_$$j.[0-9]*.cdj670 ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.cdj670 \ `basename $$i .l_tex`_$$j.[0-9]*.cdj670 ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_bjccolor) #{ clean_bjccolor: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_PS} ; do \ rm -f `basename $$i .ps`.bjccolor ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.bjccolor \ `basename $$i .rof`.[0-9]*.bjccolor ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.bjccolor \ `basename $$i .tex`.[0-9]*.bjccolor ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.bjccolor \ `basename $$i .e_rof`_$$j.[0-9]*.bjccolor ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.bjccolor \ `basename $$i .l_rof`_$$j.[0-9]*.bjccolor ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.bjccolor \ `basename $$i .e_tex`_$$j.[0-9]*.bjccolor ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.bjccolor \ `basename $$i .l_tex`_$$j.[0-9]*.bjccolor ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_aux) #{ clean_aux: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.aux ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.aux ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.aux ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_css) #{ clean_css: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.css ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.css ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.css ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_log) #{ clean_log: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.log ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.log ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.log ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_dos) #{ clean_dos: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_TXT} ; do \ rm -f `basename $$i .txt`.dos ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.dos ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.dos ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.dos ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.dos ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.dos ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.dos ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_dvi) #{ clean_dvi: clean_ps @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.dvi ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.dvi ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.dvi ; \ done ; \ done @# JJLATER maybe sometime add a ROF rule, but I do not currently @# generate .dvi images from .rof. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_epson) #{ clean_epson: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_PS} ; do \ rm -f `basename $$i .ps`.epson ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.epson \ `basename $$i .rof`.[0-9]*.epson ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.epson \ `basename $$i .tex`.[0-9]*.epson ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.epson \ `basename $$i .e_rof`_$$j.[0-9]*.epson ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.epson \ `basename $$i .l_rof`_$$j.[0-9]*.epson ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.epson \ `basename $$i .e_tex`_$$j.[0-9]*.epson ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.epson \ `basename $$i .l_tex`_$$j.[0-9]*.epson ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_e_html) #{ clean_e_html: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_L_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_lmth`_$$j.e_html ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_e_rof) #{ clean_e_rof: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.e_rof ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_e_lmth) #{ clean_e_lmth: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_L_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_lmth`_$$j.e_lmth ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_e_tex) #{ clean_e_tex: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.e_tex ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_fax) #{ clean_fax: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# A fax file is an absolute master, received by a fax modem. @# I''ll ignore for now the fact one Can create a fax file using @# hylafax tools etc. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_tiff) #{ clean_tiff: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# A tiff file is an absolute master, received by a scanner. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_tif) #{ clean_tif: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# A tif file is an absolute master, received by a scanner. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_fig) #{ clean_fig: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# A fig file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_html) #{ clean_html: clean_ps clean_vhtml @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.html ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.html ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.html ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_HTML} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_html`_$$j.html ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_HTML} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_html`_$$j.html ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_LMTH} ; do \ rm -f `basename $$i .lmth`.html ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_lmth`_$$j.html ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_lmth`_$$j.html ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.html ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.html ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.html ; \ done ; \ done @# @# groff-html-[0-9]*-[0-9]*.png are junk from groff -Thtml @# I used to do this: @# rm -f groff-html-[0-9]*-[0-9]*.png groff-html-[0-9]*-[0-9]*.gif @# but it''s just noise if nothing is there, so now do it silently: ${CMD_FOR_CLEAN} i in ${FOR_GROFF_HTML_JUNK} ; do \ rm -f $$i ; \ done .if ( target(index.html) ) #{ .if defined (DEBUG) @echo "Rebuild rule exists, so removing index.html" .endif rm -f index.html .else .if defined (DEBUG) @echo "No rebuild rule for index.html, so not not removing it." .endif .endif #} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_latin1) #{ clean_latin1: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.latin1 ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.latin1 ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.latin1 ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_l_html) #{ clean_l_html: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# An l_html file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_l_lmth) #{ clean_l_lmth: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# An l_lmth file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_l_rof) #{ clean_l_rof: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# An l_rof file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_l_tex) #{ clean_l_tex: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# An l_tex file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_lmth) #{ clean_lmth: clean_html @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ rm -f `basename $$i .e_rof`.lmth ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.lmth ; \ done @# Assume EG fred.lmth can be rebuilt from fred.le. @# next bit not useful yet. @# Clean up after aborted wysiwyg edits of .lmth files ${CMD_FOR_CLEAN} i in ${FOR_E_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_lmth`_$$j.lmth ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_lmth`_$$j.lmth ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_lst) #{ clean_lst: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.lst ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.lst ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.lst ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .L_rof`_$$j.lst ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.lst ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.lst ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_pcl_rof) #{ clean_pcl_rof: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# ${CMD_FOR_CLEAN} i in ${FOR_PS} ; do \ @# rm -f `basename $$i .ps`.pcl_rof ; \ @# done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.pcl_rof `basename $$i .rof`.[0-9]*.pcl_rof ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.pcl_rof `basename $$i .tex`.[0-9]*.pcl_rof ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.pcl_rof \ `basename $$i .e_rof`_$$j.[0-9]*.pcl_rof ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.pcl_rof \ `basename $$i .l_rof`_$$j.[0-9]*.pcl_rof ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.pcl_rof \ `basename $$i .e_tex`_$$j.[0-9]*.pcl_rof ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.pcl_rof \ `basename $$i .l_tex`_$$j.[0-9]*.pcl_rof ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_pcl_ps) #{ clean_pcl_ps: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_PS} ; do \ rm -f `basename $$i .ps`.pcl_ps ; \ done @# These rof can 1st generate a .ps @# so it is valid to delete these .pcl_ps ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.pcl_ps `basename $$i .rof`.[0-9]*.pcl_ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.pcl_ps `basename $$i .tex`.[0-9]*.pcl_ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.pcl_ps \ `basename $$i .e_rof`_$$j.[0-9]*.pcl_ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.pcl_ps \ `basename $$i .l_rof`_$$j.[0-9]*.pcl_ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.pcl_ps \ `basename $$i .e_tex`_$$j.[0-9]*.pcl_ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.pcl_ps \ `basename $$i .l_tex`_$$j.[0-9]*.pcl_ps ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_gif) #{ clean_gif: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_PS} ; do \ rm -f `basename $$i .ps`.gif ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.gif `basename $$i .rof`.[0-9]*.gif ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.gif `basename $$i .tex`.[0-9]*.gif ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.gif \ `basename $$i .e_rof`_$$j.[0-9]*.gif ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.gif \ `basename $$i .l_rof`_$$j.[0-9]*.gif ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.gif \ `basename $$i .e_tex`_$$j.[0-9]*.gif ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.gif \ `basename $$i .l_tex`_$$j.[0-9]*.gif ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_ps) #{ # Do not call clean_pcl_rof, as a .ps is not allowed # to make a.pcl_rof clean_ps: clean_pcl_ps clean_epson clean_cdj670 clean_bjccolor \ clean_bjc600 clean_vps @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_PDF} ; do \ rm -f `basename $$i .pdf`.ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.ps `basename $$i .rof`.[0-9]*.ps ; \ done @# The .[0-9]*.ps are single page images. ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.ps \ `basename $$i .e_rof`_$$j.[0-9]*.ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.ps \ `basename $$i .l_rof`_$$j.[0-9]*.ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.ps `basename $$i .tex`.[0-9]*.ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.ps \ `basename $$i .e_tex`_$$j.[0-9]*.ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.ps \ `basename $$i .l_tex`_$$j.[0-9]*.ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_FAX} ; do \ rm -f `basename $$i .fax`.ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TIFF} ; do \ rm -f `basename $$i .tiff`.ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TIF} ; do \ rm -f `basename $$i .tif`.ps ; \ done @# Zap .ps files created by xfig from .fig ${CMD_FOR_CLEAN} i in ${FOR_FIG} ; do \ rm -f `basename $$i .fig`.ps ; \ done @# Zap .ps files created manually by a browser ${CMD_FOR_CLEAN} i in ${FOR_HTML} ; do \ rm -f `basename $$i .html`.ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_HTML} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_html`_$$j.ps \ `basename $$i .e_html`_$$j.[0-9]*.ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_HTML} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_html`_$$j.ps \ `basename $$i .l_html`_$$j.[0-9]*.ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_LMTH} ; do \ rm -f `basename $$i .lmth`.ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_html`_$$j.ps \ `basename $$i .e_html`_$$j.[0-9]*.ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_html`_$$j.ps \ `basename $$i .l_html`_$$j.[0-9]*.ps ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_pdf) #{ clean_pdf: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.pdf `basename $$i .rof`.[0-9]*.pdf ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.pdf ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.pdf ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.pdf ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TIFF} ; do \ rm -f `basename $$i .tiff`.pdf ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TIF} ; do \ rm -f `basename $$i .tif`.pdf ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_rof) #{ clean_rof: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.rof ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.rof ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_tex) #{ clean_tex: clean_dvi @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.tex ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.tex ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_vps) || !target(clean_Vps) #{ # Do not call clean_pcl_rof clean_vps clean_Vps: clean_pcl_ps clean_epson clean_cdj670 clean_bjccolor clean_bjc600 @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# In case I''ve been editing postscript files eg fax cover sheet @# (where .ps is the master, not produced from eg a .rof). ${CMD_FOR_CLEAN} i in ${FOR_PS} ; do \ name=`basename $$i .ps` ; rm -f $${name}.[vV]ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ name=`basename $$i .rof` ; rm -f $${name}.[vV]ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_rof`_$$j.[vV]ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_ROF} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_rof`_$$j.[vV]ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ name=`basename $$i .tex` ; rm -f $${name}.[vV]ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_tex`_$$j.[vV]ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_TEX} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_tex`_$$j.[vV]ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_HTML} ; do \ name=`basename $$i .html` ; rm -f $${name}.[vV]ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_HTML} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_html`_$$j.[vV]ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_HTML} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_html`_$$j.[vV]ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_LMTH} ; do \ name=`basename $$i .lmth` ; rm -f $${name}.[vV]ps ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_lmth`_$$j.[vV]ps ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_lmth`_$$j.[vV]ps ; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_vfig) #{ clean_vfig: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# Clean up after aborted wysiwyg edits of .fig files ${CMD_FOR_CLEAN} i in ${FOR_FIG} ; do \ rm -f `basename $$i .fig`.vfig ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(clean_vhtml) #{ clean_vhtml: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# Clean up after aborted wysiwyg edits of .html files ${CMD_FOR_CLEAN} i in ${FOR_HTML} ; do \ rm -f `basename $$i .html`.vhtml ; \ done ${CMD_FOR_CLEAN} i in ${FOR_ROF} ; do \ rm -f `basename $$i .rof`.vtml ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_HTML} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_html`_$$j.vhtml ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_HTML} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_html`_$$j.vthml ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_LMTH} ; do \ rm -f `basename $$i .lmth`.vtml ; \ done ${CMD_FOR_CLEAN} i in ${FOR_E_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .e_lmth`_$$j.vhtml ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_L_LMTH} ; do \ for j in ${LANGS} ; do \ rm -f `basename $$i .l_lmth`_$$j.vhtml ; \ done ; \ done ${CMD_FOR_CLEAN} i in ${FOR_TEX} ; do \ rm -f `basename $$i .tex`.vtml ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(dvi) #{ dvi: rof @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_TEX} ; do \ make `basename $$i .tex`.dvi ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(e_html) #{ e_html: l_html @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_L_HTML} ; do \ echo "Linking to pre-existing $$i" ; \ bla=`basename $$i .l_html` ; \ for j in ${LANGS} ; do \ ${ECHO_DOING} "Doing $${bla}_$$j.e_html" ; \ if ! test -e $${bla}_$$j.e_html ; then \ ln -s $$i $${bla}_$$j.e_html ; \ echo "$${bla}_$$j.e_html" ; \ fi; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(e_lmth) #{ e_lmth: l_lmth @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_L_LMTH} ; do \ echo "Linking to pre-existing $$i" ; \ bla=`basename $$i .l_lmth` ; \ for j in ${LANGS} ; do \ ${ECHO_DOING} "Doing $${bla}_$$j.e_lmth" ; \ if ! test -e $${bla}_$$j.e_lmth ; then \ ln -s $$i $${bla}_$$j.e_lmth ; \ echo "$${bla}_$$j.e_lmth" ; \ fi; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(e_rof) #{ # Create 2 or more sym links for extracting English & German language, # such as resume_e.e_rof resume_g.e_rof e_rof: l_rof @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_L_ROF} ; do \ echo "Linking to pre-existing $$i" ; \ bla=`basename $$i .l_rof` ; \ for j in ${LANGS} ; do \ ${ECHO_DOING} "Doing $${bla}_$$j.e_rof" ; \ if ! test -e $${bla}_$$j.e_rof ; then \ ln -s $$i $${bla}_$$j.e_rof ; \ echo "$${bla}_$$j.e_rof" ; \ fi; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(e_tex) #{ e_tex: l_tex @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_L_TEX} ; do \ echo "Linking to pre-existing $$i" ; \ bla=`basename $$i .l_tex` ; \ for j in ${LANGS} ; do \ ${ECHO_DOING} "Doing $${bla}_$$j.e_tex" ; \ if ! test -e $${bla}_$$j.e_tex ; then \ ln -s $$i $${bla}_$$j.e_tex ; \ echo "$${bla}_$$j.e_tex" ; \ fi; \ done ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(epson) #{ epson: rof @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_PS} ; do \ make `basename $$i .ps`.epson ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(html) #{ html: e_html lmth rof tex @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_E_HTML} ; do \ ${ECHO_DOING} "Doing $$i" ; \ make `basename $$i .e_html`.html ; \ done ${CMD_FOR_BUILD} i in ${FOR_LMTH} ; do \ ${ECHO_DOING} "Doing $$i" ; \ make `basename $$i .lmth`.html ; \ done ${CMD_FOR_BUILD} i in ${FOR_ROF} ; do \ make `basename $$i .rof`.html ; \ done ${CMD_FOR_BUILD} i in ${FOR_TEX} ; do \ make `basename $$i .tex`.html ; \ done cd ${.CURDIR} && make _index.html @# ${.CURDIR} above as my ~/public_html also has a /usr/obj equiv. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ # Add functionality to get "make html" go into SUBDIRs # /usr/share/mk/bsd.subdir.mk has this: # .for __target in all all-man checkdpadd clean cleandepend cleandir \ # depend distribute lint maninstall \ # obj objlink realinstall regress tags # ${__target}: _SUBDIR # .endfor # So I do this: .if defined(SUBDIR) # the if defined above is so I dont have to add # .include # even in public/html/......../Makefile that dont have SUBDIR += html: _SUBDIR .endif #------------------------------------------------------------------------------ # Can not call this target index.html, else it prevents # index.html being built from index.lmth _index.html: @${ECHO_START} "${T_START} $@" #{ if [ -e index_e.html ] && [ ! -e index.html ]; then \ echo "Linking to pre-existing index_e.html" ; \ ln -s index_e.html index.html ; \ fi @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @${ECHO_END} "${T_END} $@" #} #------------------------------------------------------------------------------ .if !target(l_html) #{ l_html: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# An l_html file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(l_lmth) #{ l_lmth: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# An l_lmth file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(l_rof) #{ l_rof: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# An l_rof file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(l_tex) #{ l_tex: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# An l_tex file is an absolute master, made by human, not machine. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(lmth) #{ lmth: e_lmth rof tex @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_E_LMTH} ; do \ make `basename $$i .e_lmth`.lmth ; \ done ${CMD_FOR_BUILD} i in ${FOR_ROF} ; do \ make `basename $$i .rof`.lmth ; \ done ${CMD_FOR_BUILD} i in ${FOR_TEX} ; do \ make `basename $$i .tex`.lmth ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(lmth_links) #{ .if !defined(LMTH_TARGET) #{ LMTH_TARGET_1 != pwd LMTH_TARGET_2 != basename ${LMTH_TARGET_1} LMTH_TARGET = ${LMTH_TARGET_2}.lmth .endif #} lmth_links: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${LMTH_LINKS} ; do \ if test ! -h $$i; then \ echo "Linking to pre-existing ${LMTH_TARGET}" ; \ ln -s ${LMTH_TARGET} $$i ; \ else \ echo Link already exists: $$i ; \ fi ; \ ls -l $$i ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(lst) #{ lst: rof @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_ROF} ; do \ make `basename $$i .rof`.lst ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(pcl_rof) #{ pcl_rof: rof @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_ROF} ; do \ make `basename $$i .rof`.pcl_rof ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(pcl_ps) #{ pcl_ps: ps @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_PS} ; do \ make `basename $$i .ps`.pcl_ps ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(pcl) #{ pcl: ps @${ECHO_START} "${T_START} $@" #{ @echo "Suffix PCL no longer exists, you must choose pcl_ps or pcl_rof" @echo "A .pcl_rof is a .pcl produced direct from a .rof with groff" @echo "On FreeBSD-8.2 in ~jhs/job/groff/card/paper groff spacing fails." @echo "A .pcl_ps is a .pcl produced from a .rof via a .ps with ghostscript." @echo "On FreeBSD-8.2 in ~jhs/ob/groff/card/paper/ gs spacing is OK" @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ pdf2ps_maybe: @${ECHO_START} "${T_START} $@" #{ @echo "To use ${PDF2PS} (eg for .ps to .pcl) you need make -DPDF_PS=YES" .if defined(PDF_PS) #{ Default: Undefined. @echo PDF_PS was supposedly defined. .else @echo PDF_PS was supposedly not defined. .endif #} @# These echo above do Not report the truth. @# make pdf @${ECHO_END} "${T_END} $@" #} #------------------------------------------------------------------------------ .if !target(ps) #{ ps: rof tex pdf2ps_maybe @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_ROF} ; do \ make `basename $$i .rof`.ps ; \ done ${CMD_FOR_BUILD} i in ${FOR_TEX} ; do \ make `basename $$i .tex`.ps ; \ done ${CMD_FOR_BUILD} i in ${FOR_TIFF2PS} ; do \ make `basename $$i .tiff`.ps ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(gif) #{ gif: ps @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_PS} ; do \ make `basename $$i .ps`.gif ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(pdf) #{ # 2009.03.02 # I deleted dependency ps with tiff, # because .ps output files are enormous # & I have a .tiff.pdf rule that pipes direct. # I might need to add rof back in though, else maybe not enough # will get built ? pdf: tex rof @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_TEX} ; do \ make `basename $$i .tex`.pdf; \ done ${CMD_FOR_BUILD} i in ${FOR_TIFF} ; do \ make `basename $$i .tiff`.pdf; \ done ${CMD_FOR_BUILD} i in ${FOR_TIF} ; do \ make `basename $$i .tif`.pdf; \ done @# There''s currently no .rof.pdf rule, (though maybe later), @# but rules for .rof.ps & a .ps.pdf, @# so first try to make from a .rof ${CMD_FOR_BUILD} i in ${FOR_ROF} ; do \ make `basename $$i .rof`.pdf; \ done @# second try to make any .pdf still missing from a .ps ${CMD_FOR_BUILD} i in ${FOR_PS} ; do \ make `basename $$i .ps`.pdf; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(rof) #{ rof: e_rof @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_E_ROF} ; do \ make `basename $$i .e_rof`.rof ; \ done @${ECHO_END} "${T_END} $@" #} # Pre 2004.05.14, the single line with `make` was 3 lines: # for j in ${LANGS} ; do \ # rm -f `basename $$i .e_rof`_$$j.rof ; \ # done ; \ .endif #} #------------------------------------------------------------------------------ .if !target(tex) #{ tex: e_tex @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_E_TEX} ; do \ make `basename $$i .e_tex`.tex ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(tools) #{ tools: ${BUILD_TOOLS} ${VIEW_TOOLS} ${CHECK_TOOLS} @${ECHO_START} "${T_START} $@" #{ @# You can run "make tools" (as root) to install all tools @# on a new host, before you later run "make all" as a normal user. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(view) #{ view: ${VIEW_TOOLS} @${ECHO_START} "${T_START} $@" #{ @echo "Try one of make view_ps view_pdf view_dvi" @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(view_dvi) #{ view_dvi: ${TARGS_DVI} # ${XDVI} ${GHOSTVIEW} ${GV} ${GS} ${CMD_FOR_CLEAN} i in $(TARGS_PS) ; \ do \ @if [ -x ${XDVI} ]; then \ ${XDVI} ${XDVI_ARGS} $$i ; \ elif [ -x ${GHOSTVIEW} ]; then \ ${GHOSTVIEW} $$i ; \ elif [ -x ${GV} ]; then \ ${GV} $$i ; \ elif [ -x ${GS} ]; then \ ${GS} -sPAPERSIZE=a4 $$i ; \ fi ; \ done @${ECHO_END} "${T_END} $@" .endif #} #------------------------------------------------------------------------------ .if !target(view_pdf) #{ view_pdf: ${TARGS_PDF} # ${ACROREAD} ${GHOSTVIEW} ${GV} ${GS} ${CMD_FOR_CLEAN} i in $(TARGS_PS) ; \ do \ @if [ -x ${ACROREAD} ]; then \ ${ACROREAD} $$i ; \ elif [ -x ${GHOSTVIEW} ]; then \ ${GHOSTVIEW} $$i ; \ elif [ -x ${GV} ]; then \ ${GV} $$i ; \ elif [ -x ${GS} ]; then \ ${GS} -sPAPERSIZE=a4 $$i ; \ fi ; \ done @${ECHO_END} "${T_END} $@" .endif #} #------------------------------------------------------------------------------ .if !target(view_ps) #{ view_ps: ${TARGS_PS} # ${GV} ${GHOSTVIEW} ${GS} ${CMD_FOR_CLEAN} i in $(TARGS_PS) ; \ do \ @if [ -x ${GV} ]; then \ ${GV} -media a4 -antialias $$i ; \ elif [ -x ${GHOSTVIEW} ]; then \ ${GHOSTVIEW} $$i.ps; \ elif [ -x ${GS} ]; then \ ${GS} -sPAPERSIZE=a4 $$i.ps; \ fi ; \ done @${ECHO_END} "${T_END} $@" .endif #} #============================================================================== # DEFAULT INPUT-OUTPUT CONVERSION RULES - WYSIWYG #------------------------------------------------------------------------------ sighup=HUP # Support for "ghostview". # (ghostview is marked broken (security loophone) in FreeBSD-4.8) # Wysiwyg loop to allow vi in one xterm to cause re-display in adjacent # ghostview, each time vi sees :w (write). .if !target(.ps.vps) #{ .ps.vps: # create a temporary pid file for signal linking vi + ghostview @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ghostview -reopen_sig -pid_report ${.IMPSRC} > ${.TARGET} & @# Wait for ghostview to initialise then report its process number. @# & print dots while waiting as a debug indicator. @# while `test ! -s ${.TARGET}` ; do echo -n . ; done @# or skip the dots normally. while `test ! -s ${.TARGET}` ; do true ; done process=`cat ${.TARGET}` ; \ name=`basename ${.IMPSRC} .ps` ; \ if [ -f $${name}.le ]; then \ vi -C "make $${name}.ps ; kill -${SIG_REOPEN} $${process}" \ $${name}.le ; \ else \ if [ -f $${name}.e_rof ]; then \ vi -C "make $${name}.ps ; \ kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.e_rof ; \ elif [ -f $${name}.rof ]; then \ vi -C "make $${name}.ps ; \ kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.rof ; \ elif [ -f $${name}.e_tex ]; then \ vi -C "make $${name}.ps ; \ kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.e_tex ; \ elif [ -f $${name}.tex ]; then \ vi -C "make $${name}.ps ; \ kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.tex ; \ else \ echo "Dont know what to edit to make $${name}" ; \ exit 1 ; \ fi ; \ fi ; \ kill -${sighup} $${process} ; \ echo "Suggestion: maybe_rm $${name}.ps" # letter_g.rof is extracted from letter_g.e_rof # letter_g.e_rof@ -> letter.l_rof # {--------------- OLD # if [ -f $${name}.le ]; then \ # vi -C "make $${name}.ps ; kill -${SIG_REOPEN} $${process}" \ # $${name}.le ; \ # else \ # if [ -f $${name}.rof ]; then \ # vi -C "make $${name}.ps ; \ # kill -${SIG_REOPEN} $${process}" \ # ${.CURDIR}/$${name}.rof ; \ # else \ # vi -C "make $${name}.ps ; \ # kill -${SIG_REOPEN} $${process}" \ # ${.CURDIR}/$${name}.tex ; \ # fi ; \ # fi ; \ # kill -${sighup} $${process} ; \ # echo "Suggestion: maybe_rm $${name}.ps" # --------------- } @# JJLATER: Allow for a $${name}.tex as well as a $${name}.rof @rm -f ${.TARGET} @# merely an obsolete process number @# @# The ${sighup} is to remove a no longer updated ghostview. @# @# Hopefully a kernel guru will confirm the printf & fflush I use to @# generate the pid print in ghostview is effectively monatomic by the @# time the process number arrives in the file ${THING}.pid. @# If not, and the pid were eg 1234, & only the 1 is output before the @# test, and it stays at 1 when then read with cat, and if you are root, @# the system might then crash or something with equivalent of @# su ; kill -SIGUSR1 1 (note SIGUSR1) @# @# Note ghostview sometimes doesnt seem to update its screen display @# till the mouse floats over the top of it (no clicks necessary) @# (this being with fvwm + freebsd). @# @# I couldn''t use a structure like @# pid=`ghostview -reopen_sig -pid_report generic.g.ps` & @# because that waits for ghostview to complete before evaluating pid @# @# The backslashes need to extend to end, else $${name} evaluate to null @# on the suggestion line. @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ # Support for "gv". (successor or descendant to/from ghostview). # Wysiwyg loop to allow vi in one xterm to cause re-display in adjacent # gv, each time vi sees :w (write). .if !target(.ps.Vps) #{ .ps.Vps: # create a temporary pid file for signal linking vi + ghostview @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# A "-watch" parameter to gv is not needed, & avoided to lighten load @# on slow machines. gv ${.IMPSRC} > ${.TARGET} & \ sleep 3 ; \ process=$$! ; \ echo "$${process}" > ${.TARGET} ; \ name=`basename ${.IMPSRC} .ps` ; \ if [ -f $${name}.le ]; then \ vi -C "make $${name}.ps ; kill -s HUP $${process}" \ $${name}.le ; \ else \ if [ -f $${name}.rof ]; then \ vi -C "make $${name}.ps ; kill -s HUP $${process}" \ ${.CURDIR}/$${name}.rof ; \ else \ vi -C "make $${name}.ps ; kill -s HUP $${process}" \ ${.CURDIR}/$${name}.tex ; \ fi ; \ fi ; \ kill $${process} ; \ echo "Suggestion: maybe_rm $${name}.ps" @# JJLATER: Allow for a $${name}.tex as well as a $${name}.rof @rm -f ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ # Same as .ps.vps , but also generates a .pcl_rof afterward # (note no .vpcl_rof gets generated). .if !target(.rof.vpcl_rof) #{ .rof.vpcl_rof: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" name=`basename ${.IMPSRC} .rof` ; \ make $${name}.vps ; \ tm $${name}.ps ; \ make $${name}.pcl_rof ; \ echo Suggestion: lpr -Ppcl_rof.g $${name}.pcl_rof @${ECHO_END} "${T_END} $@" #} @# The Wysiwyg uses the .ps, @# then we discard the .ps, & go straight from rof to pcl. .endif #} #------------------------------------------------------------------------------ # Same as .ps.vps , but also generates a .pcl_ps afterward # (note no .vpcl_ps gets generated). .if !target(.ps.vpcl_ps) #{ .ps.vpcl_ps: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" name=`basename ${.IMPSRC} .ps` ; \ make $${name}.vps ; \ make $${name}.pcl_ps ; \ echo Suggestion: lpr -Ppcl_ps.g $${name}.pcl_ps @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.ps.vbjccolor) #{ # (note no .vbjccolor gets generated). .ps.vbjccolor: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" name=`basename ${.IMPSRC} .ps` ; \ make $${name}.vps ; \ make $${name}.bjccolor ; \ echo Suggestion: lpr -Pbjc $${name}.bjccolor @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.ps.vcdj670) #{ # (note no .vcdj670 gets generated). .ps.vcdj670: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" name=`basename ${.IMPSRC} .ps` ; \ make $${name}.vps ; \ make $${name}.cdj670 ; \ echo Suggestion: lpr -Pcdj670 $${name}.cdj670 @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.ps.vbjc600) #{ .ps.vbjc600: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" name=`basename ${.IMPSRC} .ps` ; \ make $${name}.vps ; \ make $${name}.bjc600 ; \ echo Suggestion: lpr -Pbjc $${name}.bjc600 @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.m4.vhtml) #{ # This new rule is being tested first on ~/public_html/bim/Makefile # There is not yet a generic clean rule. That comes from the Makefile for now. .m4.vhtml: # create a temporary pid file for signal linking vi + chimera @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# for explanation see comments in .ps.vps: above @# I need ${.CURDIR} in next line, else chimera fails to display @# ~jhs/public_html/ (as /usr/obj/.... always exists) make `basename ${.IMPSRC} .m4`.html chimera -s -p ${.CURDIR}/`basename ${.IMPSRC} .m4`.html > ${.TARGET} & @# Wait for chimera to initialise then report its process number. @# & print dots while waiting as a debug indicator. @# while `test ! -s ${.TARGET}` ; do echo -n . ; done @# or skip the dots normally. while `test ! -s ${.TARGET}` ; do true ; done process=`cat ${.TARGET}` ; \ name=`basename ${.IMPSRC} .m4` ; \ vi -C "make $${name}.html ; kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.m4 ; \ ${ISPELLAFTERVI} ${.CURDIR}/$${name}.m4 ; \ ${TIDYAFTERVI} ${.CURDIR}/$${name}.m4 ; \ kill -${sighup} $${process} rm -f ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.html.vhtml) #{ .html.vhtml: # create a temporary pid file for signal linking vi + chimera @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# for explanation see comments in .ps.vps: above @# I need ${.CURDIR} in next line, else chimera fails to display @# ~jhs/public_html/ (as /usr/obj/.... always exists) chimera -s -p ${.CURDIR}/${.IMPSRC} > ${.TARGET} & @# Wait for chimera to initialise then report its process number. @# & print dots while waiting as a debug indicator. @# while `test ! -s ${.TARGET}` ; do echo -n . ; done @# or skip the dots normally. while `test ! -s ${.TARGET}` ; do true ; done process=`cat ${.TARGET}` ; \ name=`basename ${.IMPSRC} .html` ; \ vi -C "make $${name}.html ; kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.html ; \ ${ISPELLAFTERVI} ${.CURDIR}/$${name}.html ; \ ${TIDYAFTERVI} ${.CURDIR}/$${name}.html ; \ kill -${sighup} $${process} rm -f ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.lmth.vhtml) #{ .lmth.vhtml: # create a temporary pid file for signal linking vi + chimera @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# for explanation see comments in .ps.vps: above @# I need ${.CURDIR} in next line, else chimera fails to display @# ~jhs/public_html/ (as /usr/obj/.... always exists) cd ${.CURDIR} ; make `basename ${.IMPSRC} .lmth`.html chimera -s -p ${.CURDIR}/`basename ${.IMPSRC} .lmth`.html > ${.TARGET} & @# Wait for chimera to initialise then report its process number. @# & print dots while waiting as a debug indicator. @# while `test ! -s ${.TARGET}` ; do echo -n . ; done @# or skip the dots normally. while `test ! -s ${.TARGET}` ; do true ; done process=`cat ${.TARGET}` ; \ name=`basename ${.IMPSRC} .lmth` ; \ vi -C "make $${name}.html ; kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.lmth ; \ ${ISPELLAFTERVI} ${.CURDIR}/$${name}.lmth ; \ ${TIDYAFTERVI} ${.CURDIR}/$${name}.lmth ; \ kill -${sighup} $${process} rm -f ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.e_lmth.vhtml) #{ .e_lmth.vhtml: # create a temporary pid file for signal linking vi + chimera @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# for explanation see comments in .ps.vps: above @# I need ${.CURDIR} in next line, else chimera fails to display @# ~jhs/public_html/ (as /usr/obj/.... always exists) make `basename ${.IMPSRC} .e_lmth`.html chimera -s -p ${.CURDIR}/`basename ${.IMPSRC} .e_lmth`.html \ > ${.TARGET} & @# Wait for chimera to initialise then report its process number. @# & print dots while waiting as a debug indicator. @# while `test ! -s ${.TARGET}` ; do echo -n . ; done @# or skip the dots normally. while `test ! -s ${.TARGET}` ; do true ; done process=`cat ${.TARGET}` ; \ name=`basename ${.IMPSRC} .e_lmth` ; \ vi -C "make $${name}.html ; kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.e_lmth ; \ kill -${sighup} $${process} rm -f ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.fig.vfig) #{ .fig.vfig: # create a temporary pid file for signal linking vi + xfig @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# for explanation see comments in .ps.vps: above xfig -pid_report -reopen_sig ${.IMPSRC} > ${.TARGET} & @# Wait for xfig to initialise then report its process number. @# & print dots while waiting as a debug indicator. @# while `test ! -s ${.TARGET}` ; do echo -n . ; done @# or skip the dots normally. while `test ! -s ${.TARGET}` ; do true ; done process=`cat ${.TARGET}` ; \ name=`basename ${.IMPSRC} .fig` ; \ vi -C "make $${name}.fig ; kill -${SIG_REOPEN} $${process}" \ ${.CURDIR}/$${name}.fig ; \ kill -SIGKILL $${process} rm -f ${.TARGET} @# Xfig with a ${sighup} creates a core, (despite man signal saying @# default is no core), so as xfig does this I use sigkill @${ECHO_END} "${T_END} $@" #} .endif #} #============================================================================== PSTOPNM_ARGS += `printenv PSTOPNM_ARGS` #============================================================================== GROFF_ARGS += `printenv GROFF_ARGS` .if defined(phone) #{ GROFF_ARGS += -dphone=${phone} .endif #} .if defined(phone_web) #{ GROFF_ARGS += -dphone_web=${phone_web} .endif #} .if defined(mobile) #{ GROFF_ARGS += -dmobile=${mobile} .endif #} .if defined(fax_e) #{ GROFF_ARGS += -dfax_e=${fax_e} .endif #} .if defined(fax_g) #{ GROFF_ARGS += -dfax_g=${fax_g} .endif #} .if defined(email_b) #{ GROFF_ARGS += -demail_b=${email_b} .endif #} .if defined(email_p) #{ GROFF_ARGS += -demail_p=${email_p} .endif #} .if defined(email_pc) #{ GROFF_ARGS += -demail_pc=${email_pc} .endif #} .if defined(email_bc) #{ GROFF_ARGS += -demail_bc=${email_bc} .endif #} .if defined(email) #{ GROFF_ARGS += -demail=${email} .endif #} .if defined(web_b) #{ GROFF_ARGS += -dweb_b=${web_b} .endif #} .if defined(web_p) #{ GROFF_ARGS += -dweb_p=${web_p} .endif #} .if defined(web) #{ GROFF_ARGS += -dweb=${web} .endif #} .if defined(bank_name) #{ GROFF_ARGS += -dbank_name=${bank_name} .endif #} .if defined(bank_head) #{ GROFF_ARGS += -dbank_head=${bank_head} .endif #} .if defined(bank_branch) #{ GROFF_ARGS += -dbank_branch=${bank_branch} .endif #} .if defined(bank_sort) #{ GROFF_ARGS += -dbank_sort=${bank_sort} .endif #} .if defined(bank_account_number) #{ GROFF_ARGS += -dbank_account_number=${bank_account_number} .endif #} .if defined(bank_account_name) #{ GROFF_ARGS += -dbank_account_name=${bank_account_name} .endif #} .if defined(bank_iban) #{ GROFF_ARGS += -dbank_iban=${bank_iban} .endif #} .if defined(bank_bic) #{ GROFF_ARGS += -dbank_bic=${bank_bic} .endif #} .if defined(postcode) #{ GROFF_ARGS += -dpostcode=${postcode} .endif #} .if defined(address) #{ GROFF_ARGS += -daddress=${address} .endif #} GROFF = groff -U -b -s -t ${GROFF_ARGS} # GROFF is also used in ~/job/cover/cv/Makefile, dont change or remove it. # -b gives a backtrace ie more debug info if errors occur # -t in GROFF is for if I''m including tbl boxes in cv_complete.l_rof # -U for "unsafe mode" #------------------------------------------------------------------------------ # man gs: # The "-sDEVICE=" switch must precede the first mention of a file to # print. # gs5.10/use.txt line 169: # Individual documents also can (and often do) specify a paper size, # which will take precedence over the default one. If you want to force # a specific paper size, ignoring the paper size specified in the # document, make that paper size the default (as just described), # and also include -dFIXEDMEDIA. .if ! defined(GS_ARGS) #{ GS_ARGS = -sPAPERSIZE=a4 -dFIXEDMEDIA -dNOPAUSE -q .endif #} # For a basic HP3P with no extension ram (beyond 1M basic) you need to use # 150 dpi instead of default 300 dpi. # GS_ARGS += -r150x150 # -dSAFER: Disables deletefile and renamefile operators #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .if ! defined(GS_OUT) #{ GS_OUT = -sOutputFile=${.TARGET} # -sOutputFile=page.%02d.${.TARGET} .endif #} #------------------------------------------------------------------------------ .if !defined(COPY_IT) #{ # Note below $< & ${.IMPSRC} dont work. # Used for copying pre built .ps .pcl etc from private directory to public web. # --- # With a rule in a public_html/ sub directory Makefile this: # stadtmuenchen.g.bjc: ${WEB}/stadtmuenchen.g.bjc # @# ${COPY_IT} # The variables expand as follows: # ${.ALLSRC} /.amd_mnt/user/home/jhs/public_html/stadtmuenchen/../../\ # job/groff/letter/stadtmuenchen/web/stadtmuenchen.g.bjc \ # stadtmuenchen.g.ps # ${.IMPSRC} stadtmuenchen.g.ps # ${.OODATE} /.amd_mnt/user/home/jhs/public_html/stadtmuenchen/../..\ # /job/groff/letter/stadtmuenchen/web/stadtmuenchen.g.bjc \ # stadtmuenchen.g.ps # ${.PREFIX} stadtmuenchen.g # ${.TARGET} stadtmuenchen.g.bjc # $< stadtmuenchen.g.ps # So this rule fails: # COPY_IT = install -c -m 644 ${.ALLSRC} ${.TARGET} # COPY = install -c -m 644 ${SRCD}/${.TARGET} ${.TARGET} # I switched from install -c to install -C to save web upload time etc. COPY = install -C -m 644 ${SRCD}/${.TARGET} ${.TARGET} # Since ~jhs/public_html/gifs/card/Makefile has not one $(SRCD} but 3. # COPY does not work, so use COPY2 # COPY2 = echo aaa ALLSRC ${.ALLSRC} IMPSRC ${.IMPSRC} OODATE ${.OODATE} PREFIX ${.PREFIX} TARGET ${.TARGET} zzz COPY2 = install -C -m 644 ${.ALLSRC} ${.TARGET} .endif #} #------------------------------------------------------------------------------ # Umlauts Usage # \*(:a \*(:o \*(:u \*(:s \*(:A \*(:O \*(:U ))))))) # \*[:a] \*[:o] \*[:u] \*[:s] \*[:A] \*[:O] \*[:U] # M\*[:u]nchnerstra\*(:se ) #============================================================================== # DEFAULT INPUT-OUTPUT CONVERSION RULES - NORMAL DATA, NOT WYSIWYG # Alphabetic order #------------------------------------------------------------------------------ .if !target(.txt.dos) #{ .txt.dos: # ascii to dos @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" cp ${.IMPSRC} ${.TARGET} notail ${.TARGET} addcr ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.dvi.ps) #{ # Specific to the BIM leaflet, for now. PSTOPS_FRNT=1L(1w,0.000000h)+2L(1w,0.333333h)+3L(1w,0.666667h) PSTOPS_BACK=4R(0w,1.000000h)+5R(0w,0.666667h)+0R(0w,0.333333h) # The PSTOPS_BACK screws up: 2nd page upside down, & I can''t fix it. PSTOPS_COM=6:$(PSTOPS_FRNT),$(PSTOPS_BACK) .dvi.ps: @${ECHO_START} "${T_START} $@" #{ @make ${DVIPS} ${PSSELECT} ${PSNUP} ${PSTOPS} @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# This rule is only good for producing a 3 column leaflet, @# it is Not a general rule. @# ----- @# Man dvips - convert a TeX DVI file to PostScript dvips -t landscape -o tmp.${.TARGET} ${.IMPSRC} @# Allowable syntax: @# -t a4 @# -O .1in,-.3cm # Off from default 1" down 1" right. @# -T offset # Set paper size to given pair of dimensions. @# ----- @# The previous latex delivers front page last, which suits us. @# Without the psselect, fold both edges into the middle, @# & the last page is visible when folded, which is nice, as @# the English version has additional URLs exposed on back. @# Man psselect - select pages from a PostScript file psselect 2,3,4,5,6,1 tmp.${.TARGET} tmp2.${.TARGET} @# ----- @# Man psnup - multiple pages per sheet @#psnup -w21cm -h29.7cm -W9.9cm -H21cm -s1 -3 tmp2.${.TARGET} ${.TARGET} psnup -w21cm -h29.2cm -W9.9cm -H21cm -s1 -3 tmp2.${.TARGET} ${.TARGET} @# 29.7 to 29.2 as Brother HL-P2500 was off the short edge. @# A4 measured by JHS is 29.7 x 21 cm. 9.9 is column width @# -W -H input sizes, if different from the output sizes. @# -w -h output sizes. @# Allowable syntax: @# -Pa4 # default is a4. -Pletter @# -m0.3cm # man says: leave margin around the whole page @# # only really seems to displace from left & base @# # margin, overflowing off not top & right. @# ----- @# Man pstops - shuffle pages in a PostScript file @# Allowable syntax: @# -pa4 @# pstops -w21cm -h29.7cm "$(PSTOPS_COM)" tmp.${.TARGET} ${.TARGET} @# Always screws up & prints 2nd page upside down. @# ----- rm -f tmp.${.TARGET} tmp2.${.TARGET} @# ----- @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.e_html.html) #{ # _LANG_HTML extracts the e from foobar_e.html or the g from foobar_g.html _LANG_HTML = `basename ${.IMPSRC} .e_html | rev |awk 'BEGIN {FS="_"} {print $$1}'` .e_html.html: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" echo "" > ${.TARGET} le -${_LANG_HTML} ${.IMPSRC} >> ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.e_lmth.lmth) #{ # _LANG_LMTH extracts the e from foobar_e.lmth or the g from foobar_g.lmth _LANG_LMTH = `basename ${.IMPSRC} .e_lmth | rev |awk 'BEGIN {FS="_"} {print $$1}'` .e_lmth.lmth: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" echo "" > ${.TARGET} le -${_LANG_LMTH} ${.IMPSRC} >> ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.e_rof.rof) #{ # _LANG_ROF extracts the e from foobar_e.rof or the g from foobar_g.rof _LANG_ROF = `basename ${.IMPSRC} .e_rof | rev |awk 'BEGIN {FS="_"} {print $$1}'` .e_rof.rof: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" echo ".\\\" ${DONT_EDIT}" > ${.TARGET} # " le -${_LANG_ROF} ${.IMPSRC} >> ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.e_tex.tex) #{ # _LANG_TEX extracts the e from foobar_e.tex or the g from foobar_g.tex # (${LATEX2HTML} refuses double dotted names such as doc.english.tex) _LANG_TEX = `basename ${.IMPSRC} .e_tex | rev |awk 'BEGIN {FS="_"} {print $$1}'` .e_tex.tex: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" echo "% ${DONT_EDIT}" > ${.TARGET} le -${_LANG_TEX} ${.IMPSRC} >> ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.fax.ps) #{ # convert received fax to postscript ready for ghostview .fax.ps: @${ECHO_START} "${T_START} $@" #{ @make ${FAX2PS} @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${FAX2PS} ${.IMPSRC} > ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.fig.ps) #{ .fig.ps: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" fig2dev -L ps -P -z A4 ${.IMPSRC} > ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.lmth.html) #{ # Append a standard ${LMTH_TAIL} footer to a .lmth file, to make a .html. .if !defined(LMTH_TAIL) #{ .if defined(NO_SIDEBAR) #{ LMTH_TAIL = ${.CURDIR}/Inc/tail_no_sb.inc .else # }{ .if exists( ${.CURDIR}/.just_com ) #{ LMTH_TAIL = ${.CURDIR}/Inc/tail_sb_com.inc .else # }{ LMTH_TAIL = ${.CURDIR}/Inc/tail_sb_org.inc .endif #} .endif #} .endif #} #------------------------------------------------------------------------------ .if !defined(SP_TOP) #{ .if exists( ${.CURDIR}/.just_com ) #{ SP_TOP = ${.CURDIR}/Inc/sidebar_com.sed .else # }{ SP_TOP = ${.CURDIR}/Inc/sidebar_org.sed .endif #} .endif #} #------------------------------------------------------------------------------ .lmth.html: ${LMTH_TAIL} ${SP_TOP} @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" echo "" > ${.CURDIR}/${.TARGET} @# Do not echo "edit ${.IMPSRC}" @# as that may be built from something else. .if defined(NO_SIDEBAR) @# Include main page & @# Strip end of page, so I can append my tail. grep -i -v '' ${.IMPSRC} | grep -i -v '' >> \ ${.CURDIR}/${.TARGET} .else # Newer & normal for most now. @# Let through top of page with title & meta keywords for search etc, @# but swap the single word for eintire content of ${SP_TOP} @# Then include main page, @# Then strip end of page after , so I can append my tail. cat ${.IMPSRC} | \ sed -e 'sx' | grep -i -v '' >> \ ${.CURDIR}/${.TARGET} .endif @# Strip top of my new common tail before appending it. cat ${LMTH_TAIL} | grep -i -v '' | \ grep -i -v '' | grep -i -v '' | grep -i -v '' | \ grep -i -v '' | grep -i -v '' >> \ ${.CURDIR}/${.TARGET} @# @echo "Append the Berklix Icon" @# cat ${.CURDIR}/${.TARGET} | sed -e 'sxxx' | sed -e \ 'szzz' \ > ${.CURDIR}/${.TARGET}.tmp cat ${.CURDIR}/${.TARGET}.tmp > ${.CURDIR}/${.TARGET} rm -f ${.CURDIR}/${.TARGET}.tmp @${ECHO_END} "${T_END} $@" #} # The ${.CURDIR}/ above seems to be needed for editing *.html in # ~jhs/public.html that has an unavoidable # /usr/obj/`cd ~jhs;pwd`/public_html .endif #} #------------------------------------------------------------------------------ .if !target(.m4.html) #{ # There is not yet a generic rule for conversion from .m4 to .html. # Look to the Makefile for that, eg ~/public_html/bim/Makefile .endif #} #------------------------------------------------------------------------------ .if !target(.ps.txt) #{ .ps.txt: @make ${DVIPS2ASCII} ${DVIPS2ASCII} < ${.IMPSRC} > ${.TARGET} @# OLD Junk follows (predates bim leaflet) @# ps2ascii ${.IMPSRC} ${.TARGET} @# @# actually uses /usr/local/bin/ps2ascii which has: @# @# XX = ${GS} -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT \ @# @# -dSIMPLE ps2ascii.ps @# @# if ( test $# -eq 0 ) then @# @# ${XX} - quit.ps @# @# elif ( test $# -eq 1 ) then @# @# ${XX} $1 quit.ps @# @# else @# @# ${XX} $1 quit.ps >$2 @# @# fi .endif #} #------------------------------------------------------------------------------ # For Geometry (page offsets etc), see: ~jhs/job/project/cd/labels/inc/geo.rof # For Ink refil notes see: ~jhs/tech/canon/bjc-70 .if !target(.ps.bjccolor) #{ .ps.bjccolor: # postscript to Canon BJC-70 Color @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${GS} ${GS_ARGS} -sDEVICE=bjccolor ${GS_OUT} -- ${.IMPSRC} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.ps.cdj670) #{ .ps.cdj670: # postscript to Canon BJC-70 Color @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${GS} ${GS_ARGS} -sDEVICE=cdj670 ${GS_OUT} -- ${.IMPSRC} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.ps.bjc600) #{ .ps.bjc600: # postscript to Canon BJC-70 Monochrome @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${GS} ${GS_ARGS} -sDEVICE=bjc600 ${GS_OUT} -- ${.IMPSRC} @${ECHO_END} "${T_END} $@" #} .endif #} # ${GS} -h shows Available devices (Col 1=Driver Name, 2=Source Of Note, 3=Note) # bj10e gs Canon BubbleJet BJ-10e # bj10v gs Canon BubbleJet BJ-10v [BJ10V] # bj10vh gs Canon BubbleJet BJ-10v, high-mergin [BJ10V] # bj200 gs Canon BubbleJet BJ-200 and BJC-240(b&w) # bjc600 gs Canon Color BJC-600/4xxx/70 + Apple StyleWriter 2x00 # bjc600 jhs 362K fails to print black text to left of colour demon # bjc800 gs Canon Color BubbleJet BJC-240/800 # bjc880j # bjccmyk gs Canon Color BubbleJet BJC-210/240/250/265/1000 [BJC250] # bjccolor gs Canon Color BubbleJet BJC-210 ... 1000 truecolor [BJC250] # bjccolor jhs 1.2M succeeds to print black text to left of colour demon # bjcgray gs Canon Color BubbleJet BJC-210 ... 1000 grayscale [BJC250] # bjcmono gs Canon Color BubbleJet BJC-210 ... 1000 monochrome [BJC250] #------------------------------------------------------------------------------ .if !target(.ps.epson) #{ .ps.epson: # Postscript to Epson bit map @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" rm -f ${.TARGET} ${GS} ${GS_ARGS} -sDEVICE=epson ${GS_OUT} -- $? @# These generate a bit map I think, for an epson, @# it does Not generate an ascii file @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ # A .pcl_rof is not allowed to be made from a .ps, only from a .rof # .if !target(.ps.pcl_rof) #{ # .ps.pcl_rof: # postscript to Hewlett Packard PCL-5 # @${ECHO_START} "${T_START} $@" #{ # @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" # ${GS} ${GS_ARGS} -sDEVICE=ljet3 ${GS_OUT} -- ${.IMPSRC} # @${ECHO_END} "${T_END} $@" #} # .endif #} #------------------------------------------------------------------------------ .if !target(.ps.pcl_ps) #{ .ps.pcl_ps: # postscript to Hewlett Packard PCL-5 @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${GS} ${GS_ARGS} -sDEVICE=ljet3 ${GS_OUT} -- ${.IMPSRC} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.ps.gif) #{ .ps.gif: # postscript to GIF @${ECHO_START} "${T_START} $@" #{ @make ${PSTOPNM} ${PPMTOGIF} @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# echo ".TARGET=${.TARGET} .IMPSRC=${.IMPSRC}" @# -ls -l ${.TARGET} ${.IMPSRC} @# -e True if exists (regardless of type). @# -s True if exists and has a size greater than zero. if test -s ${.TARGET} ; then \ echo "Outdated: ${.TARGET}" ; \ echo -n "Not updated as pstopnm breaks margin, " ; \ echo "You could update it manually with:" ; \ echo " xv ${.IMPSRC}" ; \ else \ echo "Missing or zero size, so creating: ${.TARGET}" ; \ pstopnm ${PSTOPNM_ARGS} < ${.IMPSRC} > ${HOME}/tmp/berklix-ps2gif.pnm ; \ cat ${HOME}/tmp/berklix-ps2gif.pnm | ppmtogif > ${.TARGET} ; \ echo -n "As pstopnm breaks margin," ; \ echo "You could update it manually with:" ; \ echo " xv ${.IMPSRC}" ; \ fi @# ================================== @# pstopnm ${PSTOPNM_ARGS} < ${.IMPSRC} > ${HOME}/tmp/berklix-ps2gif.pnm ; \ @# cat ${HOME}/tmp/berklix-ps2gif.pnm | ppmtogif > ${.TARGET} ; \ @# --------------------- @# pstopnm ${PSTOPNM_ARGS} < ${.IMPSRC} | ppmtogif > ${.TARGET} ; \ @# ================================== @# Retain ~/tmp/berklix-ps2gif.pnm to debug as pstopnm screws margin. @${ECHO_END} "${T_END} $@" #} # Other Conversion Tools, not used but could be explored: # ~jhs/src/bsd/imports/troff2html/pstoppm.ps # from khe? maybe Oct 26 1994 # ppmtobmp: # bad magic number - not a ppm, pgm, or pbm file # pstoimg # installed from /usr/ports/textproc/latex2html, but # pstoimg -type gif -out `basename ${.IMPSRC} .ps` -crop a ${.IMPSRC} # errors: This version of pstoimg does not support "gif" image format. # dvips2ascii eps2eps ps2ascii ps2epsi ps2frag ps2pdf ps2pdf12 ps2pdf13 # ps2pdf14 ps2pdfwr ps2pk ps2ps ps2ps2 epstopdf hipstopgm pstopnm # con2gif raw2gif rgb2gif text2gif gd2togif ppmtogif .endif #} #------------------------------------------------------------------------------ .if !target(.gif.gif_transparent) #{ .gif.gif_transparent: @${ECHO_START} "${T_START} $@" #{ @make ${PPMTOGIF} @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" giftopnm ${.IMPSRC} > `basename ${.TARGET} .gif`.pnm ppmtogif -transparent white `basename ${.TARGET} .gif`.pnm > ${.TARGET} rm `basename ${.TARGET} .gif`.pnm @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if defined(PDF_PS) #{ Default: Undefined. # The 'if' above avoids both rules .pdf.ps & .ps.pdf colliding, with error eg: # Graph cycles through target.ps .if !target(.pdf.ps) #{ # Occasional use: To print from a web downloaded .pdf .pdf.ps: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${PDF2PS} -sPAPERSIZE=a4 ${.IMPSRC} ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} .else # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .if !target(.ps.pdf) #{ # Usage includes: .rof -> .ps -> .pdf for ~/public_html/cv/ # including from ~jhs/job/groff/cv/web/ .ps.pdf: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @make ${PS2PDF} @# ${PS2PDF} cannot be appended to ":" line above, else if @# non existant it is built even when .pdf does not need remake! ${PS2PDF} -sPAPERSIZE=a4 ${.IMPSRC} ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} .endif #} #------------------------------------------------------------------------------ .if !target(.rof.txt) #{ .rof.txt: # troff to ascii @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${GROFF} -Tascii -dformat=ascii \ -dfile=`basename ${.TARGET} .ps` \ ${.IMPSRC} | \ sed -e 's/.//g' > ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.rof.html) #{ # ROF_HTML_XX="-P-g -P-a -P-r120" # No support from FreeBSD-4.5 /usr/bin/post-grohtml # -P-F/usr/share/groff_font/devhtml probably default # Following 2 ( ROF_HTML_YY & ROF_HTML_ZZ ) commented out 2005.05.31, # as FreeBSD-5.4 & FreeBSD-4.10 both require a space after -P # ROF_HTML_YY = -P-Igif # ROF_HTML_ZZ = -P-r .rof.html: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @echo "Ignore junk from each .pso, such as eg:" @echo -n " post-grohtml: (*)" @echo ":50:warning: unrecognized command \`-'" @# Each .pso works, but causes a spurious complaint on 5.3 & 6.0." @# eg on a virtually empty file with just @# 123456 @# .pso /bin/echo abcdef @# it bleats: @# post-grohtml: (/bin/echo):50:warning: unrecognized command `a' ${GROFF} \ -Thtml \ -dformat=html \ -dfile=`basename ${.TARGET} .ps` \ -mhtml \ ${ROF_HTML_YY} \ ${ROF_HTML_XX} \ ${ROF_HTML_ZZ} \ ${.IMPSRC} | \ sed -e 's/\//g' | \ sed -e 'sx\xxg' | \ sed -e 'sxHTML-IMAGE\.nrxxg' | \ sed -e 'sx^ 3cxxg' | \ sed -e 'sx^3cxxg' | \ sed -e 'sx^0

xxg' | \ sed -e 'sxHTML-IMAGE-ENDxxg' | \ sed -e '/^$$/d' | \ sed -e 's/\&/\&/g' > ${.TARGET} @${ECHO_END} "${T_END} $@" #} #------------ # Cludge to kill what the back end generates after a table: (.TS .TE) # Sometimes the 3c has a space in front. #

HTML-IMAGE.nr # 3c # 0

#------------ # Cludge to remove 3 blank lines between table entries in my resume: # sed -e '/^$$/d' #------------ # see ${UMLAUTS_INC}.rof for why I use the sed above. # the stuff used to wreck my resume # FreeBSD-4.5 with my CV says: # Calling ``pnmcut 560 138 61 80 ... | pnmtopng ... > page1.ps.png # pnmcut & pnmtopng come from /usr/ports/graphics/netpbm # This lot was used sometime prior to FreeBSD-4.5, but is no longer needed: # | sed -e 's// -->/g' \ #'"' # | sed -e 'sxx xg' \ # | sed -e 's///g' \ # | sed -e 'sxxxg' \ # | sed -e 's///g' \ # | sed -e 'sxxxg' \ # | sed -e 's/^
$$/
/g' \ # | sed -e 's/
$$//g' \ # | sed -e 's/











/
/g' \ # | sed -e 's/










/
/g' \ # | sed -e 's/









/
/g' \ # | sed -e 's/








/
/g' \ # | sed -e 's/







/
/g' \ # | sed -e 's/






/
/g' \ # | sed -e 's/





/
/g' \ # | sed -e 's/




/
/g' \ # | sed -e 's/



/
/g' \ # | sed -e 's/


/
/g' \ # | sed -e 's/

/
/g' \ # | sed -e 's/ / /g' \ # | sed -e 's/ $$//g' \ # This is the old justification why it was neded: # Removing all
is too drastic, but its worse without removal. # span not in my HTML book. # soelim ${.IMPSRC} | tbl | unroff -fhtml handle-tbl=gif | \ # sed -e '/^ email @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @# maybe should add -a ${GROFF} -Tlatin1 -dformat=latin1 \ -dfile=`basename ${.TARGET} .ps` \ ${.IMPSRC} > ${.TARGET} @# sed -e "s/.^H//g" < ${.TARGET} > ${.TARGET}.tmp @# mv ${.TARGET}.tmp ${.TARGET} addcr ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.rof.lst) #{ # This produces a rough nasty draft on the 4.2BSD Symmetric S375, # That nroff has no concept of proportional spacing, result not nice. .rof.lst: # Symmetric dependencies: /usr/bin/nroff /usr/lib/term/tabhp3p @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" @echo "Nroff is being phased out by jhs" tbl ${.IMPSRC} | nroff -Thp3p -ms ${.IMPSRC} | \ overlay -o ${.TARGET} ../odd/vsl_head.hp notail ${.TARGET} @# 78bit -8 ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ # Short cut straight from rof to pcl_rof, does a4 ok. # ps2pcl_rof fails to do a4, but must be fixed for files I receive in .ps. .if !target(.rof.pcl_rof) #{ .rof.pcl_rof: # groff to Hewlett Packard PCL-5 @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${GROFF} -Tlj4 -dformat=lj4 \ -dfile=`basename ${.TARGET} .ps` \ ${.IMPSRC} > ${.TARGET} echo "Caution, .eps images not included (EG arrow in VSL header)" @# .PSPIC -R inc/vsl_logo.eps 4.8c 0.45c fails in inc/vsl.l_rof @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ # It is not allowed to go straight from .rof to .pcl_ps, # One must go via .ps intermediary, so we do not need a rule set of # .rof.pcl_ps: # As make fill find rules of .rof.ps & .ps.pcl_ps #------------------------------------------------------------------------------ .if !target(.rof.ps) #{ .rof.ps: ${UMLAUTS_INC} ${COMMON_INC} @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${GROFF} -Tps -dformat=ps \ -dfile=`basename ${.TARGET} .ps` \ ${.IMPSRC} > ${.TARGET} @${ECHO_END} "${T_END} $@" #} # Maybe later I'll also pass along time from eg: # /usr/local/bin/stat ${.IMPSRC} | grep st_atime .endif #} #------------------------------------------------------------------------------ .if !target(.ppm.jpg) #{ .ppm.jpg: ${PNMTOJPEG} @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" cat ${.IMPSRC} | ${PNMTOJPEG} > ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.jpg.tif) #{ .jpg.tif: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${DJPEG} -pnm ${.IMPSRC} | ${PNMTOTIFF} > ${.TARGET} @${ECHO_END} "${T_END} $@" #} # man djpeg: -pnm Select PBMPLUS (PPM/PGM) output # format (this is the default for- mat). PGM is emitted # if the JPEG file is gray-scale or if -grayscale is # specified; otherwise PPM is emitted. .endif #} #------------------------------------------------------------------------------ # /bin/ls -1 *jpg* *jpeg* # cjpeg: { PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Tool- kit format). (RLE is supported only if the URT library is available.) } to jpg # djpeg: jpg to: { PBM- PLUS (PPM/PGM), BMP, GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected. (RLE is supported only if the URT library is available.) } # jpeg2yuv: Convert to yuv format # jpegexiforient: no manual # jpegorient: no manual # jpegtopnm: no manual # jpegtran: lossless transformation of JPEG files # mjpeg_simd_helper: no manual # pnmtojpeg: PNMTOJPEG # ppmtojpeg: ppmtojpeg@ -> pnmtojpeg PNMTOJPEG # rdjpgcom: display text comments from a JPEG file # wrjpgcom: insert text comments into a JPEG file #------------------------------------------------------------------------------ SNIFF = \ @echo "Sniffing if vertical portrait or horizontal landscape for: ${.IMPSRC}" # tiffinfo ${.IMPSRC}|grep "Software: tiffrotate" # horizontal # tiffinfo ${.IMPSRC}|grep "Image Width: 3509 Image Length: 2480" # horizontal # tiffinfo ${.IMPSRC}|grep "Image Width: 2480 Image Length: 3509" # vertical .if !target(.tiff.ps) #{ .tiff.ps: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${SNIFF} if ( ! tiffinfo ${.IMPSRC} | grep -q "Software: tiffrotate" ) ; \ then \ echo "vertical portrait" ; \ ${TIFF2PS} ${TIFF2PS_ARGS} \ ${TIFF2PS_ARGS_PORTRAIT} \ ${.IMPSRC} > ${.TARGET} ; \ else \ echo "horizontal landscape" ; \ ${TIFF2PS} ${TIFF2PS_ARGS} \ ${TIFF2PS_ARGS_LANDSCAPE} \ ${.IMPSRC} > ${.TARGET} ; \ fi @${ECHO_END} "${T_END} $@" #} # Although the .ps gets: %%BoundingBox: 0 0 843 596 for horiz, # instead of %%BoundingBox: 0 0 596 843 for vert. # ghostview still cant cope, whereas gv does cope, even without # needing to selct all the -w & -h above. .endif #} #------------------------------------------------------------------------------ .if !target(.tif.ps) #{ .tif.ps: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${SNIFF} if ( ! tiffinfo ${.IMPSRC} | grep -q "Software: tiffrotate" ) ; then \ echo "${.IMPSRC} is a vertical portrait." ; \ ${TIFF2PS} ${TIFF2PS_ARGS} \ ${TIFF2PS_ARGS_PORTRAIT} \ ${.IMPSRC} > ${.TARGET} ; \ else \ echo "${.IMPSRC} is a horizontal landscape." ; \ ${TIFF2PS} ${TIFF2PS_ARGS} \ ${TIFF2PS_ARGS_LANDSCAPE} \ ${.IMPSRC} > ${.TARGET} ; \ fi @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.tiff.pdf) #{ # A pipe speed up of the rules ".tiff.ps" and ".ps.pdf" # Advantage: The awfuly big .ps files never get left on disc. .tiff.pdf: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${SNIFF} if ( ! tiffinfo ${.IMPSRC} | grep -q "Software: tiffrotate" ) ; then \ echo "${.IMPSRC} is a vertical portrait" ; \ ${TIFF2PS} ${TIFF2PS_ARGS} \ ${TIFF2PS_ARGS_PORTRAIT} \ ${.IMPSRC} \ | ${PS2PDF} - ${.TARGET} ; \ else \ echo "${.IMPSRC} is a horizontal landscape." ; \ ${TIFF2PS} ${TIFF2PS_ARGS} \ ${TIFF2PS_ARGS_LANDSCAPE} \ ${.IMPSRC} \ | ${PS2PDF} - ${.TARGET} ; \ fi @${ECHO_END} "${T_END} $@" #} .endif #} .if !target(.tif.pdf) #{ # This is just a pipe speed up of the rules .tif.ps and .ps.pdf .tif.pdf: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${SNIFF} if ( ! tiffinfo ${.IMPSRC} | grep -q "Software: tiffrotate" ) ; then \ echo "${.IMPSRC} is a vertical portrait" ; \ ${TIFF2PS} ${TIFF2PS_ARGS} \ ${TIFF2PS_ARGS_PORTRAIT} \ ${.IMPSRC} \ | ${PS2PDF} - ${.TARGET} ; \ else \ echo "${.IMPSRC} is a horizontal landscape." ; \ ${TIFF2PS} ${TIFF2PS_ARGS} \ ${TIFF2PS_ARGS_LANDSCAPE} \ ${.IMPSRC} \ | ${PS2PDF} - ${.TARGET} ; \ fi @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.tex.html) #{ .tex.html: @${ECHO_START} "${T_START} $@" #{ @make ${LATEX2HTML} @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${LATEX2HTML} -no_subdir ${LATEX2HTML_ARGS} ${.IMPSRC} @# index.html is still produced, & `basename ${.IMPSRC} .tex`.html @# hard linked together. @# Specifying "-prefix `basename ${.IMPSRC} .tex`" to ${LATEX2HTML} @# does not avoid this. @# Removing index.html could be highly dangerous, especially if the @# rm command is in a macro, as here, so called from many different @# Makefiles, some of which may well have neighbouring real @# index.html files with valid content that should not be deleted. .if exists( ${CMPD} ) #{ ${CMPD} -d index.html `basename ${.IMPSRC} .tex`.html .else @# So just advise it, but do not do it: echo "Please rm index.html" @${ECHO_END} "${T_END} $@" #} .endif #} .endif #} #------------------------------------------------------------------------------ .if !target(.tex.lmth) #{ .tex.lmth: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${LATEX2HTML} -no_subdir ${LATEX2HTML_ARGS} ${.IMPSRC} .if exists( ${CMPD} ) #{ ${CMPD} -d index.lmth `basename ${.IMPSRC} .tex`.lmth .else @# So just advise it, but do not do it: echo "Please rm index.lmth" @${ECHO_END} "${T_END} $@" #} .endif #} .endif #} #------------------------------------------------------------------------------ .if !target(.tex.pdf) #{ .tex.pdf: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${PDFLATEX} ${.IMPSRC} @echo "Maybe this should instead use ${TEXI2PDF} ?" @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.tex.dvi) #{ .tex.dvi: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${LATEX} ${.IMPSRC} @echo "Maybe this should instead use ${TEXI2DVI} ?" @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ .if !target(.tiff.tif) #{ # For a tiff document read in by http://www.berklix.com/scanjet/ # that was double sided, where a double sheet was wrongly read in by the auto # sheet feeder. # Sometimes the order is a simple [2,1,4],3,6,5,8,7 that can be fixed just by # tiffswap (see http://www.berklix.com/~jhs/bin/.sh/tiffswap ) # Sometimes the order is: [1,3,2],5,4,7,6,9,8 to be fixed by rule below: .tiff.tif: @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" tiffsplit ${.IMPSRC} @# Set 1st page aside, for later. mv xaa.tif ${.TARGET}.1.tmp @# Create new files with correct names ready to swap pages. @# (- as seems to error even when should not ) @echo "Ignore next error code from tiffcp." -tiffcp x[a-z][a-z].tif ${.TARGET}.2.tmp rm x[a-z][a-z].tif tiffswap ${.TARGET}.2.tmp # ~jhs/bin/.sh/tiffswap @echo "Ignore next error code from tiffcp." -tiffcp ${.TARGET}.1.tmp ${.TARGET}.2.tmp ${.TARGET} rm ${.TARGET}.1.tmp ${.TARGET}.2.tmp @${ECHO_END} "${T_END} $@" #} .endif #} #============================================================================== # How To Build Tools ${ACROREAD}: cd /usr/ports/print/acroread && make install @# acroread: with pdf, gives a better presentation, & is @# faster if antialias enabled. But won''t compile. ${DVIPS}: cd /usr/ports/print/dvips && make install ${DJPEG}: cd /usr/ports/graphics/jpeg && make install ${DVIPS2ASCII}: cd /usr/ports/print/dvips2ascii && make install ${FAX2PS}: cd /usr/ports/graphics/tiff && make install ${GS}: cd /usr/ports/print/ghostscript8 && make install @# 6.4-RELEASE & 7.4-RELEASE have no /usr/ports/print/ghostscript-gnu @# gs: Does support multiple file invocation ${GV}: cd /usr/ports/print/gv && make install @# gv: with PDF, gives wrong format & chops right margin @# at the normal/landscape boundary & chops right margin @# at the normal/landscape boundary @# Does not offer a "Next" button (for multiple @# file invocation). ${GHOSTVIEW}: cd /usr/ports/print/ghostview && make install @# ghostview: Wont start with multiple file invocation ${INFO}: # for eg 'info cvs' cd /usr/ports/print/texinfo && make install ${INFOKEY}: cd /usr/ports/print/texinfo && make install ${INSTALL-INFO}: cd /usr/ports/print/texinfo && make install ${ISPELL}: cd /usr/ports/textproc/ispell && make install cd /usr/ports/german/ispell && make install ${LATEX2HTML}: cd /usr/ports/textproc/latex2html && make install ${LAME}: cd /usr/ports/audio/lame && make install ${LATEX}: # For bim leaftlet cd /usr/ports/print/latex && make install ${LE}: mkdir le cd le && ${PATH_LE}/le.c cd le && ${PATH_LE}/Makefile cd le && ${PATH_LE}/le.1 cd le && make all install rm -rf le ${MAKEINFO}: cd /usr/ports/print/texinfo && make install ${PDFLATEX}: # For bim leaftlet cd /usr/ports/print/teTeX-base && make install ${PNMTOTIFF}: cd /usr/ports/graphics/pnmtotiff && make install ${PPMTOGIF}: # For bim leaftlet cd /usr/ports/graphics/netpbm && make install @echo "No manual is installed, see source with params with:" @echo "vi -c/parse_command_line /usr/ports/graphics/netpbm/work/netpbm-*/converter/ppm/ppmtogif.c" @# Flags include "transparent" "comment" etc, but nothing for: @# landscape portrait a4 letter pagesize papersize ${PSTOPNM}: cd /usr/ports/graphics/netpbm && make install @echo "No manual is installed, see source with params with:" @echo " cd /usr/ports/graphics/netpbm/work/netpbm-*/converter/other; vi -c/parse_command_line pstopnm.csh pstopnm.c" @# .csh: @# case -la*: # -landscape ${PSNUP} ${PSSELECT} ${PSTOPS}: cd /usr/ports/print/psutils-a4 && make install @# print/psutils-letter ${TEXI2DVI}: cd /usr/ports/print/texinfo && make install ${TEXI2PDF}: cd /usr/ports/print/texinfo && make install ${TEXINDEX}: cd /usr/ports/print/texinfo && make install ${TIFF2PS}: cd /usr/ports/graphics/tiff && make install ${XDVI}: cd /usr/ports/print/xdvi && make install ${XPDF}: cd /usr/ports/print/xpdf && make install @# xpdf with pdf, works ok @# Does not offer a "Next" button (for multiple file invocation). ${PS2PDF}: ${GS} #------------------------------------------------------------------------------ .if !target(${UMLAUTS_INC}) #{ UMLAUTS_SRC = /home/jhs/public_html/standards/umlauts.rof ${UMLAUTS_INC}: .if exists(${UMLAUTS_SRC}) install -c ${UMLAUTS_SRC} ${UMLAUTS_INC} .else cd && cd tmp && fetch http://berklix.com/~jhs/standards/umlauts.rof \ && install -c umlauts.rof ${UMLAUTS_INC} .endif .endif #} #------------------------------------------------------------------------------ .if !target(${COMMON_INC}) #{ COMMON_SRC = /home/jhs/public_html/standards/common.rof ${COMMON_INC}: .if exists(${COMMON_SRC}) install -c ${COMMON_SRC} ${COMMON_INC} .else cd && cd tmp && fetch http://berklix.com/~jhs/standards/common.rof \ && install -c common.rof ${COMMON_INC} .endif .endif #} #============================================================================== # Viewers. .if ! defined (VIEW_TOOLS) #{ VIEW_TOOLS = ${GHOSTVIEW} ${GV} ${XDVI} ${XPDF} # ${ACROREAD} .endif #} .if ! defined (VIEW_TOOLS) #{ CHECK_TOOLS = ${DVIPS2ASCII} ${ISPELL} # ${ACROREAD} .endif #} .if ! defined (VIEW_TOOLS) #{ BUILD_TOOLS = ${DVIPS} ${GS} ${LATEX2HTML} ${LATEX} ${LE} ${PDFLATEX} \ ${PS2PDF} ${PSNUP} ${PSSELECT} ${PSTOPS} .endif #} #============================================================================== # Syntax examples: # t: # man true: utility always returns with an exit code of zero # @if ( true ) ; then \ # echo -n "printed " ; echo "printed" ; \ # else \ # echo -n "silent " ; echo "silent" ; \ # fi # nt: # @if ( ! true ) ; then \ # echo -n "silent " ; echo "silent" ; \ # else \ # echo -n "printed " ; echo "printed" ; \ # fi # f: # man false: utility always returns with a non-zero exit code # @if ( false ) ; then \ # echo -n "silent " ; echo "silent" ; \ # else \ # echo -n "printed " ; echo "printed" ; \ # fi # tst: # man test: -s returns 0 if file exists and has a size greater than zero # @echo text > $@.tmp # @if ( test -s $@.tmp ) ; then \ # echo -n "printed " ; echo "printed" ; \ # else \ # echo -n "silent " ; echo "silent" ; \ # fi # @rm $@.tmp # c: # man cmp: returns 0 if same. # @echo tmp > ${HOME}/tmp/$@.tmp # @if ( cmp ${HOME}/tmp/$@.tmp ${HOME}/tmp/$@.tmp ) ; then \ # echo -n "printed " ; echo "printed" ; \ # else \ # echo -n "silent " ; echo "silent" ; \ # fi # @rm ${HOME}/tmp/$@.tmp # tort: # @if ( true || true ) ; then \ # echo -n "printed " ; echo "printed" ; \ # else \ # echo -n "silent " ; echo "silent" ; \ # fi # forf: # @if ( false || false ) ; then \ # echo -n "silent " ; echo "silent" ; \ # else \ # echo -n "printed " ; echo "printed" ; \ # fi # tandt: # @if ( true && true ) ; then \ # echo -n "printed " ; echo "printed" ; \ # else \ # echo -n "silent " ; echo "silent" ; \ # fi # fandf: # @if ( false && false ) ; then \ # echo -n "silent " ; echo "silent" ; \ # else \ # echo -n "printed " ; echo "printed" ; \ # fi # test: t nt f tort forf tandt fandf tst # # Warning although ~ evaluates in /bin/sh it doesnt in Makefiles. #============================================================================== # Retrofit all ~ Makefiles to be able to run silently without complaint # on both 6.0-BETA2 & also silently on 5 & 4. fo NOOBJ NO_OBJ # See also /usr/share/mk/bsd.compat.mk # { # .if !defined(BURN_BRIDGES) # .for oldnew in \ # NOATM:NO_ATM \ # NOCLEANDIR:NO_CLEANDIR \ # NOCRYPT:NO_CRYPT \ # NODOCCOMPRESS:NO_DOCCOMPRESS \ # NOEXTRADEPEND:NO_EXTRADEPEND \ # NOFORTH:NO_FORTH \ # NOFSCHG:NO_FSCHG \ # NOGAMES:NO_GAMES \ # NOHTML:NO_HTML \ # NOINET6:NO_INET6 \ # NOINFO:NO_INFO \ # NOINFOCOMPRESS:NO_INFOCOMPRESS \ # NOINSTALLLIB:NO_INSTALLLIB \ # NOLIBC_R:NO_LIBC_R \ # NOLIBPTHREAD:NO_LIBPTHREAD \ # NOLIBTHR:NO_LIBTHR \ # NOLINT:NO_LINT \ # NOMAN:NO_MAN \ # NOMANCOMPRESS:NO_MANCOMPRESS \ # NOMLINKS:NO_MLINKS \ # NOOBJ:NO_OBJ \ # NOPAM:NO_PAM \ # NOPIC:NO_PIC \ # NOPROFILE:NO_PROFILE \ # NO_RCMNDS:NO_RCMDS \ # NOSHARE:NO_SHARE \ # NOSHARED:NO_SHARED \ # NOTAGS:NO_TAGS # .for old in ${oldnew:C/:.*//} # .for new in ${oldnew:C/.*://} # .if defined(${old}) && !defined(${new}) # .warning ${old} is deprecated in favor of ${new} # ${new}= ${${old}} # .endif # .endfor # .endfor # .endfor # .endif # } #============================================================================== .if !target(.wav.mp3) #{ .wav.mp3: ${LAME} @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" lame ${.IMPSRC} ${.TARGET} @${ECHO_END} "${T_END} $@" #} .endif #} # Does a wav2mp3 conversion works on wav from cd, # but not wav from clipman # lame on same host called twice produces same content. # lame on different hosts fire & laps produces same size # different content both playable. # --------- # wav2mp3 # not installed, but web search: # http://wav2mp3lame.sourceforge.net/ # Welcome to the homepage of Wav2MP3 Wizard, the lightest and # fastest GUI for the 3 most-widely used open-source encoders; # LAME, BladeEnc and OGG Vorbis. # ---- # clipman generates both 32 kbps .wav files & 8bkps .act files #------------------------------------------------------------------------------ .if !target(mp3) #{ mp3: # wav @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_BUILD} i in ${FOR_WAV} ; do \ make `basename $$i .wav`.mp3 ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #------------------------------------------------------------------------------ # xmms plays .wav .wma.mp3: @echo "What tool to convert .wma to .mp3 ?" @echo "ffmpeg can encode wma: http://ffmpeg.mplayerhq.hu" # k3b references multimedia/ffmpeg decoder for wma files, # ports/multimedia/ffmpeg - video motion reduction. #------------------------------------------------------------------------------ # echo "ports/audio/xmms-wma for xmms, supports MickeySoft WMA format" #------------------------------------------------------------------------------ # sound stick formats: # ogg: gnu max compact free # mp3 rights reg with fraunhofer # drm digital rights management (for legal download) #------------------------------------------------------------------------------ # cdda2wav # ports/sysutils/cdrtools # cdda2wav -B # printenv CDDA_DEVICE ; cdrecord -v -scanbus #------------------------------------------------------------------------------ # cd2mp3 # ports/audio/audio/cd2mp3 #------------------------------------------------------------------------------ .if !target(clean_mp3) #{ clean_mp3: # clean_wav @${ECHO_START} "${T_START} $@" #{ @${ECHO_BUILD} "${.TARGET}: ${.IMPSRC}" ${CMD_FOR_CLEAN} i in ${FOR_WAV} ; do \ rm -f `basename $$i .wav`.mp3 ; \ done @${ECHO_END} "${T_END} $@" #} .endif #} #============================================================================== # End