xref: /titanic_44/usr/src/cmd/ksh/Makefile (revision 49b225e1cfa7bbf7738d4df0a03f18e3283426eb)
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#
23# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27SHELL=/usr/bin/ksh93
28
29include ../../Makefile.ksh93switch
30
31$(BINKSH_IS_KSH93)PROG= ksh
32$(BINKSH_IS_KSH93)USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93 pfksh pfksh93 pfrksh pfrksh93
33
34$(BINKSH_ISNOT_KSH93)PROG= ksh93
35$(BINKSH_ISNOT_KSH93)USRKSH_ALIAS_LIST=ksh93 rksh93
36
37include ../Makefile.cmd
38
39SUBDIRS= $(MACH)
40$(BUILD64)SUBDIRS += $(MACH64)
41
42SUBDIRS += builtins
43
44# Serialise the build to avoid that we run the test suite for 32bit
45# and 64bit in parallel
46.NO_PARALLEL: $(SUBDIRS)
47
48all		:=	TARGET = all
49install		:=	TARGET = install
50clean		:=	TARGET = clean
51clobber 	:=	TARGET = clobber
52lint		:=	TARGET = lint
53testshell	:=	TARGET = testshell
54
55.KEEP_STATE:
56
57all clean clobber lint testshell: $(SUBDIRS)
58
59# dummy file since AST/ksh doesn't use *.po files
60# (and "ksh" is just a frontend which calls directly into libshell,
61# e.g. there are no l10n strings here)
62$(PROG).po:
63	$(RM) ksh.po ksh93.po ; \
64	$(TOUCH) $(PROG).po
65
66install:	$(ISAEXEC) $(SUBDIRS)
67	@(set -o xtrace ; \
68	builtin ln ; \
69	builtin rm ; \
70	rm -f  $(ROOTPROG) ; \
71	ln $(ISAEXEC) $(ROOTPROG) ; \
72	for i in $(USRKSH_ALIAS_LIST) ; do \
73		[[ "$$i" == "$(PROG)" ]] && continue ; \
74		rm -f "$(ROOTBIN)/$$i" ; \
75		ln "$(ROOTBIN)/$(PROG)" "$(ROOTBIN)/$$i" ; \
76	done \
77	)
78
79$(SUBDIRS):	FRC
80	@cd $@; pwd; $(MAKE) $(TARGET)
81
82FRC:
83
84include ../Makefile.targ
85