summaryrefslogtreecommitdiff
path: root/dviware/umddvi/makefile.3b
blob: 34bb7d0b9511f9b17c0d7eaa377b2c903cb04d7a (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
# Makefile for everything
#
# Eventually, it would be nice to have various targets depending on
# the output devices, and pass that info down to the dev/ directory.
# For now, this will do.
DESTDIR=
MAKE=	make
MFLAGS=

# where to find the font description file
CONFFILE=/usr/lib/tex/fonts
# where things get installed
BINDIR=	${DESTDIR}/usr/local/bin
# where manuals get installed---note that `/man1' is tacked on
# for section 1 manuals, etc
MANDIR=	${DESTDIR}/usr/man

# The subdirectories.  N.B.: "lib" must appear first!
SUBDIR=	lib dev dvi

OPTS=	MFLAGS="${MFLAGS}" BINDIR=${BINDIR} MANDIR=${MANDIR} \
	CONFFILE=${CONFFILE} DESTDIR=${DESTDIR} CC=${CC} ${MFLAGS}

all:
	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${OPTS}); done

install clean depend:
	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${OPTS} $@); done

# this one is special
conf:
	cd dev; ${MAKE} conf

# make the distribution directory -- assumes no RCS files in top level
# `doc' is not yet ready
dist:
	rm -rf ../ctex_dist
	-mkdir ../ctex_dist
	-set -x +e; \
	 for i in *; do \
		if [ $$i != ctex ]; then \
			if [ -d $$i ]; then \
				cp -r $$i ../ctex_dist; \
				(cd ../ctex_dist/$$i; rm -rf RCS); \
			else \
				cp $$i ../ctex_dist; \
			fi; \
		fi; \
	 done
	-cd ../ctex_dist; \
	 echo '/CONFFILE=/s,local/,,!/MANDIR=	/s,local/,,!w!q' | \
	 tr ! '\012' | ed Makefile
	-cd ../ctex_dist; make clean
	-cd ../ctex_dist/dev; make dist