home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-07-15 | 3.5 KB | 184 lines |
- # @(#)Makefile 4.1
-
- # XXX--correct "or" character
- # XXX--better width tables
-
- # Tune these to taste, then
- # make install
- # and
- # ltroff your-favorite-troff-input
- # If you get reasonable results, you're in business.
- # You can use the file "testfile" in the ltroff source directory
- # if you lack anything better to test with.
-
- TOPDIR= /usr/local
- BINDIR= $(TOPDIR)/bin
- LIBDIR= $(TOPDIR)/lib
- MANDIR= $(TOPDIR)/man
- DATADIR= $(LIBDIR)/lfont
- DEFCART= uc # to save a tree or two
-
- ALIASES= \
- ao antique-olive \
- c courier \
- co cg-omega \
- ct cg-times \
- ga garamond-antiqua \
- lg letter-gothic \
- u univers \
- uc univers-condensed
-
- # On older BSD systems, you'll get to add
- # -Dstrchr=index -Dstrrchr=rindex
- # to the end of the next line.
-
- DEFINES= -DDATADIR=\"$(DATADIR)\"
-
- #
- # Not as likely to be tuned. . .
- #
-
- LINTFLAGS= -hbac
- CC= cc $(DEFINES)
- CFLAGS= -g
-
- #
- # End of stuff you might want to tune.
- #
-
- CARTS= ao c co ct ga lg u uc
-
- LINT= lint $(DEFINES)
-
- BINS= ltroff tlc
-
- COMMON= \
- common.H \
- fixed.H \
- ftXX.M \
- math-8.M \
- ms_publ.M \
- pitch10.H \
- pitch12.H \
- prop.H \
- tmac \
- win_l1.M \
- wingdings.M \
- wingdings.R
-
- UNCOMMON= \
- ao-math-8.R ao-ms_publ.B ao-ms_publ.I ao-ms_publ.R \
- ao-table ao-win_l1.B ao-win_l1.I ao-win_l1.R \
- c-table \
- co-math-8.R co-ms_publ.B co-ms_publ.I co-ms_publ.R \
- co-table co-win_l1.B co-win_l1.I co-win_l1.R \
- ct-math-8.R ct-ms_publ.B ct-ms_publ.I ct-ms_publ.R \
- ct-table ct-win_l1.B ct-win_l1.I ct-win_l1.R \
- ga-math-8.R ga-ms_publ.B ga-ms_publ.I ga-ms_publ.R \
- ga-table ga-win_l1.B ga-win_l1.I ga-win_l1.R \
- lg-table \
- u-math-8.R u-ms_publ.B u-ms_publ.I u-ms_publ.R \
- u-table u-win_l1.B u-win_l1.I u-win_l1.R \
- uc-math-8.R uc-ms_publ.B uc-ms_publ.I uc-ms_publ.R \
- uc-table uc-win_l1.B uc-win_l1.I uc-win_l1.R
-
- DATA= $(COMMON) $(UNCOMMON)
-
- MAN1= ltroff.1
- MAN3= catsup.3
- MANS= $(MAN1) $(MAN3)
-
- HEADERS= \
- ansic.h \
- cat.h
-
- SOURCES= \
- tlc.c \
- catsup.c
-
- OBJECTS= \
- tlc.o \
- catsup.o
-
- PUBLIC= \
- README \
- INSTALL \
- $(MANS) \
- testfile \
- Makefile \
- $(HEADERS) \
- $(SOURCES) \
- $(COMMON) \
- $(UNCOMMON)
-
- all: $(BINS) $(DATA) $(MANS)
-
- public: ltroff.tar.Z
-
- ltroff.tar.Z: $(PUBLIC)
- tar cfvp - $(PUBLIC) | compress > $@
-
- install: all
- for i in $(BINS); do install -c $$i $(BINDIR); done
- -mkdir $(LIBDIR) $(DATADIR)
- for i in $(COMMON) ; \
- do \
- install -c -m 444 $$i $(DATADIR) ; \
- done
- -cd $(DATADIR) ; mkdir $(CARTS)
- for i in $(CARTS) ; \
- do \
- echo $$i-- ; \
- dir=$(DATADIR)/$$i ; \
- for j in $$i-* ; \
- do \
- file=`expr $$j : $$i-'\(.*\)'` ; \
- install -c -m 444 $$j $$dir/$$file ; \
- done ; \
- tlc -w $$dir ; \
- done
- set $(DEFCART) default $(ALIASES) ; \
- chdir $(DATADIR) ; \
- while [ $$# -ne 0 ] ; \
- do \
- rm -f $$2 ; \
- ln -s $$1 $$2 ; \
- shift ; \
- shift ; \
- done
- -for i in $(MAN1); \
- do \
- sed 's@DATADIR@$(DATADIR)@' $$i > ,$$i ; \
- install -m 444 ,$$i $(MANDIR)/man1/$$i ; \
- rm ,$$i ; \
- done
- -for i in $(MAN3); \
- do \
- sed 's@DATADIR@$(DATADIR)@' $$i > ,$$i ; \
- install -m 444 ,$$i $(MANDIR)/man3/$$i ; \
- rm ,$$i ; \
- done
-
- sure: $(SOURCES) $(HEADERS)
- $(LINT) $(LINTFLAGS) $(SOURCES)
-
- clean:
- rm -f $(BINS) *.o *.out core ,* ltroff.tar.Z
-
- CLEAN: clean
- sccs clean
-
- tlc: $(OBJECTS)
- $(CC) $(CFLAGS) $(OBJECTS) -o $@
-
- ltroff: ltroff.sh
- rm -f $@
- sed 's@DATADIR@$(DATADIR)@;s@LIBDIR@$(LIBDIR)@' $? > $@
- chmod +x $@
-
- catsup.o: cat.h
-
- tlc.o: ansic.h cat.h
-
- .KEEP_STATE:
-