xref: /titanic_44/usr/src/cmd/csh/Makefile (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
1# Copyright 2003 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# ident	"%Z%%M%	%I%	%E% SMI"
12
13#
14# C Shell with process control; VM/UNIX VAX Makefile
15# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
16#
17
18include ../Makefile.cmd
19
20ED= ed
21#
22# For message catalogue files
23#
24GREP= egrep
25SED= sed
26POFILE= csh.po
27CLOBBERFILES += sh.tconst.h
28
29all :=          TARGET = all
30install :=      TARGET = install
31clean :=        TARGET = clean
32clobber :=      TARGET = clobber
33lint :=         TARGET = lint
34
35PFOBJS = sh_policy.o
36
37POBJS = \
38sh.o sh.char.o sh.debug.o\
39sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o\
40sh.file.o sh.func.o sh.glob.o sh.hist.o\
41sh.init.o sh.lex.o sh.misc.o sh.parse.o\
42sh.print.o sh.proc.o sh.sem.o sh.set.o\
43sh.tchar.o sh.time.o stubs.o wait3.o printf.o
44
45CPPFLAGS +=	-D_FILE_OFFSET_BITS=64
46CPPFLAGS +=	-I ../sh
47
48.KEEP_STATE:
49
50all install clean clobber lint:	$(MACH)
51
52PFPOFILES= $(PFOBJS:%.o=%.po)
53
54POFILES= \
55sh.po sh.char.po sh.debug.po\
56sh.dir.po sh.dol.po sh.err.po sh.exec.po sh.exp.po\
57sh.file.po sh.func.po sh.glob.po sh.hist.po\
58sh.init.po sh.lex.po sh.misc.po sh.parse.po\
59sh.print.po sh.proc.po sh.sem.po sh.set.po\
60sh.tchar.po sh.time.po stubs.po wait3.po\
61$(PFPOFILES)
62
63XGETFLAGS= -a -x csh.xcl
64
65
66#
67# For message catalogue files
68#
69_msg: $(MSGDOMAIN) sh.tconst.h .WAIT $(POFILE)
70	$(RM) $(POFILE)
71	cat $(POFILES) > $(POFILE)
72	$(RM) $(MSGDOMAIN)/$(POFILE)
73	$(CP) $(POFILE) $(MSGDOMAIN)
74
75
76$(POFILE):	$(POFILES)
77	$(RM) $@; cat $(POFILES) > $@
78
79# based on .c.po, BUILD.po from Makefile.master
80%.po:	../sh/%.c
81	$(COMPILE.cpp) $<  > $(<F).i
82	$(XGETTEXT) $(XGETFLAGS) $(<F).i ;\
83	$(RM)   $@ ;\
84	sed "/^domain/d" < messages.po  > $@ ;\
85	$(RM) messages.po $(<F).i
86
87$(PROG):	$$(POBJS)
88		$(LINK.c) $(POBJS) -o $@
89
90sh.tconst.h:
91	$(RM) $@; $(ED) sh.tconst.c < make.sh.tconst.h.ed
92
93clobber: local_clobber $(MACH)
94
95local_clobber:
96	$(RM) $(CLOBBERFILES)
97
98$(MACH): FRC
99	@cd $@; pwd; $(MAKE) $(TARGET)
100
101FRC:
102