root / Makefile

1 c263c4f3 John
 # Copyright (c) 2004-2008 John Goerzen
2 c263c4f3 John
 #
3 c263c4f3 John
4 c263c4f3 John
 all: setup			# GHC build
5 c263c4f3 John
 	./setup configure
6 c263c4f3 John
 	./setup build
7 c263c4f3 John
8 c263c4f3 John
 hugsbuild: setup
9 c263c4f3 John
 	./setup configure --hugs
10 c263c4f3 John
 	./setup build
11 c263c4f3 John
12 c263c4f3 John
 setup: Setup.lhs datapacker.cabal
13 c263c4f3 John
 	ghc -package Cabal Setup.lhs -o setup
14 c263c4f3 John
15 59f52fe3 John
 doc: man html pdf txt
16 59f52fe3 John
17 59f52fe3 John
 .PHONY: man
18 59f52fe3 John
 man: datapacker.1
19 59f52fe3 John
20 59f52fe3 John
 .PHONY: html
21 59f52fe3 John
 html: datapacker.html
22 59f52fe3 John
23 59f52fe3 John
 .PHONY: pdf
24 59f52fe3 John
 pdf: datapacker.pdf
25 59f52fe3 John
26 59f52fe3 John
 .PHONY: txt
27 59f52fe3 John
 txt: datapacker.txt
28 59f52fe3 John
29 59f52fe3 John
 datapacker.html: datapacker.sgml
30 59f52fe3 John
 	docbook2html -u datapacker.sgml
31 59f52fe3 John
32 59f52fe3 John
 datapacker.ps: datapacker.1
33 59f52fe3 John
 	man -t -l datapacker.1 > datapacker.ps
34 59f52fe3 John
35 59f52fe3 John
 datapacker.pdf: datapacker.ps
36 59f52fe3 John
 	ps2pdf14 datapacker.ps
37 59f52fe3 John
38 59f52fe3 John
 datapacker.txt: datapacker.1
39 59f52fe3 John
 	groff -Tascii -man datapacker.1 | sed $$'s/.\b//g' > datapacker.txt
40 59f52fe3 John
41 59f52fe3 John
 datapacker.1: datapacker.sgml
42 59f52fe3 John
 	docbook2man datapacker.sgml
43 59f52fe3 John
 	docbook2man datapacker.sgml
44 59f52fe3 John
45 c263c4f3 John
 clean: clean-code clean-doc
46 c263c4f3 John
47 c263c4f3 John
 clean-code:
48 c263c4f3 John
 	-./setup clean
49 c263c4f3 John
 	-cd libsrc && ../setup clean
50 c263c4f3 John
 	-rm -rf dist libsrc/dist *.ho *.hi *.o *.a setup *~
51 c263c4f3 John
 	-rm -f `find . -name "*~"` `find . -name "*.o"`
52 c263c4f3 John
 	-rm -f `find . -name "*.cm*"`
53 c263c4f3 John
54 c263c4f3 John
 clean-doc:
55 59f52fe3 John
 	-rm -f *.1 *.ps *.pdf *.txt *.links *.refs *.html