source: trunk/third/transcript/Makefile.in @ 10145

Revision 10145, 6.2 KB checked in by ghudson, 27 years ago (diff)
Revert most of rev. 1.3. We really need to install bogusmsg.ps from lpr's transcript, not ours. Keep the spelling correction.
Line 
1# $Header: /afs/dev.mit.edu/source/repository/third/transcript/Makefile.in,v 1.4 1997-06-08 20:18:45 ghudson Exp $
2#
3# This is the global Makefile template for TranScript on Athena.
4# It does, roughly, the same things as the original build scripts, but
5# in a slightly more structured fashion.
6#
7# PostScript is a registered trademark of Adobe Systems Incorporated
8# TranScript is a registered trademark of Adobe Systems Incorporated
9
10ENVCC=@CC@
11ENVCFLAGS=@CFLAGS@ @CPPFLAGS@ -DBINDIR='\"${bindir}\"'\
12        -DDATADIR='\"${datadir}\"'
13LDFLAGS=@LDFLAGS@ @LIBS@
14
15# SYSV make is a censored piece of censored...
16SHELL = /bin/sh
17VPATH = @srcdir@
18
19srcdir=@srcdir@
20top_srcdir=@top_srcdir@
21prefix=@prefix@
22exec_prefix=@exec_prefix@
23bindir=@bindir@
24mandir=@mandir@
25datadir=@datadir@
26PSLIBDIR=${datadir}/ps
27TROFFDIR=${PSLIBDIR}/troff.font
28DITDIR=${PSLIBDIR}/ditroff.font
29PPDDIR=${PSLIBDIR}/ppd
30AFMDIR=${PSLIBDIR}/afm
31PSTEMPDIR=/var/tmp
32
33# default PostScript Printer Description
34
35DEFAULTPPD=hp3si523
36
37# configuration options that are unlikely to ever change
38REVERSE=
39BANNERFIRST=1
40BANNERLAST=0
41VERBOSELOG=1
42
43# programs
44SED=sed
45PERL=perl
46RM=rm -f
47LN=ln -s
48INSTALL=@INSTALL@
49INSTALL_EXEC=$(INSTALL) -m 755
50INSTALL_DATA=$(INSTALL) -m 644
51
52# manpages to install.
53MAN1=transcript.1 enscript.1 ps4014.1 ps630.1 pscat.1 psdit.1 psdraft.1 \
54        psfax.1 psfonts.1 pslpr.1 psnup.1 psplot.1 psrev.1 psroff.1 \
55        pssymbols.1
56# no:   ppanel.1 ptroff.1
57MAN7=afm.7 postscript.7
58MAN8=pscatmap.8 psdman.8 psint.8
59# no:   pscomm.8 psinterface.8 ascomm.8 capcomm.8 fpcomm.8 lpcomm.8 qmscomm.8
60
61# lib/ files to install
62# NOTE: bogusmsg.ps and banner.pro (from Transcript2.1) are built and installed
63#       from /source/athena/ucb/lpr/transcript-v2.1, so we don't do them here.
64LIBFILES=enscript.pro ps4014.pro ps630.pro pscat.pro psdit.pro psdraft.pro \
65        psnup.pro psplot.pro pstext.pro ehandler.ps Notice
66LIBEXECS=psint.sh psbad.sh
67
68# NOTE: currently, we're building DITROFF fonts, but not old TROFF fonts.
69#       It's unclear TROFF fonts are useful.
70#       If you have good reason to think we do need them, uncomment this:
71#CLEANTROFF=cleantroff
72#BUILDTROFF=buildtroff
73#INSTLTROFF=instltroff
74
75.PHONY: all build buildprogs buildmisc buildtroff builddit install instlprogs \
76   instlmisc instltroff instldit clean cleanprogs cleanmisc cleantroff cleandit
77all: build
78clean:   cleanprogs cleanmisc $(CLEANTROFF) cleandit cleanman
79build:   buildprogs buildmisc $(BUILDTROFF) builddit buildman
80install: instlprogs instlmisc $(INSTLTROFF) instldit instlman
81
82### The targets are primarily named after the analogous build scripts.
83
84sh/psroff: sh/psroff.bsd Makefile
85        $(RM) sh/psroff
86        echo "Guessing if troff will complain when given -t option."
87        -troff -Tpsc -t /dev/null > /dev/null 2>/tmp/troff-errs
88        case "`cat /tmp/troff-errs`" in                                 \
89            *" -t"|*" -t "*)                                            \
90                $(SED) -e s,DITDIR,${DITDIR},g -e s,DITFLAGS,,g         \
91                        sh/psroff.bsd > sh/psroff ;;                    \
92            *)                                                          \
93                $(SED) -e s,DITDIR,${DITDIR},g -e s,DITFLAGS,-t,g       \
94                        sh/psroff.bsd > sh/psroff ;;                    \
95        esac
96
97buildprogs: sh/psroff
98        cd src; ${MAKE} ${MFLAGS} CC="${ENVCC}" CFLAGS="${ENVCFLAGS}" \
99                        LDFLAGS="${LDFLAGS}" programs
100
101instlprogs:
102        $(top_srcdir)/mkinstalldirs ${DESTDIR}${bindir}
103        $(top_srcdir)/mkinstalldirs ${DESTDIR}${PSLIBDIR}
104        cd src; ${MAKE} ${MFLAGS} DBINDIR=${DESTDIR}${bindir} \
105                        DLIBDIR=${DESTDIR}${PSLIBDIR} install
106        $(INSTALL_EXEC) sh/psroff ${DESTDIR}${bindir}
107        $(INSTALL_EXEC) sh/psrev  ${DESTDIR}${bindir}
108cleanprogs:
109        cd src; ${MAKE} ${MFLAGS} clean
110
111
112
113lib/psint.sh: lib/psint.bsd Makefile
114        $(RM) lib/psint.sh
115        $(SED) -e s,XPSLIBDIRX,${PSLIBDIR},g \
116                -e s,XPSTEMPDIRX,${PSTEMPDIR},g \
117                -e s,XBANNERFIRSTX,${BANNERFIRST},g \
118                -e s,XBANNERLASTX,${BANNERLAST},g \
119                -e s,XREVERSEX,${REVERSE},g \
120                -e s,XVERBOSELOGX,${VERBOSELOG},g \
121                -e s,XBINDIRX,${bindir},g \
122                lib/psint.bsd > lib/psint.sh
123lib/afmfiles.upr.out lib/afminstall.sh: lib/afmfiles.upr.in Makefile
124        $(RM) lib/afmfiles.upr.out lib/afminstall.sh
125        INSTALL_DATA="$(INSTALL_DATA)" AFMDIR="$(AFMDIR)"\
126                $(PERL) -n lib/afmgen.pl lib/afmfiles.upr.in \
127                >lib/afmfiles.upr.out 2>lib/afminstall.sh
128
129buildmisc: lib/psint.sh lib/afmfiles.upr.out
130
131instlmisc: lib/afminstall.sh
132        $(top_srcdir)/mkinstalldirs ${DESTDIR}${PSLIBDIR}
133        $(top_srcdir)/mkinstalldirs ${DESTDIR}${AFMDIR}
134        $(top_srcdir)/mkinstalldirs ${DESTDIR}${PPDDIR}
135        $(RM) afmfiles.upr; $(LN) lib/afmfiles.upr.out afmfiles.upr; \
136                $(INSTALL_DATA) afmfiles.upr $(DESTDIR)$(PSLIBDIR); \
137                $(RM) afmfiles.upr
138        DESTDIR="${DESTDIR}" /bin/sh lib/afminstall.sh
139        $(INSTALL_DATA) lib/*.ppd $(DESTDIR)$(PPDDIR)
140        $(RM) $(DESTDIR)$(PPDDIR)/default.ppd
141        $(LN) ${DEFAULTPPD}.ppd $(DESTDIR)$(PPDDIR)/default.ppd
142        for i in $(LIBFILES); do \
143                $(INSTALL_DATA) lib/$$i $(DESTDIR)$(PSLIBDIR); done
144        for i in $(LIBEXECS); do \
145                $(INSTALL_EXEC) lib/$$i $(DESTDIR)$(PSLIBDIR); done
146
147cleanmisc:
148        $(RM) lib/psint.sh lib/afmfiles.upr.out afmfiles.upr
149
150
151
152buildtroff:
153        -$(RM) lib/afmfiles.upr
154        $(LN) build-tree.upr lib/afmfiles.upr
155        cd troff.font; ${MAKE} ${MFLAGS} buildtroff
156        $(RM) lib/afmfiles.upr
157
158instltroff:
159        $(top_srcdir)/mkinstalldirs ${DESTDIR}${TROFFDIR}
160        cd troff.font; ${MAKE} ${MFLAGS} install
161
162cleantroff:
163        -$(RM) lib/afmfiles.upr
164        cd troff.font; ${MAKE} ${MFLAGS} clean
165
166
167
168src/map src/afmdit: buildprogs
169        : this line is here to prevent gmake from getting confused.
170
171builddit: src/map src/afmdit
172        -$(RM) lib/afmfiles.upr
173        $(LN) build-tree.upr lib/afmfiles.upr
174        cd ditroff.font; ${MAKE} ${MFLAGS} builddit
175        $(RM) lib/afmfiles.upr
176
177instldit:
178        cd ditroff.font; ${MAKE} ${MFLAGS} install
179
180cleandit:
181        -$(RM) lib/afmfiles.upr
182        cd ditroff.font; ${MAKE} ${MFLAGS} clean
183
184
185
186buildman:
187        for page in ${MAN1} ${MAN7} ${MAN8}; do         \
188            ${SED} -e s,XPSLIBDIRX,${PSLIBDIR},g        \
189                -e s,XTROFFFONTDIRX,${TROFFDIR},g       \
190                -e s,XPSTEMPDIRX,${PSTEMPDIR},g         \
191                -e s,XDITDIRX,${DITDIR},g               \
192                man/$${page}p > man/$$page;             \
193        done
194
195instlman:
196        $(top_srcdir)/mkinstalldirs ${DESTDIR}${mandir}/man1
197        for i in ${MAN1}; do \
198                $(INSTALL_DATA) man/$$i ${DESTDIR}${mandir}/man1; done
199        $(top_srcdir)/mkinstalldirs ${DESTDIR}${mandir}/man7
200        for i in ${MAN7}; do \
201                $(INSTALL_DATA) man/$$i ${DESTDIR}${mandir}/man7; done
202        $(top_srcdir)/mkinstalldirs ${DESTDIR}${mandir}/man8
203        for i in ${MAN8}; do \
204                $(INSTALL_DATA) man/$$i ${DESTDIR}${mandir}/man8; done
205
206cleanman:
207        cd man; $(RM) ${MAN1} ${MAN7} ${MAN8}
Note: See TracBrowser for help on using the repository browser.