Ticket #666: Makefile

File Makefile, 2.4 KB (added by warrick, 4 years ago)

Makefile used to build ROPP IO UG at Met Office

Line 
1################################################################################
2# #
3# Makefile for ROPP IO User Guide Document #
4# ------------------------------------- #
5# #
6# Met Office, Exeter <romsaf@metoffice.gov.uk> #
7# #
8################################################################################
9
10TEXSOURCES = appendix.tex \
11 ../common/appendix_utils.tex \
12 ../common/appendix_use.tex \
13 ../common/docset.tex \
14 ../common/copyright.tex \
15 ../common/romsaf_acronyms.tex \
16 ../common/romsaf_definitions.tex \
17 ../common/extra_data.tex \
18 ../common/ug_ropp_intro.tex \
19 romsaf_ropp_ug_io.tex \
20 io_module_files.tex \
21 ug_io.tex \
22 ug_io_intro.tex
23
24INSTALL = install
25MKDIR = make -pv
26INSTALLDIR = $(HOME)/public_html/ropp/documents
27
28all : pdf
29
30dvi : romsaf_ropp_ug_io.dvi
31ps : romsaf_ropp_ug_io.ps
32pdf : romsaf_ropp_ug_io.pdf
33
34romsaf_ropp_ug_io.dvi : $(TEXSOURCES)
35 ln -sf ../common/ug_ropp_intro.tex
36
37 latex romsaf_ropp_ug_io
38 bibtex ug_io
39 bibtex ug_ropp_intro
40
41 sed s/'{SAF}'/'{ROM SAF}'/g <ug_io.bbl >ug_io.bbl_new
42 sed s/'{ROM SAF}, G.,'/'{ROM SAF},'/g <ug_io.bbl_new >ug_io.bbl2_new
43 sed s/'{ROM SAF}, R.,'/'{ROM SAF},'/g <ug_io.bbl2_new >ug_io.bbl
44
45 sed s/'{SAF}'/'{ROM SAF}'/g <ug_ropp_intro.bbl >ug_ropp_intro.bbl_new
46 sed s/'{ROM SAF}, G.,'/'{ROM SAF},'/g <ug_ropp_intro.bbl_new >ug_ropp_intro.bbl2_new
47 sed s/'{ROM SAF}, R.,'/'{ROM SAF},'/g <ug_ropp_intro.bbl2_new >ug_ropp_intro.bbl
48
49 latex romsaf_ropp_ug_io
50 latex romsaf_ropp_ug_io
51
52romsaf_ropp_ug_io.ps : romsaf_ropp_ug_io.dvi
53 dvips -ta4 -o romsaf_ropp_ug_io.ps romsaf_ropp_ug_io.dvi
54
55romsaf_ropp_ug_io.pdf : romsaf_ropp_ug_io.ps
56 ps2pdf romsaf_ropp_ug_io.ps
57 rm -f romsaf_ropp_ug_io.ps
58
59install : romsaf_ropp_ug_io.pdf
60 @$(MKDIR) $(INSTALLDIR)
61 @$(INSTALL) -m 644 romsaf_ropp_ug_io.pdf $(INSTALLDIR)
62
63clean :
64 rm -f *.out *.aux *.cp *.dvi *.fn *.ky *.log *.blg *.bbl *_new \
65 *.pg *.toc *.tp *.vr
66
67distclean : clean
68 rm -f *.dvi *.ps *.pdf
69