remove safeguard.
[mftrace.git] / GNUmakefile.in
blob4009b8481c999374e03e6fe83726422d0f50a7ac
1 # -*-makefile-*-
3 PY_MODULES= afm.py tfm.py
4 PYC_MODULES = $(PY_MODULES:%=%c)
5 FILES= mftrace.py GNUmakefile.in \
6 gf2pbm.c mftrace.1 \
7 COPYING \
8 README.texi README.txt ChangeLog \
9 mftrace.spec.in mftrace.spec \
10 $(PY_MODULES) configure configure.in config.h.in
11 CFLAGS = -Wall -O2
13 ## retain during override.
14 CFLAGS += -I.
15 srcdir=@srcdir@
16 VPATH=$(srcdir)
17 NAME=mftrace
18 MANPAGES=mftrace.1
19 VERSION=@VERSION@
20 distdir=$(NAME)-$(VERSION)
21 prefix=@prefix@
22 datadir=@datadir@/mftrace/
23 exec_prefix=@exec_prefix@
24 bindir=@bindir@
25 mandir=@mandir@
26 PYTHON=@PYTHON@
27 EXEEXT=@EXEEXT@
30 ## up/download.
31 WWW_DIR=hanwen@lilypond.org:www/download/sources/mftrace/
35 all: compile
37 compile: mftrace gf2pbm
39 version.texi: GNUmakefile
40 echo -e '@macro mftversion\n$(VERSION)\n@end macro\n' > $@
42 README.txt: README.texi version.texi
43 makeinfo --no-split --no-headers --output $@ $<
45 README.html: README.texi version.texi
46 makeinfo --html --no-split --no-headers --output $@ $<
48 dist: $(FILES)
49 mkdir $(distdir)
50 ln $(FILES) $(distdir)
51 tar --owner=0 --group=0 -zcf $(distdir).tar.gz $(distdir)
52 rm -rf $(distdir)
54 mftrace.spec: mftrace.spec.in configure
55 ./config.status
57 mftrace: mftrace.py configure
58 ./config.status
60 configure: configure.in
61 autoconf
62 ./configure
64 GNUmakefile: GNUmakefile.in configure
65 ./config.status
66 chmod a-w GNUmakefile
68 %.pyc: %.py
69 $(PYTHON) -c 'import py_compile; py_compile.compile ("$<", cfile="$@")'
71 install: mftrace gf2pbm $(PYC_MODULES) install-man install-py
72 install -d $(DESTDIR)$(bindir)
73 install mftrace $(DESTDIR)$(bindir)
74 install gf2pbm$(EXEEXT) $(DESTDIR)$(bindir)/gf2pbm$(EXEEXT)
77 install-py: $(PY_MODULES) $(PYC_MODULES)
78 install -d $(DESTDIR)$(datadir)
79 install -m644 $^ $(DESTDIR)$(datadir)
81 install-man: $(MANPAGES)
82 install -d $(DESTDIR)$(mandir)/man1
83 install -m644 $^ $(DESTDIR)$(mandir)/man1/
85 uninstall:
86 rm $(DESTDIR)$(bindir)/mftrace $(DESTDIR)$(bindir)/gf2pbm$(EXEEXT)
87 cd $(DESTDIR)$(datadir) && rm $(PY_MODULES)
88 cd $(DESTDIR)$(mandir)/man1 && rm $(MANPAGES)
89 -rmdir $(DESTDIR)$(bindir)
90 -rmdir $(DESTDIR)$(datadir)
91 -rmdir $(DESTDIR)$(mandir)/man1
92 -rmdir $(DESTDIR)$(mandir)/
93 -rmdir $(DESTDIR)$(prefix)
94 -rmdir $(DESTDIR)$(exec_prefix)
96 clean:
97 rm -f config.cache config.h config.log config.status GNUmakefile
98 rm -f mftrace gf2pbm $(PYC_MODULES)
99 rm -f *'~' '#'*
102 TEST_FONTS= ecbi0900 logo10
103 test:
104 $(foreach a, $(TEST_FONTS), $(PYTHON) mftrace.py --glyphs 65 -V $(a) &&)true
107 udist: README.html
108 autoconf
109 ./configure --prefix=$(HOME)/usr/pkg/mftrace
110 make dist
111 @$(if $(shell git diff), echo "commit before disting" && false,true)
112 if test -d .git ; then \
113 git tag -m '' release/$(VERSION) ; \
115 false
116 scp $(distdir).tar.gz $(WWW_DIR)
117 scp $< $(WWW_DIR)/index.html
119 rpm: dist
120 rpmbuild -tb mftrace-$(VERSION).tar.gz