summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pst-intersect/Makefile
blob: 43463f8ada8fa140ea04d8775c72461f073a418c (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
.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps

PACKAGE = pst-intersect

LATEX = latex

ARCHNAME = $(PACKAGE)-$(shell date +"%y%m%d")
ARCHNAME_TDS = $(PACKAGE).tds

ARCHFILES = $(PACKAGE).dtx $(PACKAGE).ins Makefile \
            README Changes $(PACKAGE).pdf $(PACKAGE)-DE.pdf

PS2PDF = GS_OPTIONS=-dPDFSETTINGS=/prepress ps2pdf

all : doc doc-DE

doc : $(PACKAGE).pdf
doc-DE : $(PACKAGE)-DE.pdf

dist : doc Changes
	mkdir -p $(PACKAGE)
	cp $(ARCHFILES) $(PACKAGE)
	tar chvzf $(ARCHNAME).tar.gz $(PACKAGE)
	rm -rf $(PACKAGE)
	@ echo
	@ echo $(ARCHNAME).tar.gz

$(PACKAGE).dvi: L = english
$(PACKAGE)-DE.dvi: L = ngerman
%.dvi: $(PACKAGE).dtx $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro
	$(LATEX) -jobname=$(basename $@) '\newcommand*{\mainlang}{$(L)}\input{$(PACKAGE).dtx}'
	$(LATEX) -jobname=$(basename $@) '\newcommand*{\mainlang}{$(L)}\input{$(PACKAGE).dtx}'

%.ps: %.dvi
	dvips $< 
%.pdf: %.ps
	$(PS2PDF) $< $@

$(PACKAGE).sty $(PACKAGE).pro $(PACKAGE).tex: $(PACKAGE).ins $(PACKAGE).dtx
	tex $<

Changes: Changes.py $(PACKAGE).dtx
	python $<

arch : Changes
	zip $(ARCHNAME).zip $(ARCHFILES)

arch-tds : Changes
	$(RM) $(ARCHNAME_TDS).zip
	mkdir -p tds/tex/latex/$(PACKAGE)
	mkdir -p tds/tex/generic/$(PACKAGE)
	mkdir -p tds/doc/latex/$(PACKAGE)
	mkdir -p tds/source/latex/$(PACKAGE)
	mkdir -p tds/dvips/$(PACKAGE)
	cp $(PACKAGE).sty tds/tex/latex/$(PACKAGE)/
	cp $(PACKAGE).tex tds/tex/generic/$(PACKAGE)/
	cp $(PACKAGE).pro tds/dvips/$(PACKAGE)/
	cp Changes $(PACKAGE).pdf $(PACKAGE)-DE.pdf README tds/doc/latex/$(PACKAGE)/
	cp $(PACKAGE).dtx $(PACKAGE).ins Makefile \
	  tds/source/latex/$(PACKAGE)/
	cd tds ; zip -r ../$(ARCHNAME_TDS).zip tex doc source dvips
	cd ..
	rm -rf tds

ctan : dist arch-tds
	tar cf $(PACKAGE).tar $(ARCHNAME_TDS).zip $(ARCHNAME).tar.gz

clean :
	$(RM) $(foreach prefix, $(PACKAGE) $(PACKAGE)-DE, \
	        $(addprefix $(prefix), .dvi .ps .log .aux .bbl .blg .out .tmp \
	           .toc .hd))

veryclean : clean
	$(RM) $(addprefix $(PACKAGE), .pdf .tex .sty .pro) $(PACKAGE)-DE.pdf Changes