xref: /titanic_52/usr/src/cmd/ast/ksh/Makefile (revision 906afcb89d0412cc073b95c2d701a804a8cdb62c)
1*906afcb8SAndy Fiddaman#
2*906afcb8SAndy Fiddaman# CDDL HEADER START
3*906afcb8SAndy Fiddaman#
4*906afcb8SAndy Fiddaman# The contents of this file are subject to the terms of the
5*906afcb8SAndy Fiddaman# Common Development and Distribution License (the "License").
6*906afcb8SAndy Fiddaman# You may not use this file except in compliance with the License.
7*906afcb8SAndy Fiddaman#
8*906afcb8SAndy Fiddaman# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*906afcb8SAndy Fiddaman# or http://www.opensolaris.org/os/licensing.
10*906afcb8SAndy Fiddaman# See the License for the specific language governing permissions
11*906afcb8SAndy Fiddaman# and limitations under the License.
12*906afcb8SAndy Fiddaman#
13*906afcb8SAndy Fiddaman# When distributing Covered Code, include this CDDL HEADER in each
14*906afcb8SAndy Fiddaman# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*906afcb8SAndy Fiddaman# If applicable, add the following below this CDDL HEADER, with the
16*906afcb8SAndy Fiddaman# fields enclosed by brackets "[]" replaced with your own identifying
17*906afcb8SAndy Fiddaman# information: Portions Copyright [yyyy] [name of copyright owner]
18*906afcb8SAndy Fiddaman#
19*906afcb8SAndy Fiddaman# CDDL HEADER END
20*906afcb8SAndy Fiddaman#
21*906afcb8SAndy Fiddaman
22*906afcb8SAndy Fiddaman#
23*906afcb8SAndy Fiddaman# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24*906afcb8SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
25*906afcb8SAndy Fiddaman#
26*906afcb8SAndy Fiddaman
27*906afcb8SAndy FiddamanSHELL= /usr/bin/ksh93
28*906afcb8SAndy Fiddaman
29*906afcb8SAndy FiddamanPROG= ksh
30*906afcb8SAndy Fiddaman
31*906afcb8SAndy FiddamanUSRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93
32*906afcb8SAndy Fiddaman
33*906afcb8SAndy Fiddamaninclude ../../Makefile.cmd
34*906afcb8SAndy Fiddaman
35*906afcb8SAndy FiddamanSUBDIRS= $(MACH)
36*906afcb8SAndy Fiddaman$(BUILD64)SUBDIRS += $(MACH64)
37*906afcb8SAndy Fiddaman
38*906afcb8SAndy FiddamanSUBDIRS += builtins
39*906afcb8SAndy Fiddaman
40*906afcb8SAndy FiddamanARCH32_i386= i86
41*906afcb8SAndy FiddamanARCH32_sparc= sparcv7
42*906afcb8SAndy FiddamanARCH32= $(ARCH32_$(MACH))
43*906afcb8SAndy Fiddaman
44*906afcb8SAndy Fiddamanall		:=	TARGET = all
45*906afcb8SAndy Fiddamaninstall		:=	TARGET = install
46*906afcb8SAndy Fiddamanclean		:=	TARGET = clean
47*906afcb8SAndy Fiddamanclobber		:=	TARGET = clobber
48*906afcb8SAndy Fiddamanlint		:=	TARGET = lint
49*906afcb8SAndy Fiddamantestshell	:=	TARGET = testshell
50*906afcb8SAndy Fiddaman
51*906afcb8SAndy Fiddaman.KEEP_STATE:
52*906afcb8SAndy Fiddaman# Serialise the build to avoid running the test suite for 32-bit
53*906afcb8SAndy Fiddaman# and 64-bit in parallel
54*906afcb8SAndy Fiddaman.NO_PARALLEL: $(SUBDIRS)
55*906afcb8SAndy Fiddaman
56*906afcb8SAndy Fiddamanall clean clobber lint testshell: $(SUBDIRS)
57*906afcb8SAndy Fiddamaninstall_h _feature:
58*906afcb8SAndy Fiddaman
59*906afcb8SAndy Fiddaman# dummy file since AST/ksh doesn't use *.po files
60*906afcb8SAndy Fiddaman# (and "ksh" is just a frontend which calls directly into libshell,
61*906afcb8SAndy Fiddaman# i.e. there are no l10n strings here)
62*906afcb8SAndy Fiddaman$(PROG).po:
63*906afcb8SAndy Fiddaman	$(RM) ksh.po ksh93.po ; \
64*906afcb8SAndy Fiddaman	$(TOUCH) $(PROG).po
65*906afcb8SAndy Fiddaman
66*906afcb8SAndy Fiddamaninstall: $(SUBDIRS)
67*906afcb8SAndy Fiddaman	@(set -o xtrace ; \
68*906afcb8SAndy Fiddaman	builtin ln ; \
69*906afcb8SAndy Fiddaman	builtin rm ; \
70*906afcb8SAndy Fiddaman	rm -f $(ROOTPROG) ; \
71*906afcb8SAndy Fiddaman	ln $(ISAEXEC) $(ROOTPROG) ; \
72*906afcb8SAndy Fiddaman	for i in $(USRKSH_ALIAS_LIST) ; do \
73*906afcb8SAndy Fiddaman		[[ "$$i" == "$(PROG)" ]] && continue ; \
74*906afcb8SAndy Fiddaman		rm -f "$(ROOTBIN)/$$i" ; \
75*906afcb8SAndy Fiddaman		ln "$(ROOTBIN)/$(PROG)" "$(ROOTBIN)/$$i" ; \
76*906afcb8SAndy Fiddaman	done \
77*906afcb8SAndy Fiddaman	)
78*906afcb8SAndy Fiddaman	$(RM) $(ROOTSBIN)/sh
79*906afcb8SAndy Fiddaman	$(SYMLINK) ../usr/bin/$(ARCH32)/ksh93 $(ROOTSBIN)/sh
80*906afcb8SAndy Fiddaman	$(RM) $(ROOTSBIN)/jsh
81*906afcb8SAndy Fiddaman	$(SYMLINK) ../usr/bin/ksh93 $(ROOTSBIN)/jsh
82*906afcb8SAndy Fiddaman	$(RM) $(ROOTBIN)/jsh
83*906afcb8SAndy Fiddaman	$(SYMLINK) ksh93 $(ROOTBIN)/jsh
84*906afcb8SAndy Fiddaman	$(RM) $(ROOTBIN)/sh
85*906afcb8SAndy Fiddaman	$(SYMLINK) $(ARCH32)/ksh93 $(ROOTBIN)/sh
86*906afcb8SAndy Fiddaman	$(RM) $(ROOTLIB)/rsh
87*906afcb8SAndy Fiddaman	$(SYMLINK) ../bin/ksh93 $(ROOTLIB)/rsh
88*906afcb8SAndy Fiddaman
89*906afcb8SAndy Fiddaman$(SUBDIRS):	FRC
90*906afcb8SAndy Fiddaman	@cd $@; pwd; $(MAKE) $(TARGET)
91*906afcb8SAndy FiddamanFRC:
92*906afcb8SAndy Fiddaman
93*906afcb8SAndy Fiddamaninclude ../../Makefile.targ
94