xref: /illumos-gate/usr/src/cmd/csh/Makefile (revision 7a6d80f1660abd4755c68cbd094d4a914681d26e)
1# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2# Use is subject to license terms.
3
4#	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
5#	  All Rights Reserved
6
7# Copyright (c) 1980 Regents of the University of California.
8# All rights reserved.  The Berkeley Software License Agreement
9# specifies the terms and conditions for redistribution.
10
11#
12# C Shell with process control; VM/UNIX VAX Makefile
13# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
14#
15
16include ../Makefile.cmd
17
18#
19# For message catalogue files
20#
21POFILE= csh.po
22CLOBBERFILES += sh.tconst.h
23CLEANFILES += sh.tconst.h
24
25all :=          TARGET = all
26install :=      TARGET = install
27clean :=        TARGET = clean
28clobber :=      TARGET = clobber
29lint :=         TARGET = lint
30
31POBJS = \
32sh.o sh.char.o \
33sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o\
34sh.file.o sh.func.o sh.glob.o sh.hist.o\
35sh.init.o sh.lex.o sh.misc.o sh.parse.o\
36sh.print.o sh.proc.o sh.sem.o sh.set.o\
37sh.tchar.o sh.time.o wait3.o printf.o
38
39CPPFLAGS +=	-D_FILE_OFFSET_BITS=64
40CPPFLAGS +=	-I ../sh
41
42.KEEP_STATE:
43
44all install clean clobber lint:	$(MACH)
45
46POFILES= $(POBJS:%.o=%.po)
47
48XGETFLAGS += -a -x csh.xcl
49
50#
51# For message catalogue files
52#
53_msg: $(MSGDOMAIN) sh.tconst.h .WAIT $(POFILE)
54	$(RM) $(POFILE)
55	$(CAT) $(POFILES) > $(POFILE)
56	$(RM) $(MSGDOMAIN)/$(POFILE)
57	$(CP) $(POFILE) $(MSGDOMAIN)
58
59$(MSGDOMAIN):
60	$(INS.dir)
61
62$(POFILE):	$(POFILES)
63	$(RM) $@; cat $(POFILES) > $@
64
65sh.tconst.h: sh.tconst.c make.sh.tconst.h.ed
66	$(RM) $@; $(ED) sh.tconst.c < make.sh.tconst.h.ed
67
68clobber: local_clobber $(MACH)
69
70local_clobber:
71	$(RM) $(CLOBBERFILES)
72
73clean: local_clean
74
75local_clean:
76	$(RM) $(CLEANFILES)
77
78$(MACH): sh.tconst.h .WAIT FRC
79	@cd $@; pwd; $(MAKE) $(TARGET)
80
81FRC:
82