File: Makefile

package info (click to toggle)
pike7 7.0.361-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,876 kB
  • ctags: 12,334
  • sloc: ansic: 142,667; makefile: 1,526; sh: 1,035; lisp: 290; sed: 34; perl: 3
file content (147 lines) | stat: -rw-r--r-- 4,421 bytes parent folder | download
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147

all:
	@if `pwd`/../bin/pike -e 'return 0;' 2>/dev/null; then \
	  $(MAKE) pike=`pwd`/../bin/pike low_all; \
	else \
	  $(MAKE) low_all; \
	fi

low_all: tutorial.html tutorial_onepage.html tutorial_split.html \
	 tutorial.ps.gz tutorial.pdf

MADEFILES=Image.wmml Math.wmml Mysql.wmml Parser.wmml Calendar.wmml \
	  Protocols.wmml Gettext.wmml

SRCFILES=tutorial.wmml $(MADEFILES)

pike=pike
DESTINATION=/usr/local/share/pike/tutorial/

.DUMMY: 

# ----------------------------------------------------------------------

PROTOCOLS_MKWMML_DIRS=HTTP LysKOM IRC DNS

MKWMML=$(pike) ../bin/mkwmml.pike

Calendar.wmml :
	$(MKWMML) `/bin/ls -1 ../lib/modules/Calendar.pmod/*.p* | egrep -v '~$$'` >Calendar.wmml

Image.wmml : 
	(cd ../src/modules/Image; make wmml pike="$(pike)")

Math.wmml : 
	$(MKWMML) ../src/modules/Math/*.c >Math.wmml

Mysql.wmml :  ../src/modules/Mysql/mysql.c
	$(MKWMML) ../src/modules/Mysql/mysql.c >Mysql.wmml

Gettext.wmml: ../src/modules/Gettext/gettext.c
	$(MKWMML) ../src/modules/Gettext/gettext.c >Gettext.wmml

Parser.wmml : ../src/modules/Parser/html.c
	$(MKWMML) ../src/modules/Parser/*.pmod.in ../src/modules/Parser/*.c  >Parser.wmml

Protocols.wmml :
	for a in $(PROTOCOLS_MKWMML_DIRS) ; do \
		if test -d ../lib/modules/Protocols.pmod/$$a.pmod; then \
			$(MKWMML) `/bin/ls -1 ../lib/modules/Protocols.pmod/$$a.pmod/*.p* | egrep -v '~$$'`; \
		else \
			$(MKWMML) ../lib/modules/Protocols.pmod/$$a.pmod; \
		fi		\
	done > Protocols.wmml

Modules.wmml: 
	$(MKWMML) `find ../lib/modules -type f -print ` >Modules.wmml


# ----------------------------------------------------------------------

srcfiles: $(SRCFILES) 

tutorial.html: .DUMMY $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml html tutorial

tutorial_onepage.html: .DUMMY  $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml html_onepage tutorial_onepage

tutorial_split.html: .DUMMY  $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml html_section_pages tutorial_split

tutorial.tex: .DUMMY $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml latex tutorial

tutorial.xml: .DUMMY $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml xml tutorial

palmdoc: tutorial.xml
	$(pike) ./xml2prc.pike tutorial.xml

# latex has to be run twice to work with labels and stuff
# but there are no labels yet...
tutorial.dvi: tutorial.tex
	-rm tutorial.aux tutorial.toc
	latex tutorial.tex
	latex tutorial.tex

tutorial.pdf: tutorial.pdftex
	-rm tutorial.aux tutorial.toc
	TEXPSHEADERS=fonts: TEXINPUTS=fonts: TTFONTS=fonts: TFMFONTS=fonts: pdflatex tutorial.pdftex
	TEXPSHEADERS=fonts: TEXINPUTS=fonts: TTFONTS=fonts: TFMFONTS=fonts: pdflatex tutorial.pdftex

tutorial.ps: tutorial.dvi
	dvips -a -Z tutorial.dvi -o tutorial.ps

tutorial.ps.gz: tutorial.ps
	gzip -9 <tutorial.ps >tutorial.ps.gz

tutorial.ps.bz2: tutorial.ps
	bzip2 -9 <tutorial.ps >tutorial.ps.bz2

tutorial.pdftex: .DUMMY $(SRCFILES)
	if [ -d fonts ]; then ( cd fonts ; make pike="$(pike)" ) ; fi
	$(pike) ./wmmltohtml2 tutorial.wmml pdflatex tutorial


tut.html: .DUMMY $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml sitebuilder tut

wmml.html: .DUMMY wmml.wmml
	$(pike) ./wmmltohtml2 wmml.wmml html_onepage wmml

manpages: .DUMMY $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml manpages man/man

mirar_tutorial: .DUMMY $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml mirar_html tutorial

js_tutorial: .DUMMY $(SRCFILES)
	$(pike) ./wmmltohtml2 tutorial.wmml js_html tutorial

the_image_module.html: Image.wmml the_image_module.wmml
	$(pike) ./wmmltohtml2 the_image_module.wmml mirar_html the_image_module

clean:
	-rm -f *.html *.md $(MADEFILES) 
	-rm -f tutorial.dvi tutorial.tex tutorial.aux
	-rm -f tutorial.log tutorial.toc
	-rm -f latex.wcache pdflatex.wcache illustration_cache image_cache gfx/* execute_cache
	if [ -d fonts ]; then ( cd fonts ; make clean ); fi

rebuild:
	-rm -f $(MADEFILES)
	$(MAKE) pike="$(pike)" all

install:
	cp `cat tutorial.files` $(DESTINATION)

export:
	tar czvTf tutorial.files tutorial.tar.gz 
	tar czvTf tutorial_onepage.files tutorial_onepage.tar.gz 

mirar_www_tutorial: mirar_tutorial
	rm /home/mirar/www/pike_tutorial/tutorial* /home/mirar/www/pike_tutorial/gfx/*
	ln -f `cat tutorial.files | grep -v ^gfx/` /home/mirar/www/pike_tutorial
	ln -f `cat tutorial.files | grep ^gfx/` /home/mirar/www/pike_tutorial/gfx
	(cd /home/mirar/www/pike_tutorial; rm tutorial.tar.gz; tar cvzf tutorial.tar.gz `cat /home/mirar/pike7/tutorial/tutorial.files`)