README: mention the macros in makefile
[neatroff_make.git] / makefile
blobb70ad553b9f95790490c36fa8e559fa1922c4161
1 # Neatroff top-level makefile
3 # Installation prefix
4 PREFIX = /opt
5 # Input fonts directory; containing ghostscript-fonts and other fonts
6 GSFONTS = /usr/share/ghostscript/fonts
8 # Output device directory
9 FDIR = $(PREFIX)/share/neatroff/font
10 # Macro directory
11 MDIR = $(PREFIX)/share/neatroff/tmac
12 # Directory to install the executables
13 BDIR = $(PREFIX)/bin
15 INSTALL = install
17 all: init
18 @cd neatroff && $(MAKE) FDIR="$(FDIR)" MDIR="$(MDIR)"
19 @cd neatpost && $(MAKE) FDIR="$(FDIR)" MDIR="$(MDIR)"
20 @cd neateqn && $(MAKE)
21 @cd neatmkfn && $(MAKE)
22 @cd neatrefer && $(MAKE)
23 @cd troff/pic && $(MAKE)
24 @cd troff/tbl && $(MAKE)
25 @test -d devutf || (cd neatmkfn && ./gen.sh $(GSFONTS) ../devutf)
27 init:
28 @test -d neatroff || git clone git://repo.or.cz/neatroff.git
29 @test -d neatpost || git clone git://repo.or.cz/neatpost.git
30 @test -d neatmkfn || git clone git://repo.or.cz/neatmkfn.git
31 @test -d neateqn || git clone git://repo.or.cz/neateqn.git
32 @test -d neatrefer || git clone git://repo.or.cz/neatrefer.git
33 @test -d troff || git clone git://repo.or.cz/troff.git
35 pull: init
36 cd neatroff && git pull
37 cd neatpost && git pull
38 cd neatmkfn && git pull
39 cd neateqn && git pull
40 cd neatrefer && git pull
41 cd troff && git pull
43 install: all
44 mkdir -p $(BDIR)
45 $(INSTALL) neatroff/roff $(BDIR)/neatroff
46 $(INSTALL) neatpost/post $(BDIR)/neatpost
47 $(INSTALL) neateqn/eqn $(BDIR)/neateqn
48 $(INSTALL) neatmkfn/mkfn $(BDIR)/neatmkfn
49 $(INSTALL) neatrefer/refer $(BDIR)/neatrefer
50 $(INSTALL) troff/tbl/tbl $(BDIR)/tbl9
51 $(INSTALL) troff/pic/pic $(BDIR)/pic9
53 mkdir -p -m 755 $(MDIR)
54 cp -r tmac/* $(MDIR)/
55 chmod 755 $(MDIR)/*/
56 chmod 644 $(MDIR)/*.* $(MDIR)/*/*
58 mkdir -p -m 755 $(FDIR)/devutf
59 cp -r devutf/* $(FDIR)/devutf/
60 chmod 644 $(FDIR)/devutf/*
62 help:
63 @echo "Neatroff top-level makefile"
64 @echo
65 @echo " all Compile the programs"
66 @echo " install Install the executables and data"
67 @echo " clean Remove generated files"
68 @echo
69 @echo " init Initialise git repositories (git clone)"
70 @echo " pull Update git repositories (git pull)"
72 clean:
73 cd neatroff && $(MAKE) clean
74 cd neatpost && $(MAKE) clean
75 cd neateqn && $(MAKE) clean
76 cd neatmkfn && $(MAKE) clean
77 cd neatrefer && $(MAKE) clean
78 cd troff/tbl && $(MAKE) clean
79 cd troff/pic && $(MAKE) clean
80 rm -rf devutf/