xref: /titanic_41/usr/src/cmd/ksh/Makefile (revision 2eeaed14a5e2ed9bd811643ad5bffc3510ca0310)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28SHELL=/usr/bin/ksh
29
30include ../../Makefile.ksh93switch
31
32$(BINKSH_IS_KSH93)PROG= ksh
33$(BINKSH_IS_KSH93)USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93 pfksh
34
35$(BINKSH_ISNOT_KSH93)PROG= ksh93
36$(BINKSH_ISNOT_KSH93)USRKSH_ALIAS_LIST=ksh93 rksh93
37
38include ../Makefile.cmd
39
40SUBDIRS= $(MACH)
41$(BUILD64)SUBDIRS += $(MACH64)
42
43# Serialise the build to avoid that we run the test suite for 32bit
44# and 64bit in parallel
45.NO_PARALLEL: $(SUBDIRS)
46
47all		:=	TARGET = all
48install		:=	TARGET = install
49clean		:=	TARGET = clean
50clobber 	:=	TARGET = clobber
51lint		:=	TARGET = lint
52testshell	:=	TARGET = testshell
53
54.KEEP_STATE:
55
56all clean clobber lint testshell: $(SUBDIRS)
57
58# dummy file since AST/ksh doesn't use *.po files
59# (and "ksh" is just a frontend which calls directly into libshell,
60# e.g. there are no l10n strings here)
61$(PROG).po:
62	$(RM) ksh.po ksh93.po
63	touch $(PROG).po
64
65install:	$(ISAEXEC) $(SUBDIRS)
66	$(RM) $(ROOTPROG)
67	$(LN) $(ISAEXEC) $(ROOTPROG)
68	@(set -o xtrace ; \
69	for i in $(USRKSH_ALIAS_LIST) ; do \
70		[[ "$$i" = "$(PROG)" ]] && continue ; \
71		$(RM) "$(ROOTBIN)/$$i" ; \
72		$(LN) "$(ROOTBIN)/$(PROG)" "$(ROOTBIN)/$$i" ; \
73	done \
74	)
75
76$(SUBDIRS):	FRC
77	@cd $@; pwd; $(MAKE) $(TARGET)
78
79FRC:
80
81include ../Makefile.targ
82