summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mpdir/am/mp.am
blob: 0b7d39ffe97562fdf66fb2c4737f426a0a049acb (plain)
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
## texk/web2c/mpdir/am/mp.am: Makefile fragment for MetaPost.

## MetaPost
##
if MP
bin_PROGRAMS += mpost
endif MP

mpost_CPPFLAGS = -I$(srcdir)/mpdir
mpost_LDADD = libmp.a $(LDADD)
mpost_c_h = mpini.c mp0.c mp1.c mp2.c mpcoerce.h mpd.h
nodist_mpost_SOURCES = $(mpost_c_h) mp-pool.c mpextra.c
$(mpost_c_h): mp-web2c
mp-web2c: mp.p $(web2c_texmf) mpdir/mp.defines web2c/cvtmf1.sed web2c/cvtmf2.sed
	$(web2c) mp
	echo timestamp >$@
	touch $(mpost_c_h)
EXTRA_DIST += mp.web mp.ch lib/texmfmp.c mpdir/mp.defines mpdir/mplib.h
mpextra.c: lib/texmfmp.c mpd.h
	sed s/TEX-OR-MF-OR-MP/mp/ $(srcdir)/lib/texmfmp.c >$@
mp.p mp.pool: mp-tangle
mp-tangle: tangle mp.web mp.ch
	$(tangle) mp mp
	echo timestamp >$@
	touch mp.p mp.pool
mp-pool.c: mp.pool $(makecpool) mpdir/mplib.h
	$(makecpool) mp.pool $(srcdir)/mpdir/mplib.h >$@ || rm -f $@
DISTCLEANFILES += $(nodist_mpost_SOURCES) mp-web2c \
	mp.p mp.pool mp-tangle

## libmp
##
EXTRA_LIBRARIES += libmp.a

libmp_a_CPPFLAGS = -I$(srcdir)/mpdir

libmp_a_SOURCES = \
	mpdir/avl.c \
	mpdir/avl.h \
	mpdir/avlstuff.c \
	mpdir/avlstuff.h \
	mpdir/mapfile.c \
	mpdir/mpmac.h \
	mpdir/turningnumber.c \
	mpdir/utils.c \
	mpdir/writeenc.c \
	mpdir/writefont.c \
	mpdir/writet1.c

## We must create mpd.h before compiling the libmp_a_SOURCES.
$(libmp_a_SOURCES): mpd.h

## Eventually delete these files
##
EXTRA_DIST += \
	metapost.mk \
	mpdir/Makefile.in.orig \
	mpdir/mpostlib.mk