Debian Codegraph @

texmf-dist/doc/latex/cweb-latex/Makefile

raw
1 # $Id: Makefile,v 1.5 1995/11/21 00:41:49 schrod Exp $
2 #----------------------------------------------------------------------
3
4 default:: install
5
6
7 #
8 # installation
9 #
10
11 # root of TDS compliant installation
12
13 TEXMF = /usr/local/lib/texmf
14
15 # Comment it out if you don't want to install contributed packages.
16 # (Not recommended.)
17
18 INSTALL_CONTRIB = install-contrib
19
20 # installation target directories
21 # (No need to change here for TDS installations.)
22
23 LATEX = $(TEXMF)/tex/latex
24 CWEB = $(LATEX)/cweb
25
26 LATEX_DOC = $(TEXMF)/doc/latex
27 CWEB_DOC = styles/cweb
28
29
30 # installation actions
31
32 .PHONY: install install-cweb-sty install-contrib
33
34 install:: install-cweb-sty $(INSTALL_CONTRIB)
35
36 install-cweb-sty:: $(LATEX) $(LATEX_DOC)
37 test -d $(CWEB) || mkdir $(CWEB)
38 cp *.sty *.cls $(CWEB)
39 cd $(LATEX_DOC) ; \
40 if [ ! -d $(CWEB_DOC) ] ; \
41 then d=`echo $(CWEB_DOC) | sed 's:/.*::'` ; \
42 test -d $$d || mkdir $$d ; \
43 test -d $(CWEB_DOC) || mkdir $(CWEB_DOC) ; \
44 fi
45 cp *.dvi $(LATEX_DOC)/$(CWEB_DOC)
46
47 install-contrib::
48 cp contrib/*.sty $(CWEB)
49 : cp contrib/*.dvi $(CWEB_DOC)
50
51 $(LATEX):
52 @echo "You don't have a LaTeX styles directory (tree)." >&2
53 @exit 1
54
55 $(LATEX_DOC):
56 @echo "You don't have a LaTeX documentation directory (tree)." >&2
57 @exit 1
58
59
60 #
61 # management tasks
62 #
63
64 .PHONY: distrib collect pack
65
66 distrib:: collect pack
67
68 pack::
69 cp $(HOME)/Notes/Copying.gpl License
70 pwd=`pwd` ; pwd=`suffix $$pwd /` ; cd .. ; \
71 gtar -czvf $$pwd.tar.gz \
72 --exclude=CVS --exclude=.cvsignore --exclude=.rcsrc $$pwd ; \
73 cp $$pwd/README $$pwd.README
74 /bin/rm -f License
75
76 collect::
77 cd src ; imkmf ; make distrib
78 cd examples ; make distrib
79 : 'cd contrib ; make distrib'