use scp for distribution.
[mftrace.git] / GNUmakefile.in
blobbdfcd250c6fe39169fdb20141e1253b53861aa06
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@
29 all: compile
31 compile: mftrace gf2pbm
33 README.txt: README.texi
34 sed 's/@MFTVERSION@/$(VERSION)/g' < $< > $<.in
35 makeinfo --no-split --no-headers --output $@ $<.in
37 README.html: README.texi
38 sed 's/@MFTVERSION@/$(VERSION)/g' < $< > $<.in
39 makeinfo --html --no-split --no-headers --output $@ $<.in
41 dist: $(FILES)
42 mkdir $(distdir)
43 ln $(FILES) $(distdir)
44 tar --owner=0 --group=0 -zcf $(distdir).tar.gz $(distdir)
45 rm -rf $(distdir)
47 mftrace.spec: mftrace.spec.in configure
48 ./config.status
50 mftrace: mftrace.py configure
51 ./config.status
53 configure: configure.in
54 autoconf
55 ./configure
57 GNUmakefile: GNUmakefile.in configure
58 ./config.status
59 chmod a-w GNUmakefile
61 %.pyc: %.py
62 $(PYTHON) -c 'import py_compile; py_compile.compile ("$<", cfile="$@")'
64 install: mftrace gf2pbm $(PYC_MODULES) install-man install-py
65 install -d $(DESTDIR)$(bindir)
66 install mftrace $(DESTDIR)$(bindir)
67 install gf2pbm$(EXEEXT) $(DESTDIR)$(bindir)/gf2pbm$(EXEEXT)
70 install-py: $(PY_MODULES) $(PYC_MODULES)
71 install -d $(DESTDIR)$(datadir)
72 install -m644 $^ $(DESTDIR)$(datadir)
74 install-man: $(MANPAGES)
75 install -d $(DESTDIR)$(mandir)/man1
76 install -m644 $^ $(DESTDIR)$(mandir)/man1/
78 uninstall:
79 rm $(DESTDIR)$(bindir)/mftrace $(DESTDIR)$(bindir)/gf2pbm$(EXEEXT)
80 cd $(DESTDIR)$(datadir) && rm $(PY_MODULES)
81 cd $(DESTDIR)$(mandir)/man1 && rm $(MANPAGES)
82 -rmdir $(DESTDIR)$(bindir)
83 -rmdir $(DESTDIR)$(datadir)
84 -rmdir $(DESTDIR)$(mandir)/man1
85 -rmdir $(DESTDIR)$(mandir)/
86 -rmdir $(DESTDIR)$(prefix)
87 -rmdir $(DESTDIR)$(exec_prefix)
89 clean:
90 rm -f config.cache config.h config.log config.status GNUmakefile
91 rm -f mftrace gf2pbm $(PYC_MODULES)
92 rm -f *'~' '#'*
95 TEST_FONTS= ecbi0900 logo10
96 test:
97 $(foreach a, $(TEST_FONTS), $(PYTHON) mftrace.py --glyphs 65 -V $(a) &&)true
100 WWW_DIR=hanwen@lilypond.org:www/mftrace/
102 udist: README.html
103 autoconf
104 ./configure --prefix=$(HOME)/usr/pkg/mftrace
105 make dist
106 scp $(distdir).tar.gz $(WWW_DIR)
107 scp $< $(WWW_DIR)/index.html
109 rpm: dist
110 rpmbuild -tb mftrace-$(VERSION).tar.gz