QM/MM documentation in user guide
[namd.git] / ug / Makefile
1 #####
2 # define version
3 #####
4 NAMD_VERSION = 2.13
5
6 #####
7 # specific names of programs used in make commands
8 #####
9 CCPP            = CC
10 CC              = cc
11 CD              = cd
12 COPY            = cp
13 MOVE            = mv -f
14 DELETE          = rm -f
15 ECHO            = echo
16 TAR             = tar
17 COMPRESS        = compress
18 AR              = ar rsc
19 RANLIB          = /bin/true
20 COCMD           = co
21 SHELL           = /bin/sh
22
23
24 DOCDIR          = .
25 MAIN_UG_FILE    = $(DOCDIR)/ug
26
27 SRCFILES = ug.bib namd_begindoc.tex namd_copyright.tex namd_macros.tex \
28 namd_title.tex namd_version.tex ug.tex ug_accel.tex ug_avail.tex \
29 ug_dynamics.tex ug_forcefield.tex ug_performance.tex ug_userdef.tex \
30 ug_intro.tex ug_io.tex ug_macros.tex ug_runit.tex ug_sample.tex ug_start.tex \
31 ug_xplor.tex ug_fenergy.tex ug_psfgen.tex psfgen_macros.tex ug_alchemy.tex \
32 ug_colvars.bib ug_colvars_macros.tex \
33 ug_colvars.tex ug_analysis.tex ug_gbis.tex ug_constantph.tex ug_qmmm.tex
34
35 PDFFIGS = figures/fmaOn.pdf figures/pairlistdist.pdf \
36 figures/shifting.pdf figures/switching.pdf figures/dual_top.pdf
37
38 ### run pdflatex
39 pdf:    $(DOCDIR)/ug.pdf
40
41 ### run latex2html
42 html:   $(DOCDIR)/ug.tar.gz
43
44 $(DOCDIR)/ug.tar.gz: $(DOCDIR)/ug.pdf
45         latex2html -local_icons -split 5 -toc_depth 4 -toc_stars \
46         -t "NAMD $(NAMD_VERSION) User's Guide" -address "http://www.ks.uiuc.edu/Research/namd/" \
47         -up_url "../../" -up_title "Main NAMD Page" ug
48         chmod -R a+rX ug
49         tar czvf ug.tar.gz ug
50
51 $(DOCDIR)/ug.pdf: $(SRCFILES) $(PDFFIGS)
52         $(ECHO) "Creating NAMD $(NAMD_VERSION) User's Guide ..." ; \
53         $(CD) $(DOCDIR); \
54         pdflatex $(MAIN_UG_FILE); \
55         bibtex $(MAIN_UG_FILE); \
56         bibtex ug_alchemy; \
57         makeindex $(MAIN_UG_FILE).idx; \
58         pdflatex $(MAIN_UG_FILE); \
59         makeindex $(MAIN_UG_FILE).idx; \
60         pdflatex $(MAIN_UG_FILE); \
61
62 DISTILL = distill -compatlevel 2.1
63
64 # need to specify page size because distill can't figure it out (yet?)
65
66 #figures/fmaOn.pdf: figures/fmaOn.eps
67 #       $(DISTILL) -pagesize 301 174 pts < $^ > $@
68
69 #figures/pairlistdist.pdf: figures/pairlistdist.eps
70 #       $(DISTILL) -pagesize 240 240 pts < $^ > $@
71
72 #figures/shifting.pdf: figures/shifting.eps
73 #       $(DISTILL) -pagesize 301 165 pts < $^ > $@
74
75 #figures/switching.pdf: figures/switching.eps
76 #       $(DISTILL) -pagesize 310 165 pts < $^ > $@
77
78 #figures/dual_top.pdf: figures/dual_top.eps
79 #       $(DISTILL) -pagesize 584 220 pts < $^ > $@
80
81 $(DOCDIR)/ug.dvi: $(SRCFILES)
82         $(ECHO) "Creating NAMD $(NAMD_VERSION) User's Guide ..." ; \
83         $(CD) $(DOCDIR); \
84         latex $(MAIN_UG_FILE); \
85         bibtex $(MAIN_UG_FILE); \
86         makeindex $(MAIN_UG_FILE).idx; \
87         latex $(MAIN_UG_FILE); \
88         makeindex $(MAIN_UG_FILE).idx; \
89         latex $(MAIN_UG_FILE); \
90         # dvips -t letter -o ug.ps ug.dvi
91
92 namd_version.tex: Makefile
93         $(DELETE) namd_version.tex ; \
94         env echo '\newcommand{\NAMDVER}{$(NAMD_VERSION)}' > namd_version.tex
95
96 psfgen_macros.tex: ../psfgen/doc/ug_macros.tex
97         $(DELETE) psfgen_macros.tex ; \
98         grep PSFGEN ../psfgen/doc/ug_macros.tex > psfgen_macros.tex
99
100 ug_psfgen.tex: ../psfgen/doc/ug_psfgen.tex
101         $(DELETE) ug_psfgen.tex ; \
102         sed -e '20,$$ s/\\subsection{/\\subsubsection{/' \
103             -e '20,$$ s/\\section{/\\subsection{/' \
104             -e '20,$$ s/\\subsection\*{/\\subsubsection\*{/' \
105         ../psfgen/doc/ug_psfgen.tex > ug_psfgen.tex
106
107 clean:
108         $(DELETE) namd_version.tex ; \
109         $(DELETE) psfgen_macros.tex ; \
110         $(DELETE) ug_psfgen.tex ; \
111         $(DELETE) $(DOCDIR)/ug.ps ; \
112         $(DELETE) $(DOCDIR)/ug.aux ; \
113         $(DELETE) $(DOCDIR)/ug.bbl ; \
114         $(DELETE) $(DOCDIR)/ug.blg ; \
115         $(DELETE) $(DOCDIR)/ug.dvi ; \
116         $(DELETE) $(DOCDIR)/ug.lof ; \
117         $(DELETE) $(DOCDIR)/ug.log ; \
118         $(DELETE) $(DOCDIR)/ug.idx ; \
119         $(DELETE) $(DOCDIR)/ug.ilg ; \
120         $(DELETE) $(DOCDIR)/ug.ind ; \
121         $(DELETE) $(DOCDIR)/ug.toc ; \
122         $(DELETE) $(DOCDIR)/ug.pdf ; \
123         $(DELETE) $(DOCDIR)/ug.tar.gz; \
124 #       $(DELETE) $(PDFFIGS)