xref: /titanic_50/usr/src/cmd/ksh/builtins/Makefile (revision 34f9b3eef6fdadbda0a846aa4d68691ac40eace5)
17c2fbfb3SApril Chin#
27c2fbfb3SApril Chin# CDDL HEADER START
37c2fbfb3SApril Chin#
47c2fbfb3SApril Chin# The contents of this file are subject to the terms of the
57c2fbfb3SApril Chin# Common Development and Distribution License (the "License").
67c2fbfb3SApril Chin# You may not use this file except in compliance with the License.
77c2fbfb3SApril Chin#
87c2fbfb3SApril Chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c2fbfb3SApril Chin# or http://www.opensolaris.org/os/licensing.
107c2fbfb3SApril Chin# See the License for the specific language governing permissions
117c2fbfb3SApril Chin# and limitations under the License.
127c2fbfb3SApril Chin#
137c2fbfb3SApril Chin# When distributing Covered Code, include this CDDL HEADER in each
147c2fbfb3SApril Chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c2fbfb3SApril Chin# If applicable, add the following below this CDDL HEADER, with the
167c2fbfb3SApril Chin# fields enclosed by brackets "[]" replaced with your own identifying
177c2fbfb3SApril Chin# information: Portions Copyright [yyyy] [name of copyright owner]
187c2fbfb3SApril Chin#
197c2fbfb3SApril Chin# CDDL HEADER END
207c2fbfb3SApril Chin#
217c2fbfb3SApril Chin
227c2fbfb3SApril Chin#
2381af778eSCasper H.S. Dik# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
247c2fbfb3SApril Chin# Use is subject to license terms.
257c2fbfb3SApril Chin#
267c2fbfb3SApril Chin
277c2fbfb3SApril ChinSHELL=/usr/bin/ksh93
287c2fbfb3SApril Chin
297c2fbfb3SApril ChinPROG= alias
307c2fbfb3SApril ChinALIASPROG= \
317c2fbfb3SApril Chin	bg \
327c2fbfb3SApril Chin	cd \
33*34f9b3eeSRoland Mainz	cksum \
34*34f9b3eeSRoland Mainz	cmp \
35*34f9b3eeSRoland Mainz	comm \
367c2fbfb3SApril Chin	command \
37*34f9b3eeSRoland Mainz	cut \
387c2fbfb3SApril Chin	fc \
397c2fbfb3SApril Chin	fg \
407c2fbfb3SApril Chin	getopts \
417c2fbfb3SApril Chin	hash \
427c2fbfb3SApril Chin	jobs \
43*34f9b3eeSRoland Mainz	join \
447c2fbfb3SApril Chin	kill \
45*34f9b3eeSRoland Mainz	logname \
46*34f9b3eeSRoland Mainz	paste \
47*34f9b3eeSRoland Mainz	print \
487c2fbfb3SApril Chin	read \
497c2fbfb3SApril Chin	rev \
507c2fbfb3SApril Chin	sleep \
517c2fbfb3SApril Chin	sum \
52*34f9b3eeSRoland Mainz	tee \
537c2fbfb3SApril Chin	test \
547c2fbfb3SApril Chin	type \
557c2fbfb3SApril Chin	ulimit \
567c2fbfb3SApril Chin	umask \
577c2fbfb3SApril Chin	unalias \
58*34f9b3eeSRoland Mainz	uniq \
59*34f9b3eeSRoland Mainz	wait \
60*34f9b3eeSRoland Mainz	wc
617c2fbfb3SApril Chin
627c2fbfb3SApril Chininclude ../../Makefile.cmd
63*34f9b3eeSRoland Mainz$(SPARC_BLD)include ../../Makefile.cmd.64
647c2fbfb3SApril Chin
657c2fbfb3SApril ChinROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%)
667c2fbfb3SApril Chin
677c2fbfb3SApril ChinFILEMODE= 555
68*34f9b3eeSRoland MainzOWNER= root
69*34f9b3eeSRoland MainzGROUP= bin
707c2fbfb3SApril Chin
717c2fbfb3SApril Chin.KEEP_STATE:
727c2fbfb3SApril Chin
737c2fbfb3SApril Chinall: $(PROG)
747c2fbfb3SApril Chin
757c2fbfb3SApril Chin$(ROOTBIN)/%: $(ROOTBIN)/alias
767c2fbfb3SApril Chin	$(INS.link)
777c2fbfb3SApril Chin
7881af778eSCasper H.S. Dik.KEEP_STATE:
7981af778eSCasper H.S. Dik
8081af778eSCasper H.S. Dik# Set common AST build flags (e.g., needed to support the math stuff).
8181af778eSCasper H.S. Dikinclude ../../../Makefile.ast
8281af778eSCasper H.S. Dik
8381af778eSCasper H.S. DikOBJECTS= \
8481af778eSCasper H.S. Dik        alias.o
8581af778eSCasper H.S. Dik
8681af778eSCasper H.S. DikSRCS=	$(OBJECTS:%.o=%.c)
8781af778eSCasper H.S. Dik
88*34f9b3eeSRoland MainzGROUP= bin
89*34f9b3eeSRoland MainzLDLIBS += -lshell -lcmd -last
9081af778eSCasper H.S. Dik
9181af778eSCasper H.S. DikCPPFLAGS = \
9281af778eSCasper H.S. Dik	$(DTEXTDOM) $(DTS_ERRNO) \
93*34f9b3eeSRoland Mainz	-I$(ROOT)/usr/include/ast \
94*34f9b3eeSRoland Mainz	-I$(ROOT)/usr/include
95*34f9b3eeSRoland Mainz
96*34f9b3eeSRoland Mainz# Enable workaround for a crash in /usr/bin/alias when invalid
97*34f9b3eeSRoland Mainz# options are passed (e.g. $ /usr/bin/alias -c #). The shell
98*34f9b3eeSRoland Mainz# code will call an error handler which does a |longjmp()| but
99*34f9b3eeSRoland Mainz# somehow the code failed to do the |setjmp()| before this point.
100*34f9b3eeSRoland MainzCPPFLAGS += -DWORKAROUND_FOR_ALIAS_CRASH
10181af778eSCasper H.S. Dik
10281af778eSCasper H.S. DikCFLAGS += \
10381af778eSCasper H.S. Dik	$(ASTCFLAGS)
10481af778eSCasper H.S. DikCFLAGS64 += \
10581af778eSCasper H.S. Dik	$(ASTCFLAGS64)
10681af778eSCasper H.S. Dik
10781af778eSCasper H.S. DikROOTCMDDIR=$(ROOT)/usr/bin
10881af778eSCasper H.S. Dik
10981af778eSCasper H.S. Dik# .WAIT is needed to get the hardlinks properly done
11081af778eSCasper H.S. Dikinstall: all $(ROOTCMD) .WAIT $(ROOTALIASPROG)
11181af778eSCasper H.S. Dik
11281af778eSCasper H.S. Dik$(PROG):	$(OBJECTS)
11381af778eSCasper H.S. Dik	$(RM) alias
11481af778eSCasper H.S. Dik	$(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
11581af778eSCasper H.S. Dik	$(POST_PROCESS)
1167c2fbfb3SApril Chin
1177c2fbfb3SApril Chinclean clobber:
11881af778eSCasper H.S. Dik	rm -f $(PROG) $(OBJECTS)
1197c2fbfb3SApril Chin
12081af778eSCasper H.S. Diklint _msg:
121