summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/proposal/lib/Makefile.in
blob: 57da62fad1bd20cdc746817cf44718d5b6fe9c1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
all: package doc
package: $(DTX.sty) $(DTX.cls)
doc: $(DTX.pdf) $(EXAMPLE.pdf)

$(DTX.sty) $(DTX.cls): $(INS) $(DTX)
	$(PDFLATEX) $(INS)


$(EXAMPLE.pdf): %.pdf: %.tex $(DTX.sty) $(DTX.cls) $(EXAMPLE.deps) 
	$(PDFLATEX) $(firstword $<)
	@if (grep 'Please (re)run Biber' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	    then biber $(patsubst %.dtx, %, $(firstword $<));fi
	@if (grep 'Please (re)run BibTeX' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	    then bibtex $(patsubst %.dtx, %, $(firstword $<));fi
	@if (grep "Writing index file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	   then makeindex\
		-o $(patsubst %.dtx, %.ind, $(firstword $<))\
		$(patsubst %.dtx, %.idx, $(firstword $<)); fi
	@if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	   then $(PDFLATEX) $(firstword $<); fi
	@if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	    then $(PDFLATEX) $(firstword $<); fi

%.ind:	
	touch $@

$(DTX.pdf): %.pdf: %.dtx $(DTX.sty) $(DTX.cls)
	$(PDFLATEX) $(firstword $<)
	@if (grep 'Please (re)run Biber' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	    then biber $(patsubst %.dtx, %, $(firstword $<));fi
	@if (grep "Writing glossary file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	   then makeindex\
		-o $(patsubst %.dtx, %.gls, $(firstword $<))\
		$(patsubst %.dtx, %.glo, $(firstword $<)); fi
	@if (grep "Writing index file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	   then makeindex\
		-o $(patsubst %.dtx, %.ind, $(firstword $<))\
		$(patsubst %.dtx, %.idx, $(firstword $<)); fi
	@if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	   then $(PDFLATEX) $(firstword $<); fi
	@if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
	    then $(PDFLATEX) $(firstword $<); fi

clean:     
	rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg 

distclean: 	clean
	rm -f *.aux *.ind *.gls *.ps *.dvi *.toc *.thm
	rm -Rf auto	

filedate:
	@for d in $(DTX); do \
             $(FILEDATEPROG) $$d ; \
        done

checksum:
	@for d in $(DTX); do \
             $(CHECKSUMPROG) $$d --update ; \
        done

enablechecksum:
	@for d in $(DTX); do \
             $(CHECKSUMPROG) $$d --enable ; \
        done

disablechecksum:
	@for d in $(DTX); do \
             $(CHECKSUMPROG) $$d --disable ; \
        done

# copy stuff around for making the TeX Directory Structure
ltds:
	rm -Rf $(TDSDIR.doc);mkdir -p $(TDSDIR.doc)
	rm -Rf $(TDSDIR.tex);mkdir -p $(TDSDIR.tex)
	rm -Rf $(TDSDIR.src);mkdir -p $(TDSDIR.src)
	cp $(DTX.src) $(TDS.src) $(TDSDIR.src)
	cp $(DTX.sty) $(DTX.cls) $(TDS.tex) $(TDSDIR.tex)
	cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(TDSDIR.doc)
	@for d in $(TDS.exdirs); do cp -R $$d $(TDSDIR.doc); done

lctan:
	mkdir -p $(CTANDIR)
	cp $(DTX.src) $(DTX.sty) $(DTX.cls) $(TDS.src) $(TDS.tex) $(CTANDIR)
	cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(CTANDIR)
	@for d in $(TDS.exdirs); do cp -R $$d $(CTANDIR); done

# sometimes (when bibLaTeX changes) we have to rerun biber; use make -B biber
biber:
	pdflatex $(DTX.base:%=%.dtx)
	biber $(DTX.base)