summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipsk/Makefile.in
blob: b69a193a9be440709d6d96f9330c63ded9a22743 (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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# Makefile for dvipsk -- kb@mail.tug.org. Public domain.
version = 5.96dev

# Add -DDEFRES=dpi to DEFS to change the default resolution from 600.
# Add -DSECURE if you will install dvips with special privileges.
# Add -DNO_DEBUG to omit debugging support.
# Add -DNO_EMTEX to omit EMTEX specials.
# Add -DNO_HPS to omit hypertex support.
# Add -DNO_TPIC to omit tpic support.
# 
# For VM/CMS or (perhaps) VMS or DOS compilation, need the corresponding
# subdirectory from the original dvips distribution.  (Maybe dvipsk
# won't work at all on such systems; if you have info one way or the
# other, please let kb@cs.umb.edu know.)

kpse_include ../make/paths.mk
kpse_include ../make/common.mk
kpse_include ../make/programs.mk
kpse_include ../make/cross.mk
kpse_include ../make/texi.mk
prog_cflags = -DUNIX -DKPATHSEA -DNeedFunctionPrototypes -DSHIFTLOWCHARS

# The `t[mp]-' business is so that we don't create an empty .pro file,
# if running squeeze fails for some reason.  A dependency on squeeze
# fails here, so we include it below.
.SUFFIXES: .pro .lpro
.lpro.pro:
	./squeeze <$< >t-$@
	mv t-$@ $@
prologues = tex.pro texps.pro texc.pro special.pro finclude.pro \
            color.pro crop.pro hps.pro

objects = dospecial.o dviinput.o emspecial.o fontdef.o loadfont.o       \
dvips.o tfmload.o download.o prescan.o scanpage.o skippage.o output.o   \
scalewidth.o dosection.o dopage.o resident.o search.o unpack.o drawPS.o \
header.o repack.o virtualfont.o dpicheck.o finclude.o writet1.o		\
pprescan.o papersiz.o color.o bbox.o hps.o t1part.o

program = dvips
programs = afm2tfm $(program)


default all: $(programs) $(prologues) dvips.info

$(program): $(kpathsea) $(objects)
	$(kpathsea_link) $(objects) $(LOADLIBES) 
afm2tfm: $(kpathsea) afm2tfm.o
	$(kpathsea_link) afm2tfm.o $(LOADLIBES) 
# Omit LOADLIBES since no need to dynamically link with kpathsea.
squeeze.o: squeeze.c
	$(build_compile) -c $<
squeeze: squeeze.o
	$(build_link_command) squeeze.o

@MAINT@$(srcdir)/writet1.c: $(srcdir)/../web2c/pdftexdir/writet1.c
@MAINT@	cp -f $(srcdir)/../web2c/pdftexdir/writet1.c $@

@MAINT@$(srcdir)/ptexmac.h: $(srcdir)/../web2c/pdftexdir/ptexmac.h
@MAINT@	cp -f $(srcdir)/../web2c/pdftexdir/ptexmac.h $@

$(prologues): squeeze
texc.lpro: texc.script tex.lpro
	$(SHELL) $(srcdir)/texc.script $(srcdir)/tex.lpro $@

kpse_include ../make/tkpathsea.mk

# The environment for running check.
# No need to specify TEXMF, as ../kpathsea/texmf.cnf should contain
# suitable absolute paths at this point.  Those are converted to
# SELFAUTO* paths on installation.
checkenv = TEXMFCNF=../kpathsea \
  TFMFONTS=$(srcdir)/testdata: VFFONTS=$(srcdir)/testdata: \
  TEXPSHEADERS=$(srcdir)/testdata: TEXCONFIG=$(srcdir)/testdata:

check: all
	rm -f mtest.ps
	-($(checkenv) ./dvips -D 300 $(srcdir)/testdata/dvipstst.xdv -o dvipstst.ps)
	mv dvipstst.ps mtest.ps
	-($(checkenv) ./dvips -D 300 $(srcdir)/testdata/dvipstst.xdv -o)
	-diff $(srcdir)/testdata/dvipstst.xps dvipstst.ps

install: install-exec install-data
	$(POST_INSTALL)
#	@echo "Create $(psheaderdir)/base/config.ps if necessary (see ./INSTALL)."
uninstall: uninstall-exec uninstall-data

install-exec: all
	$(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir)
	for p in $(programs); do $(INSTALL_LIBTOOL_PROG) $$p $(bindir); done
	rm -f $(bindir)/o$(program)
	ln -s $(program) $(bindir)/o$(program)
uninstall-exec:
	for p in $(programs); do rm -f $(bindir)/$$p; done
	rm -f $(bindir)/o$(program)

install-data: $(program).info
	$(SHELL) $(top_srcdir)/../mkinstalldirs $(man1dir) $(infodir) $(psheaderdir)/base
# PostScript prologues and encodings.
	for h in $(prologues); do $(INSTALL_DATA) $$h $(psheaderdir)/base/$$h; done
#	cd $(srcdir)/reencode && \
#	  for e in *.enc; do $(INSTALL_DATA) $$e $(psheaderdir)/base/$$e; done
# config.ps. Any one config.ps will be wrong for most people, so don't
# install anything by default.
#	if test ! -r $(psheaderdir)/base/config.ps				\
#	   || grep 'original config.ps --' $(psheaderdir)/base/config.ps	\
#	      >/dev/null; then	\
#          $(INSTALL_DATA) $(srcdir)/config.ps $(psheaderdir)/base/config.ps;	\
#        else true; fi
# psfonts.map.
#	if test ! -r $(psheaderdir)/base/psfonts.map 			\
#	   || grep 'original psfonts.map --' $(psheaderdir)/base/psfonts.map \
#	      >/dev/null; then	\
#	  $(INSTALL_DATA) $(srcdir)/psfonts.map $(psheaderdir)/base/psfonts.map; \
#        else true; fi
# Info files.
	cd $(srcdir) && for i in $(program).i*; do \
	  $(INSTALL_DATA) $$i $(infodir)/$$i; done
# Man pages.
	$(INSTALL_DATA) $(srcdir)/$(program).1 $(man1dir)/$(program).$(manext)
	rm -f $(man1dir)/o$(program).$(manext)
	ln -s $(program).$(manext) $(man1dir)/o$(program).$(manext)
	$(INSTALL_DATA) $(srcdir)/afm2tfm.1 $(man1dir)/afm2tfm.$(manext)
# TeX macros.
#	cd $(srcdir)/tex && for m in *.tex; do \
#	  $(INSTALL_DATA) $$m $(dvips_plain_macrodir)/$$m; done
	$(POST_INSTALL)
	if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
	  install-info --info-dir=$(infodir) $(infodir)/$(program).info; \
	else true; fi

uninstall-data:
	$(PRE_UNINSTALL)
	if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
	  install-info --delete --info-dir=$(infodir) $(infodir)/$(program).info; \
	else true; fi
	$(NORMAL_UNINSTALL)
	rm -f $(infodir)/dvips.i*
#	for h in $(prologues); do rm -f $(psheaderdir)/base/$$h; done
#	cd $(srcdir)/reencode && for e in *.enc; do rm -f $(psheaderdir)/base/$$e; \
#	  done
#	if grep 'original config.ps --' $(psheaderdir)/base/config.ps	\
#             >/dev/null 2>&1; then rm -f $(psheaderdir)/base/config.ps;	\
#        else true; fi
#	if grep 'original psfonts.map --' $(psheaderdir)/base/psfonts.map	\
#              >/dev/null 2>&1; then rm -f $(psheaderdir)/base/psfonts.map;	\
#        else true; fi
	rm -f $(man1dir)/dvips.$(manext) $(man1dir)/afm2tfm.$(manext)

distname = dvipsk
program_files = *.texi *.info* *.lpro psfonts.map *.1 texc.script \
  dvips.help $(program).aux $(program).cps dvipstst.dvi
version_files = dvips.h afm2tfm.c dvips.c

pre-dist-$(distname): INSTALL $(program).info $(program).dvi
post-dist-$(distname):
	ln -s `pwd`/contrib `pwd`/tex $(distdir)
	mkdir $(distdir)/reencode; ln -s $(fontname)/*.enc $(distdir)/reencode
	ln -s `pwd`/README.reencode $(distdir)/reencode/README
	rm -f $(distdir)/texc.lpro

kpse_include ../make/dist.mk
kpse_include ../make/config.mk

info: $(program).info
dvi: $(program).dvi

@MAINT@INSTALL: $(program).texi
@MAINT@	$(MAKEINFO) -D INSTALLONLY --no-headers --no-split --no-validate \
@MAINT@	  $(MAKEINFO_FLAGS) $< -o $@
@MAINT@	$(top_srcdir)/../add-info-toc $@
@MAINT@$(program).info: dvips.help
@MAINT@dvips.help: dvips.c
@MAINT@	./dvips --help >$@
@MAINT@doc: info INSTALL

kpse_include ../make/clean.mk

distclean::
	rm -f *.pro texc.lpro

clean::
	rm -f mtest.ps dvipstst.ps

kpse_include ../make/rdepend.mk
kpse_include depend.mk