xref: /titanic_51/usr/src/cmd/ksh/Makefile (revision 134a1f4e3289b54e0f980e9cf05352e419a60bee)
1da2e3ebdSchin#
2da2e3ebdSchin# CDDL HEADER START
3da2e3ebdSchin#
4da2e3ebdSchin# The contents of this file are subject to the terms of the
5da2e3ebdSchin# Common Development and Distribution License (the "License").
6da2e3ebdSchin# You may not use this file except in compliance with the License.
7da2e3ebdSchin#
8da2e3ebdSchin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da2e3ebdSchin# or http://www.opensolaris.org/os/licensing.
10da2e3ebdSchin# See the License for the specific language governing permissions
11da2e3ebdSchin# and limitations under the License.
12da2e3ebdSchin#
13da2e3ebdSchin# When distributing Covered Code, include this CDDL HEADER in each
14da2e3ebdSchin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da2e3ebdSchin# If applicable, add the following below this CDDL HEADER, with the
16da2e3ebdSchin# fields enclosed by brackets "[]" replaced with your own identifying
17da2e3ebdSchin# information: Portions Copyright [yyyy] [name of copyright owner]
18da2e3ebdSchin#
19da2e3ebdSchin# CDDL HEADER END
20da2e3ebdSchin#
217c2fbfb3SApril Chin
22da2e3ebdSchin#
23*134a1f4eSCasper H.S. Dik# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24da2e3ebdSchin#
25da2e3ebdSchin
267c2fbfb3SApril ChinSHELL=/usr/bin/ksh93
27da2e3ebdSchin
28ead1f93eSLiane PrazaPROG= ksh
29da2e3ebdSchin
30*134a1f4eSCasper H.S. DikUSRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93
31da2e3ebdSchin
32da2e3ebdSchininclude ../Makefile.cmd
33da2e3ebdSchin
34da2e3ebdSchinSUBDIRS= $(MACH)
35da2e3ebdSchin$(BUILD64)SUBDIRS += $(MACH64)
36da2e3ebdSchin
377c2fbfb3SApril ChinSUBDIRS += builtins
387c2fbfb3SApril Chin
39ead1f93eSLiane PrazaARCH32_i386= i86
40ead1f93eSLiane PrazaARCH32_sparc= sparcv7
41ead1f93eSLiane PrazaARCH32= $(ARCH32_$(MACH))
42ead1f93eSLiane Praza
43da2e3ebdSchin# Serialise the build to avoid that we run the test suite for 32bit
44da2e3ebdSchin# and 64bit in parallel
45da2e3ebdSchin.NO_PARALLEL: $(SUBDIRS)
46da2e3ebdSchin
47da2e3ebdSchinall		:=	TARGET = all
48da2e3ebdSchininstall		:=	TARGET = install
49da2e3ebdSchinclean		:=	TARGET = clean
50da2e3ebdSchinclobber 	:=	TARGET = clobber
51da2e3ebdSchinlint		:=	TARGET = lint
52da2e3ebdSchintestshell	:=	TARGET = testshell
53da2e3ebdSchin
54da2e3ebdSchin.KEEP_STATE:
55da2e3ebdSchin
56da2e3ebdSchinall clean clobber lint testshell: $(SUBDIRS)
57da2e3ebdSchin
58da2e3ebdSchin# dummy file since AST/ksh doesn't use *.po files
59da2e3ebdSchin# (and "ksh" is just a frontend which calls directly into libshell,
60da2e3ebdSchin# e.g. there are no l10n strings here)
61da2e3ebdSchin$(PROG).po:
627c2fbfb3SApril Chin	$(RM) ksh.po ksh93.po ; \
637c2fbfb3SApril Chin	$(TOUCH) $(PROG).po
64da2e3ebdSchin
65da2e3ebdSchininstall:	$(ISAEXEC) $(SUBDIRS)
66da2e3ebdSchin	@(set -o xtrace ; \
677c2fbfb3SApril Chin	builtin ln ; \
687c2fbfb3SApril Chin	builtin rm ; \
697c2fbfb3SApril Chin	rm -f  $(ROOTPROG) ; \
707c2fbfb3SApril Chin	ln $(ISAEXEC) $(ROOTPROG) ; \
71da2e3ebdSchin	for i in $(USRKSH_ALIAS_LIST) ; do \
727c2fbfb3SApril Chin		[[ "$$i" == "$(PROG)" ]] && continue ; \
737c2fbfb3SApril Chin		rm -f "$(ROOTBIN)/$$i" ; \
747c2fbfb3SApril Chin		ln "$(ROOTBIN)/$(PROG)" "$(ROOTBIN)/$$i" ; \
75da2e3ebdSchin	done \
76da2e3ebdSchin	)
77ead1f93eSLiane Praza	$(RM) $(ROOTSBIN)/sh
78ead1f93eSLiane Praza	$(SYMLINK) ../usr/bin/$(ARCH32)/ksh93 $(ROOTSBIN)/sh
79ead1f93eSLiane Praza	$(RM) $(ROOTSBIN)/jsh
80ead1f93eSLiane Praza	$(SYMLINK) ../usr/bin/ksh93 $(ROOTSBIN)/jsh
81ead1f93eSLiane Praza	$(RM) $(ROOTBIN)/jsh
82ead1f93eSLiane Praza	$(SYMLINK) ksh93 $(ROOTBIN)/jsh
83ead1f93eSLiane Praza	$(RM) $(ROOTBIN)/sh
84ead1f93eSLiane Praza	$(SYMLINK) $(ARCH32)/ksh93 $(ROOTBIN)/sh
85ead1f93eSLiane Praza	$(RM) $(ROOTLIB)/rsh
86ead1f93eSLiane Praza	$(SYMLINK) ../bin/ksh93 $(ROOTLIB)/rsh
87da2e3ebdSchin
88da2e3ebdSchin$(SUBDIRS):	FRC
89da2e3ebdSchin	@cd $@; pwd; $(MAKE) $(TARGET)
90da2e3ebdSchin
91da2e3ebdSchinFRC:
92da2e3ebdSchin
93da2e3ebdSchininclude ../Makefile.targ
94