date and time created 86/05/25 17:37:32 by mckusick
[unix-history] / usr / src / usr.sbin / config / Makefile
CommitLineData
cd68466f
DF
1#
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#
9c070b02 6# @(#)Makefile 5.3 (Berkeley) %G%
cd68466f 7#
d27b0653 8#
36edb824 9CFILES= y.tab.c main.c lex.yy.c mkioconf.c mkmakefile.c \
9c070b02 10 mkglue.c mkheaders.c mkswapconf.c
36edb824 11OBJS= y.tab.o main.o lex.yy.o mkioconf.o mkmakefile.o \
9c070b02 12 mkglue.o mkheaders.o mkswapconf.o
f025f13d 13
73845e07 14CFLAGS=-O
399ec687
MT
15LDFLAGS=-ll
16
73845e07
SL
17config: ${OBJS}
18 ${CC} ${OBJS} -o config ${LDFLAGS}
399ec687 19
22d68ad0
BJ
20lex.yy.c: config.l
21 lex config.l
22
16168959 23y.tab.h y.tab.c: config.y
36edb824 24 yacc -d config.y
399ec687 25
399ec687 26clean:
f025f13d 27 rm -f ${OBJS} lex.yy.c y.tab.c y.tab.h config
853d3e88
KM
28
29install:
0230bec2 30 install -s config ${DESTDIR}/etc/config
f025f13d 31
22d68ad0 32lint: ${CFILES}
f025f13d 33 lint ${CFILES}
36edb824
SL
34
35depend:
36 grep '^#include' ${CFILES} | grep -v '<' | \
37 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
38 -e 's/\.c/.o/' \
39 -e 's,../[a-zA-Z]*/,,' | \
40 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
41 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
42 else rec = rec " " $$2 } } \
43 END { print rec } ' > makedep
44 echo '$$r makedep' >>eddep
45 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
46 echo '$$r makedep' >>eddep
47 echo 'w' >>eddep
48 cp Makefile Makefile.bak
49 ed - Makefile < eddep
50 rm eddep makedep
51
52# DO NOT DELETE THIS LINE -- make depend uses it
53
36edb824 54main.o: y.tab.h config.h
36edb824
SL
55mkioconf.o: y.tab.h config.h
56mkmakefile.o: y.tab.h config.h
9c070b02 57mkglue.o: config.h y.tab.h
36edb824
SL
58mkheaders.o: config.h y.tab.h
59mkswapconf.o: config.h