xref: /illumos-gate/usr/src/cmd/csh/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
2*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
3*7c478bd9Sstevel@tonic-gate
4*7c478bd9Sstevel@tonic-gate#	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
5*7c478bd9Sstevel@tonic-gate#	  All Rights Reserved
6*7c478bd9Sstevel@tonic-gate
7*7c478bd9Sstevel@tonic-gate# Copyright (c) 1980 Regents of the University of California.
8*7c478bd9Sstevel@tonic-gate# All rights reserved.  The Berkeley Software License Agreement
9*7c478bd9Sstevel@tonic-gate# specifies the terms and conditions for redistribution.
10*7c478bd9Sstevel@tonic-gate
11*7c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
12*7c478bd9Sstevel@tonic-gate
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# C Shell with process control; VM/UNIX VAX Makefile
15*7c478bd9Sstevel@tonic-gate# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
16*7c478bd9Sstevel@tonic-gate#
17*7c478bd9Sstevel@tonic-gate
18*7c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
19*7c478bd9Sstevel@tonic-gate
20*7c478bd9Sstevel@tonic-gateED= ed
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate# For message catalogue files
23*7c478bd9Sstevel@tonic-gate#
24*7c478bd9Sstevel@tonic-gateGREP= egrep
25*7c478bd9Sstevel@tonic-gateSED= sed
26*7c478bd9Sstevel@tonic-gatePOFILE= csh.po
27*7c478bd9Sstevel@tonic-gateCLOBBERFILES += sh.tconst.h
28*7c478bd9Sstevel@tonic-gate
29*7c478bd9Sstevel@tonic-gateall :=          TARGET = all
30*7c478bd9Sstevel@tonic-gateinstall :=      TARGET = install
31*7c478bd9Sstevel@tonic-gateclean :=        TARGET = clean
32*7c478bd9Sstevel@tonic-gateclobber :=      TARGET = clobber
33*7c478bd9Sstevel@tonic-gatelint :=         TARGET = lint
34*7c478bd9Sstevel@tonic-gate
35*7c478bd9Sstevel@tonic-gatePFOBJS = sh_policy.o
36*7c478bd9Sstevel@tonic-gate
37*7c478bd9Sstevel@tonic-gatePOBJS = \
38*7c478bd9Sstevel@tonic-gatesh.o sh.char.o sh.debug.o\
39*7c478bd9Sstevel@tonic-gatesh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o\
40*7c478bd9Sstevel@tonic-gatesh.file.o sh.func.o sh.glob.o sh.hist.o\
41*7c478bd9Sstevel@tonic-gatesh.init.o sh.lex.o sh.misc.o sh.parse.o\
42*7c478bd9Sstevel@tonic-gatesh.print.o sh.proc.o sh.sem.o sh.set.o\
43*7c478bd9Sstevel@tonic-gatesh.tchar.o sh.time.o stubs.o wait3.o printf.o
44*7c478bd9Sstevel@tonic-gate
45*7c478bd9Sstevel@tonic-gateCPPFLAGS +=	-D_FILE_OFFSET_BITS=64
46*7c478bd9Sstevel@tonic-gateCPPFLAGS +=	-I ../sh
47*7c478bd9Sstevel@tonic-gate
48*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gateall install clean clobber lint:	$(MACH)
51*7c478bd9Sstevel@tonic-gate
52*7c478bd9Sstevel@tonic-gatePFPOFILES= $(PFOBJS:%.o=%.po)
53*7c478bd9Sstevel@tonic-gate
54*7c478bd9Sstevel@tonic-gatePOFILES= \
55*7c478bd9Sstevel@tonic-gatesh.po sh.char.po sh.debug.po\
56*7c478bd9Sstevel@tonic-gatesh.dir.po sh.dol.po sh.err.po sh.exec.po sh.exp.po\
57*7c478bd9Sstevel@tonic-gatesh.file.po sh.func.po sh.glob.po sh.hist.po\
58*7c478bd9Sstevel@tonic-gatesh.init.po sh.lex.po sh.misc.po sh.parse.po\
59*7c478bd9Sstevel@tonic-gatesh.print.po sh.proc.po sh.sem.po sh.set.po\
60*7c478bd9Sstevel@tonic-gatesh.tchar.po sh.time.po stubs.po wait3.po\
61*7c478bd9Sstevel@tonic-gate$(PFPOFILES)
62*7c478bd9Sstevel@tonic-gate
63*7c478bd9Sstevel@tonic-gateXGETFLAGS= -a -x csh.xcl
64*7c478bd9Sstevel@tonic-gate
65*7c478bd9Sstevel@tonic-gate
66*7c478bd9Sstevel@tonic-gate#
67*7c478bd9Sstevel@tonic-gate# For message catalogue files
68*7c478bd9Sstevel@tonic-gate#
69*7c478bd9Sstevel@tonic-gate_msg: $(MSGDOMAIN) sh.tconst.h .WAIT $(POFILE)
70*7c478bd9Sstevel@tonic-gate	$(RM) $(POFILE)
71*7c478bd9Sstevel@tonic-gate	cat $(POFILES) > $(POFILE)
72*7c478bd9Sstevel@tonic-gate	$(RM) $(MSGDOMAIN)/$(POFILE)
73*7c478bd9Sstevel@tonic-gate	$(CP) $(POFILE) $(MSGDOMAIN)
74*7c478bd9Sstevel@tonic-gate
75*7c478bd9Sstevel@tonic-gate
76*7c478bd9Sstevel@tonic-gate$(POFILE):	$(POFILES)
77*7c478bd9Sstevel@tonic-gate	$(RM) $@; cat $(POFILES) > $@
78*7c478bd9Sstevel@tonic-gate
79*7c478bd9Sstevel@tonic-gate# based on .c.po, BUILD.po from Makefile.master
80*7c478bd9Sstevel@tonic-gate%.po:	../sh/%.c
81*7c478bd9Sstevel@tonic-gate	$(COMPILE.cpp) $<  > $(<F).i
82*7c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) $(<F).i ;\
83*7c478bd9Sstevel@tonic-gate	$(RM)   $@ ;\
84*7c478bd9Sstevel@tonic-gate	sed "/^domain/d" < messages.po  > $@ ;\
85*7c478bd9Sstevel@tonic-gate	$(RM) messages.po $(<F).i
86*7c478bd9Sstevel@tonic-gate
87*7c478bd9Sstevel@tonic-gate$(PROG):	$$(POBJS)
88*7c478bd9Sstevel@tonic-gate		$(LINK.c) $(POBJS) -o $@
89*7c478bd9Sstevel@tonic-gate
90*7c478bd9Sstevel@tonic-gatesh.tconst.h:
91*7c478bd9Sstevel@tonic-gate	$(RM) $@; $(ED) sh.tconst.c < make.sh.tconst.h.ed
92*7c478bd9Sstevel@tonic-gate
93*7c478bd9Sstevel@tonic-gateclobber: local_clobber $(MACH)
94*7c478bd9Sstevel@tonic-gate
95*7c478bd9Sstevel@tonic-gatelocal_clobber:
96*7c478bd9Sstevel@tonic-gate	$(RM) $(CLOBBERFILES)
97*7c478bd9Sstevel@tonic-gate
98*7c478bd9Sstevel@tonic-gate$(MACH): FRC
99*7c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
100*7c478bd9Sstevel@tonic-gate
101*7c478bd9Sstevel@tonic-gateFRC:
102