Makefile: standalone setup
[neatroff_make.git] / Makefile
blob406f24a52c0a84686d3edc2760605c9816600365
1 # Neatroff top-level Makefile
3 # Installation prefix
4 PREFIX = $(PWD)
5 # Input fonts directory; containing ghostscript-fonts and other fonts
6 FONTS = $(PREFIX)/fonts
8 # Output device directory
9 FDIR = $(PREFIX)/
10 # Macro directory
11 MDIR = $(PREFIX)/tmac
13 # HTTP retrieval program
14 HGET = wget -c -nv
15 # ghostscript-fonts URL
16 GSFURL = "http://pkgs.fedoraproject.org/repo/pkgs/ghostscript-fonts/ghostscript-fonts-std-8.11.tar.gz/6865682b095f8c4500c54b285ff05ef6/ghostscript-fonts-std-8.11.tar.gz"
18 all: help
20 help:
21 @echo "Neatroff top-level makefile"
22 @echo
23 @echo " init Initialise git repositories and fonts"
24 @echo " neat Compile the programs and generate the fonts"
25 @echo " pull Update git repositories (git pull)"
26 @echo " clean Remove the generated files"
27 @echo
29 init:
30 @test -d neatroff || git clone git://repo.or.cz/neatroff.git
31 @test -d neatpost || git clone git://repo.or.cz/neatpost.git
32 @test -d neatmkfn || git clone git://repo.or.cz/neatmkfn.git
33 @test -d neateqn || git clone git://repo.or.cz/neateqn.git
34 @test -d neatrefer || git clone git://repo.or.cz/neatrefer.git
35 @test -d troff || git clone git://repo.or.cz/troff.git
36 @echo "Retrieving $(GSFURL)"
37 @mkdir -p $(FONTS) && cd $(FONTS) && $(HGET) $(GSFURL)
38 @cd $(FONTS) && tar xzf ghostscript-fonts-std-8.11.tar.gz && mv fonts/* . && rmdir fonts/
40 pull:
41 cd neatroff && git pull
42 cd neatpost && git pull
43 cd neatmkfn && git pull
44 cd neateqn && git pull
45 cd neatrefer && git pull
46 cd troff && git pull
47 git pull
49 neat:
50 @cd neatroff && $(MAKE) FDIR="$(FDIR)" MDIR="$(MDIR)"
51 @cd neatpost && $(MAKE) FDIR="$(FDIR)" MDIR="$(MDIR)"
52 @cd neateqn && $(MAKE)
53 @cd neatmkfn && $(MAKE)
54 @cd neatrefer && $(MAKE)
55 @cd troff/pic && $(MAKE)
56 @cd troff/tbl && $(MAKE)
57 @cd neatmkfn && ./gen.sh $(FONTS) $(FDIR)/devutf >/dev/null
59 clean:
60 cd neatroff && $(MAKE) clean
61 cd neatpost && $(MAKE) clean
62 cd neateqn && $(MAKE) clean
63 cd neatmkfn && $(MAKE) clean
64 cd neatrefer && $(MAKE) clean
65 cd troff/tbl && $(MAKE) clean
66 cd troff/pic && $(MAKE) clean
67 @rm -r $(FDIR)/devutf