-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
91 lines (73 loc) · 2.38 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# For Linux (expects "make DESTDIR=xxx PREFIX=yyy install"):
DESTDIR = /usr
PREFIX = .
DEST = ${DESTDIR}/${PREFIX}/bin
MANDIR = $(DESTDIR)/$(PREFIX)/share/man/man1
DOCDIR = $(DESTDIR)/$(PREFIX)/share/doc/dpic
#-----------------------------------------------------------------------
DEFS= @defrand@ @defno_snprintf@ @safe_mode@ @no_intt@
# To force -DNO_SNPRINT
#DEFS= @defrand@ -DNO_SNPRINTF @safe_mode@ @no_intt@
CC=@CC@
PC=@PC@
CFLAGS += $(DEFS) -O
OBJECTS = dpic.o p2clib.o
#DATE = `date +%Y.%m.%d`
DATE=@VERSION@
#-----------------------------------------------------------------------
SOURCES = \
src/dp0.x src/dpic.x src/dpic1.x src/mfp.x \
src/mpo.x src/pdf.x src/pgf.x src/ps.x src/pst.x src/svg.x \
src/sysdep.x src/tex.x src/xfig.x \
src/dpic.bnf
dpic: dpic.c $(OBJECTS)
$(CC) -o dpic $(OBJECTS) -lm @iberty@
install: installdpic installdocs
installdpic: dpic
mkdir -p $(DEST)
if test -x dpic.exe ; then \
strip dpic.exe; install dpic.exe $(DEST) ; \
else \
strip dpic; install -m 755 dpic $(DEST) ; \
fi
#SPECMANDIR = $(DESTDIR)/usr/share/man/man1
installdocs: dpic-doc.pdf
mkdir -p $(DOCDIR)
mkdir -p $(MANDIR)
# mkdir -p $(SPECMANDIR)
install -m 644 dpic-doc.pdf $(DOCDIR)
install -m 644 doc/dpictools.pic $(DOCDIR)
# install -m 644 doc/dpic.1 $(SPECMANDIR)
cat doc/dpic.1 | gzip > $(MANDIR)/dpic.1.gz
#Ubuntu files:
#/usr/bin/dpic
#/usr/share/doc/dpic/CHANGES.gz
#/usr/share/doc/dpic/README.gz
#/usr/share/doc/dpic/changelog.Debian.gz
#/usr/share/doc/dpic/copyright
#/usr/share/man/man1/dpic.1.gz
uninstall:
rm -f $(DEST)/dpic* $(MANDIR)/dpic.1.gz
if test `basename $(DOCDIR)` = dpic ; then \
rm -r $(DOCDIR) ; \
else rm -f $(DOCDIR)/dpic-doc.pdf ; \
fi
dpic-doc.pdf:
(cd doc; make ; mv dpic-doc.pdf .. )
# The following is only executed if src files are changed.
LEXCINCLUDES = entryhp.h lxhp.h lxnp.h lxtv.h entrytv.h lxch.h
CMPR = awk '{b=b$$0; if(length(b) > 75){print b; b=""}}; END{print b}'
dpic.c: $(SOURCES)
(cd src; make DEBUG="$(DEBUG)" DATE=$(DATE) CC=$(CC) )
cp src/dpic.c src/parstab.i .
for name in $(LEXCINCLUDES) ; do \
$(CMPR) src/$$name > $$name ; done;
chmod 644 *.c *.i *.h
if test -n "$(DEBUG)" ; \
then $(CC) -c src/sysdep.c; fi
# Delete compiled files
clean:
-rm -f *.o dpic dpic.exe *.LOG config.log config.status
(cd src; make clean )
(cd doc; make clean )
distclean: clean