#======================================================================= # Makefile for files in /u/sy/beebe/tex/bst/ # # [05-Apr-2017] #======================================================================= # Program definitions PROGRAM = CHANGE-THIS-VALUE PROGLIB = CHANGE-THIS-VALUE VERSION = 1.0 #======================================================================= # Installation locations prefix = /usr/local bindir = $(prefix)/bin catdir = $(prefix)/man/cat$(manext) libdir = $(libtop)/$(PROGRAM)-$(VERSION) libtop = $(prefix)/$(PROGLIB)/ mandir = $(prefix)/man/man$(manext) manext = 1 shrlibdir = $(shrlibtop)/$(PROGRAM)-$(VERSION) shrlibtop = $(prefix)/share/$(PROGLIB)/ #======================================================================= # Macro definitions BIBTEX = bibtex BIBTEXFLAGS = CAT = cat CAT-PASSWD = cat /etc/passwd CAT-PASSWD = ypcat passwd CC = cc CFLAGS = -g CHECKSUM = cat >/tmp/bst.2 ; \ $(HEADER) >/tmp/bst.1 ; \ cat /tmp/bst.1 /tmp/bst.2 | checksum CHKDELIM = chkdelim CHKDELIMFLAGS = -tex -i LG\' CHMOD = chmod CLEANUP = /bin/rm -f /tmp/bst.1 /tmp/bst.2 CP = /bin/cp -p CP = rcp -p ### WARNING: Solaris cpp is MUCH preferred over GNU/Linux cpp, because ### it preserves spacing in the output, preserving readability and ### comment formatting! CPP = /usr/bin/cpp CPP = /usr/ccs/lib/cpp CPPFLAGS = -D_BOOKPAGES -D_CODEN -D_ISSN -D_ISSN_L -D_ISBN -D_LCCN -D_PRICE -D_URL -D_DOI DETEX = detex DETEXFLAGS = -m -n -s DISTFILES = bst/Makefile bst/*.bib bst/*.ltx bst/*.sty bst/*.tex \ bst/images/* bst/test*.pdf bst/x*.bst bst/xbtxbst.doc DVIPS = dvips-type1 DVIPSFLAGS = -j0 DW = dw HEADER = (echo "%% =====================================================================" ;\ echo "%% WARNING: Do NOT edit this file. It was produced automatically by" ;\ echo "%% $(PERSONALNAME) <$(USER)@`hostname`>" ;\ echo "%% from file://`hostname`$(PWD)/xbtxbst.doc " ;\ echo "%% on `date`." ;\ echo "%% =====================================================================") ISPELL = ispell LATEX = latex2e LATEX = latex LATEXFLAGS = LIBFILES = /dev/null MAKEINDEX = makeindex MAKEINDEXFLAGS = LN = ln LS = ls MKDIR = mkdir -p MV = /bin/mv PDFLATEX = pdflatex PDFTEX = pdftex PERSONALNAME = "`${CAT-PASSWD} | grep '^'${USER}':' | awk -F: '{print $$5}'`" PSTOPDF = ps2pdf PSTOPDF = distill PSTOPDFFLAGS = RM = /bin/rm -f # sed command to delete lines beginning with one percent sign SED = /bin/sed -e '/^%$$/d' -e '/^%[^%].*$$/d' ### We need bash to get extended test built-in with support for -nt option SHELL = /bin/bash SHRLIBFILES = /dev/null SORT = sort SPELL = spell SPELLFILTER = $(CAT) SPELLFILTER = $(SED) -e 's/[0-9,.:;?&]/ /g' TEST = test TOUCH = touch ZIP = zip #======================================================================= # Compiler flags and source files LATEXFLAGS = $(LATEXOPT) LATEXOPT = LATEXOBJS = $(LATEXSRCS:.ltx=.dvi) LATEXSRCS = test-x-abbrv.ltx test-x-alpha.ltx test-x-plain.ltx test-x-unsrt.ltx #======================================================================= # Suffixes and extra rule(s) .SUFFIXES: .bbl .pdf .ps .ckd .dvi .aux .dw .ser .ltx .aux.bbl: $(BIBTEX) $* .ltx.ckd .tex.ckd .texi.ckd .texinfo.ckd: $(CHKDELIM) $(CHKDELIMFLAGS) $< >$@ .ltx.dw .tex.dw .texi.dw .texinfo.dw: $(DETEX) $(DETEXFLAGS) $< | $(DW) >$@ .dvi.ps: $(DVIPS) -o$@ $(DVIPSFLAGS) $< .dvi.pdf: $(DVIPS) -o$*.ps $(DVIPSFLAGS) $< $(PSTOPDF) $(PSTOPDFFLAGS) $*.ps .ltx.dvi: -$(LATEX) $(LATEXFLAGS) $< -$(BIBTEX) $(BIBTEXFLAGS) $* -$(LATEX) $(LATEXFLAGS) $< -$(MAKEINDEX) $(MAKEINDEXFLAGS) $< $(LATEX) $(LATEXFLAGS) $< $(MAKEINDEX) $(MAKEINDEXFLAGS) $< .ltx.pdf: -$(TEST) $*.aux -nt $*.bbl && $(BIBTEX) $* -$(PDFLATEX) $(PDFLATEXFLAGS) $< -$(BIBTEX) $* -$(PDFLATEX) $(PDFLATEXFLAGS) $< -$(BIBTEX) $* -$(PDFLATEX) $(PDFLATEXFLAGS) $< .ltx.ser .tex.ser .texi.ser .texinfo.ser: if test -f $*.sok ; then true ; else $(TOUCH) $*.sok ; fi $(DETEX) $(DETEXFLAGS) $< | $(SPELLFILTER) | $(SPELL) +$*.sok >$@ $(DETEX) $(DETEXFLAGS) $< | $(SPELLFILTER) | $(ISPELL) -l -p $*.sok >>$@ $(MV) $@ $@.tmp $(SORT) -u $@.tmp >$@ -$(RM) $@.tmp .ps.pdf: $(PSTOPDF) $(PSTOPDFFLAGS) $< #======================================================================= BBLFILES = $(LTXFILES:.ltx=.bbl) COMMONDEPS = Makefile bst.bib test-common.tex test-front-matter.tex \ test-ifx.tex x-bst.sty BSTFILES = x-abbrv.bst x-alpha.bst x-plain.bst x-unsrt.bst LTXFILES = $(LATEXSRCS) PDFFILES = $(LTXFILES:.ltx=.pdf) #======================================================================= # Targets: all: bst bbl pdf bbl: $(BBLFILES) FRC ## This step gets error reports with GNU/Linux cpp, but they can be safely ignored! bst: $(BSTFILES) check: @echo 'There is no validation suite for this program (yet)' chkdelim: $(LATEXSRCS:.ltx=.ckd) $(TEXSRCS:.tex=.ckd) clean: -$(RM) *.dw -$(RM) *.i -$(RM) *.o -$(RM) *.ser -$(RM) *~ -$(RM) \#* -$(RM) a.out -$(RM) core core.* clean-bbl: -$(RM) $(BBLFILES) clean-bst: -$(RM) $(BSTFILES) clobber: distclean dist: zip distclean: mostlyclean -$(RM) $(PROGRAM) -$(RM) $(PDFFILES) -$(RM) *.aux *.bbl *.ind *.idx *.lof *.lot *.out *.toc dw: $(LATEXSRCS:.ltx=.dw) $(TEXSRCS:.tex=.dw) FRC: install: install-exe install-lib install-shrlib install-man install-show install-exe: uninstall-exe $(CP) $(PROGRAM) $(bindir)/$(PROGRAM) $(LN) $(bindir)/$(PROGRAM) $(bindir)/$(PROGRAM)-$(VERSION) $(CHMOD) 775 $(bindir)/$(PROGRAM) $(bindir)/$(PROGRAM)-$(VERSION) install-lib: uninstall-lib ## $(MKDIR) $(libtop) ## @if test -d $(libtop) ; then true ; else echo Cannot create $(libtop) ; exit 1 ; fi ## $(MKDIR) $(libdir) ## @if test -d $(libdir) ; then true ; else echo Cannot create $(libdir) ; exit 1 ; fi ## $(CP) $(LIBFILES) $(libdir)/ ## $(CHMOD) 664 $(libdir)/* install-man: uninstall-man $(CP) $(PROGRAM).man $(mandir)/$(PROGRAM).$(manext) $(CHMOD) 664 $(mandir)/$(PROGRAM).$(manext) install-show: @echo '' @echo Installed files... @$(LS) -l $(bindir)/$(PROGRAM) $(bindir)/$(PROGRAM)-$(VERSION) \ $(mandir)/$(PROGRAM).$(manext) @if test -d $(libdir) ; then $(LS) -lR $(libdir) ; fi @if test -d $(shrlibdir) ; then $(LS) -lR $(shrlibdir) ; fi @echo '' install-shrlib: uninstall-shrlib ## $(MKDIR) $(shrlibtop) ## @if test -d $(shrlibtop) ; then true ; else echo Cannot create $(shrlibtop) ; exit 1 ; fi ## $(MKDIR) $(shrlibdir) ## @if test -d $(shrlibdir) ; then true ; else echo Cannot create $(shrlibdir) ; exit 1 ; fi ## $(CP) $(SHRLIBFILES) $(shrlibdir)/ ## $(CHMOD) 664 $(shrlibdir)/* maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." -$(RM) $(BSTFILES) mostlyclean: clean -$(RM) *.blg *.dvi *.ilg *.log pdf: $(PDFFILES) plain-tex.pdf: $(COMMONDEPS) plain-tex.tex $(PDFTEX) plain-tex.tex $(BIBTEX) plain-tex $(PDFTEX) plain-tex.tex $(BIBTEX) plain-tex $(PDFTEX) plain-tex.tex spell: $(LATEXSRCS:.ltx=.ser) $(TEXSRCS:.tex=.ser) test-x-plain.bbl: $(COMMONDEPS) x-plain.bst -$(BIBTEX) test-x-plain || $(TOUCH) $@ test-x-plain.pdf: $(COMMONDEPS) test-x-plain.bbl test-x-plain.ltx x-plain.bst test-x-alpha.bbl: $(COMMONDEPS) x-plain.bst -$(BIBTEX) test-x-alpha || $(TOUCH) $@ test-x-alpha.pdf: $(COMMONDEPS) test-x-alpha.bbl test-x-alpha.ltx x-plain.bst test-x-abbrv.bbl: $(COMMONDEPS) x-plain.bst -$(BIBTEX) test-x-abbrv || $(TOUCH) $@ test-x-abbrv.pdf: $(COMMONDEPS) test-x-abbrv.bbl test-x-abbrv.ltx x-plain.bst test-x-unsrt.bbl: $(COMMONDEPS) x-plain.bst -$(BIBTEX) test-x-unsrt || $(TOUCH) $@ test-x-unsrt.pdf: $(COMMONDEPS) test-x-unsrt.bbl test-x-unsrt.ltx x-plain.bst uninstall: uninstall-exe uninstall-lib uninstall-shrlib uninstall-man uninstall-exe: -$(RM) $(bindir)/$(PROGRAM) -$(RM) $(bindir)/$(PROGRAM)-$(VERSION) uninstall-lib: ## -$(RM) -r $(libdir) uninstall-man: -$(RM) $(mandir)/$(PROGRAM).$(manext) -$(RM) $(catdir)/$(PROGRAM).$(manext) uninstall-shrlib: ## -$(RM) -r $(shrlibdir) x-abbrv.bst: xbtxbst.doc $(CPP) -P -DABBRV $(CPPFLAGS) xbtxbst.doc | \ $(SED) -e 's/"xbtxbst.doc"/"x-abbrv.bst"/' | \ $(CHECKSUM) >x-abbrv.bst $(CLEANUP) x-alpha.bst: xbtxbst.doc $(CPP) -P -DALPHA $(CPPFLAGS) xbtxbst.doc | \ $(SED) -e 's/"xbtxbst.doc"/"x-alpha.bst"/' | \ $(CHECKSUM) >x-alpha.bst $(CLEANUP) x-plain.bst: xbtxbst.doc $(CPP) -P -DPLAIN $(CPPFLAGS) xbtxbst.doc | \ $(SED) -e 's/"xbtxbst.doc"/"x-plain.bst"/' | \ $(CHECKSUM) >x-plain.bst $(CLEANUP) x-unsrt.bst: xbtxbst.doc $(CPP) -P -DUNSRT $(CPPFLAGS) xbtxbst.doc | \ $(SED) -e 's/"xbtxbst.doc"/"x-unsrt.bst"/' | \ $(CHECKSUM) >x-unsrt.bst $(CLEANUP) zip: (cd .. ; $(ZIP) -r bst.zip $(DISTFILES)) #======================================================================= # File dependencies #=======================================================================