blob: a7e2b5aeee064b1967d4f0b4818a819312be6d31 (
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
|
# Makefile for lacheck.
# If both flex lacheck.c are missing, copy lacheck.noflex.c to
# lacheck.c.
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
mandir = $(prefix)/man/man1
manext = .1
srcdir = .
# Use `cc -bsd' on a next
# use `cc -cckr' on a sgi
# CC = gcc -traditional
CC=cc
CFLAGS = -g # -O -DNEED_STRSTR
# No changes should be needed below
# Remember to change when lacheck is updated.
REV = 1.26
DISTFILES = lacheck.lex lacheck.man Makefile lacheck.c test.tex test.old \
lacheck.hlp make_vms.com
FTPDIR = /home/ftp/pub/Staff/Per.Abrahamsen/mirror/ftp/lacheck
SHELL = /bin/sh
LACHECK=lacheck
INSTALL = cp
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
FLEX = flex
FLEXFLAGS = -8
LIBS= #-ll
$(LACHECK): lacheck.o
$(CC) $(CFLAGS) -o $@ $(srcdir)/lacheck.o $(LIBS)
lacheck.c: lacheck.lex
-if [ ! -f $(srcdir)/lacheck.noflex.c ] ; then \
if [ -f $(srcdir)/lacheck.c ] ; then \
$(INSTALL_DATA) $(srcdir)/lacheck.c $(srcdir)/lacheck.noflex.c ; \
fi ; \
fi
$(FLEX) $(FLEXFLAGS) $(srcdir)/lacheck.lex
mv $(srcdir)/lex.yy.c $@
lacheck.1: lacheck.man
-sed -e "s!%%LACHECKREV%%!Release $(REV)!" $(srcdir)/lacheck.man |\
sed -e "s!%%LACHECKDATE%%!`date +%D`!" |\
sed -e "s!%%LACHECKPATH%%!$(bindir)/$(LACHECK)!" > $@
test.new: test.tex $(LACHECK)
$(srcdir)/$(LACHECK) $(srcdir)/test.tex > $@
test.old: test.tex $(LACHECK)
$(srcdir)/$(LACHECK) $(srcdir)/test.tex > $@
check: test.new
-diff $(srcdir)/test.old $(srcdir)/test.new
install: $(LACHECK) lacheck.1
cp $(srcdir)/$(LACHECK) $(bindir)
cp $(srcdir)/lacheck.1 $(mandir)/lacheck$(manext)
uninstall:
-rm -f $(bindir)/$(LACHECK) $(mandir)/lacheck$(manext)
clean:
-rm -f $(srcdir)/$(LACHECK) $(srcdir)/*.o $(srcdir)/*.1 $(srcdir)/*~
distclean: clean
mostlyclean: clean
-rm -f $(srcdir)/lacheck.c $(srcdir)/lacheck.noflex.c
realclean: mostlyclean
-rm -f test.old
dist: $(DISTFILES)
mkdir lacheck-$(REV)
cp $(DISTFILES) lacheck-$(REV)
touch lacheck-$(REV)/lacheck.c
-rm -f $(FTPDIR)/lacheck-$(REV).tar.gz
-rm -f $(FTPDIR)/lacheck.tar.gz $(FTPDIR)/lacheck.tar.Z
tar -cf - lacheck-$(REV) | gzip > $(FTPDIR)/lacheck-$(REV).tar.gz
tar -cf - lacheck-$(REV) | compress > $(FTPDIR)/lacheck-$(REV).tar.Z
(cd $(FTPDIR); ln -s lacheck-$(REV).tar.gz lacheck.tar.gz)
|