Before messing around a bit.
[unix-history] / usr / src / share / me / Makefile
CommitLineData
764e1de1 1#
c21e3764
KM
2# Copyright (c) 1980 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
6# @(#)Makefile 6.1 (Berkeley) %G%
7#
764e1de1
EA
8# Makefile for -me macros
9#
10# This makefile strips comments from the source files and
11# installs them in the expected directories.
12#
c21e3764
KM
13DESTDIR=
14LIB = /usr/lib/me
764e1de1 15
c21e3764 16SRCS = tmac.e acm.me chars.me deltext.me eqn.me \
764e1de1
EA
17 float.me footnote.me index.me local.me null.me \
18 refer.me sh.me tbl.me thesis.me
c21e3764 19GET = sccs get
764e1de1
EA
20
21all: revisions $(SRCS)
22
c21e3764
KM
23install: revisions $(SRCS)
24 -if [ ! -d ${DESTDIR}${LIB} ]; then \
25 rm -f ${DESTDIR}${LIB}; \
26 mkdir ${DESTDIR}${LIB}; \
27 fi
28 -for i in ${SRCS}; do \
29 sed -e '/%beginstrip%/{' \
30 -e 'h' \
31 -e 's/.*/.\\" This version has had comments stripped; an unstripped version is available./p' \
32 -e 'g' \
33 -e '}' \
34 -e '/%beginstrip%/,$$s/[. ][ ]*\\".*//' \
35 -e '/^$$/d' \
36 -e '/\\n@/d' $$i > _mac_tmp_; \
37 install -m 0444 _mac_tmp_ ${DESTDIR}${LIB}/$$i; \
38 done
39 mv ${DESTDIR}${LIB}/tmac.e ${DESTDIR}/usr/lib/tmac/tmac.e
40 install -c -m 0444 revisions ${DESTDIR}${LIB}/revisions
764e1de1
EA
41
42clean:
43
c21e3764 44revisions $(SRCS):
764e1de1 45 $(GET) SCCS/s.$@