dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / ksh / Makefile
blobcddf3ec9dab3fb9b800faee438587c765dc4fe1d
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
26 SHELL=/usr/bin/ksh93
28 PROG= ksh
30 USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93
32 include ../Makefile.cmd
34 SUBDIRS= $(MACH)
35 $(BUILD64)SUBDIRS += $(MACH64)
37 SUBDIRS += builtins
39 ARCH32_i386= i86
40 ARCH32_sparc= sparcv7
41 ARCH32= $(ARCH32_$(MACH))
43 # Serialise the build to avoid that we run the test suite for 32bit
44 # and 64bit in parallel
45 .NO_PARALLEL: $(SUBDIRS)
47 all := TARGET = all
48 install := TARGET = install
49 clean := TARGET = clean
50 clobber := TARGET = clobber
51 testshell := TARGET = testshell
53 .KEEP_STATE:
55 all clean clobber testshell: $(SUBDIRS)
57 # dummy file since AST/ksh doesn't use *.po files
58 # (and "ksh" is just a frontend which calls directly into libshell,
59 # e.g. there are no l10n strings here)
60 $(PROG).po:
61 $(RM) ksh.po ksh93.po ; \
62 $(TOUCH) $(PROG).po
64 install: $(ISAEXEC) $(SUBDIRS)
65 @(builtin ln ; \
66 builtin rm ; \
67 rm -f $(ROOTPROG) ; \
68 ln $(ISAEXEC) $(ROOTPROG) ; \
69 for i in $(USRKSH_ALIAS_LIST) ; do \
70 [[ "$$i" == "$(PROG)" ]] && continue ; \
71 rm -f "$(ROOTBIN)/$$i" ; \
72 ln "$(ROOTBIN)/$(PROG)" "$(ROOTBIN)/$$i" ; \
73 done \
75 $(RM) $(ROOTSBIN)/sh
76 $(SYMLINK) ../usr/bin/$(ARCH32)/ksh93 $(ROOTSBIN)/sh
77 $(RM) $(ROOTSBIN)/jsh
78 $(SYMLINK) ../usr/bin/ksh93 $(ROOTSBIN)/jsh
79 $(RM) $(ROOTBIN)/jsh
80 $(SYMLINK) ksh93 $(ROOTBIN)/jsh
81 $(RM) $(ROOTBIN)/sh
82 $(SYMLINK) $(ARCH32)/ksh93 $(ROOTBIN)/sh
83 $(RM) $(ROOTLIB)/rsh
84 $(SYMLINK) ../bin/ksh93 $(ROOTLIB)/rsh
86 $(SUBDIRS): FRC
87 @cd $@; pwd; $(MAKE) $(TARGET)
89 FRC:
91 include ../Makefile.targ