File: Makefile

package info (click to toggle)
med-doc 0.6
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 4,140 kB
  • ctags: 180
  • sloc: sh: 142; makefile: 53
file content (29 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# Makefile for formating the Debian-Med FAQ

### HELP: I used a really dirty trick to get a real '&' into an url.
###       See below for the line
###             sed "s/\(?keywords=med-\)&\(subword=1\)/\1\&\2/"
###       Anybody knows how to do this right in SGML??

faq=debian-med-faq

all: html

html: $(faq).sgml
	linuxdoc --backend=html $(faq).sgml
#	ln -s $(faq).html index.html
	## I like output with the same timestamp as the source
	for html in `ls d*.html` ; do \
	   tmp=$${html}.$$ ; \
	   mv $${html} $${tmp} ; \
	   cat $${tmp} | \
	      sed "s?<TITLE>.*</TITLE>?&<link rel=\"stylesheet\" type=\"text/css\" href=\"med-doc.css\">?" | \
	      sed "s/\(?keywords=med-\)&amp;\(subword=1\)/\1\&\2/" | \
	   cat > $${html} ; \
	   rm -f $${tmp} ; \
	   touch -r $(faq).sgml $${html} ; \
	done

clean:
	rm -f $(faq)*.html