File: Makefile

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (100 lines) | stat: -rw-r--r-- 2,885 bytes parent folder | download | duplicates (3)
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
91
92
93
94
95
96
97
98
99
100
VERSION := $(shell awk -F\' '/version_number/{print $$2}' ../../include/qe_version.h )
HELPDOC = ../../dev-tools/helpdoc -version $(VERSION)
LATEX   = pdflatex
LATEX2HTML = latex2html

HTMLS = INPUT_PP.html \
	INPUT_PROJWFC.html \
	INPUT_DOS.html \
	INPUT_BANDS.html \
        INPUT_pw2bgw.html \
        INPUT_bgw2pw.html \
	INPUT_molecularpdos.html \
	INPUT_IMPORTEXPORT_BINARY.html

PDFS = eps_man.pdf user_guide.pdf
AUXS = $(PDFS:.pdf=.aux)
LOGS = $(PDFS:.pdf=.log)
OUTS = $(PDFS:.pdf=.out)
TOCS = $(PDFS:.pdf=.toc)

XMLS = $(HTMLS:.html=.xml)
TXTS = $(HTMLS:.html=.txt)

doc: all
all: defs pdf html
pdf: $(PDFS)
html: user_guide

$(PDFS): %.pdf: %.tex
	$(LATEX)  $<
	$(LATEX)  $<

defs: input_xx.xsl $(HTMLS) link_on_main_doc

$(HTMLS): %.html: %.def input_xx.xsl
	$(HELPDOC) $<

$(TXTS): %.txt: %.def input_xx.xsl
	$(HELPDOC) $<

input_xx.xsl:
	@(if test ! -f input_xx.xsl; then \
	(if test -f ../../dev-tools/input_xx.xsl; then \
        (ln -sf ../../dev-tools/input_xx.xsl input_xx.xsl) ; \
        else \
        echo ; \
        echo "  Sorry, can not find input_xx.xsl html style file !!!" ; \
        echo ; exit 1 ; \
        fi) ; fi)

link_on_main_doc:
	-@( cd ../../Doc ; ln -fs ../PP/Doc/INPUT_PP.html . ; \
	ln -fs ../PP/Doc/INPUT_PP.xml . ; \
	ln -fs ../PP/Doc/INPUT_PP.txt . ; \
	ln -fs ../PP/Doc/INPUT_PROJWFC.html . ; \
	ln -fs ../PP/Doc/INPUT_PROJWFC.xml . ; \
	ln -fs ../PP/Doc/INPUT_PROJWFC.txt . ; \
	ln -fs ../PP/Doc/INPUT_DOS.html . ; \
	ln -fs ../PP/Doc/INPUT_DOS.xml . ; \
	ln -fs ../PP/Doc/INPUT_DOS.txt . ; \
	ln -fs ../PP/Doc/INPUT_BANDS.html . ; \
	ln -fs ../PP/Doc/INPUT_BANDS.xml . ; \
	ln -fs ../PP/Doc/INPUT_BANDS.txt . ; \
	ln -fs ../PP/Doc/INPUT_pw2gw.html . ;  \
	ln -fs ../PP/Doc/INPUT_pw2bgw.html . ; \
	ln -fs ../PP/Doc/INPUT_pw2bgw.xml . ; \
	ln -fs ../PP/Doc/INPUT_pw2bgw.txt . ; \
	ln -fs ../PP/Doc/INPUT_bgw2pw.html . ; \
	ln -fs ../PP/Doc/INPUT_bgw2pw.xml . ; \
	ln -fs ../PP/Doc/INPUT_bgw2pw.txt . ; \
	ln -fs ../PP/Doc/INPUT_molecularpdos.html . ; \
	ln -fs ../PP/Doc/INPUT_molecularpdos.xml . ; \
	ln -fs ../PP/Doc/INPUT_molecularpdos.txt .)

user_guide: user_guide.pdf
	- rm -rf user_guide/
	latex2html \
		-t "User's Guide for the PP package" \
                -html_version 3.2,math \
                -toc_depth 5 -split 5 -toc_stars -show_section_numbers \
                -local_icons -image_type png \
                user_guide.tex
	cd user_guide; \
	for file in *.html; do \
		cp $$file /tmp/$$file; \
		cat /tmp/$$file | sed 's/HREF="http/NAME="http/g' | sed 's/mathend000#//g' - > $$file; \
		rm -f /tmp/$$file; \
	done
	@echo ""
	@echo "***"
	@echo "*** User's Guide created in user_guide/user_guide.html"
	@echo "***"
	@echo ""

clean:
	- rm -f $(PDFS) $(AUXS) $(LOGS) $(OUTS) $(TOCS)
	- rm -f $(HTMLS) $(TXTS) $(XMLS) input_xx.xsl *~
	- rm -rf ../../Doc/$(HTMLS)
	- rm -rf ../../Doc/$(XMLS)
	- rm -rf ../../Doc/$(TXTS)