Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# CDDL HEADER START
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# The contents of this file are subject to the terms of the
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# Common Development and Distribution License (the "License").
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# You may not use this file except in compliance with the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# or http://www.opensolaris.org/os/licensing.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# See the License for the specific language governing permissions
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# and limitations under the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# When distributing Covered Code, include this CDDL HEADER in each
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# If applicable, add the following below this CDDL HEADER, with the
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# fields enclosed by brackets "[]" replaced with your own identifying
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# information: Portions Copyright [yyyy] [name of copyright owner]
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# CDDL HEADER END
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# Use is subject to license terms.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore#
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore# Copyright 2010 Nexenta Systems, Inc. All rights reserved.
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinPROG= alias
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinALIASPROG= \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin bg \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin cd \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz cksum \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz cmp \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz comm \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin command \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz cut \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin fc \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin fg \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin getopts \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin hash \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin jobs \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz join \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin kill \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz logname \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz paste \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz print \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin read \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin rev \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin sleep \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin sum \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz tee \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin test \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin type \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin ulimit \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin umask \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin unalias \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz uniq \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz wait \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz wc
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'AmoreXPG4ALIASPROG= \
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore alias \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore bg \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore cd \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore command \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore fc \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore fg \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore getopts \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore hash \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore jobs \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore kill \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore read \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore test \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore type \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore ulimit \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore umask \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore unalias \
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore wait
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'AmoreXPG4SH= \
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore sh
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'AmoreROOTXPG4ALIAS= \
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore $(XPG4SH:%=$(ROOTXPG4BIN)/%) $(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%)
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'AmoreROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%)
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chininclude ../../Makefile.cmd
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz$(SPARC_BLD)include ../../Makefile.cmd.64
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinFILEMODE= 555
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-parentheses
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin.KEEP_STATE:
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinall: $(PROG)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore$(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%):
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore $(RM) $@; $(SYMLINK) ../../bin/alias $@
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore$(XPG4SH:%=$(ROOTXPG4BIN)/%):
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore $(RM) $@; $(SYMLINK) ../../bin/ksh93 $@
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore$(ALIASPROG:%=$(ROOTBIN)/%): $(ROOTPROG)
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amore $(RM) $@; $(LN) $(ROOTPROG) $@
5d4606d7857958f486a2dc8cb37c99a0b72335d6Garrett D'Amore
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik.KEEP_STATE:
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik# Set common AST build flags (e.g., needed to support the math stuff).
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dikinclude ../../../Makefile.ast
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. DikOBJECTS= \
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik alias.o
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. DikSRCS= $(OBJECTS:%.o=%.c)
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland MainzLDLIBS += -lshell -lcmd -last
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. DikCPPFLAGS = \
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik $(DTEXTDOM) $(DTS_ERRNO) \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz -I$(ROOT)/usr/include/ast \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz -I$(ROOT)/usr/include
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz# Enable workaround for a crash in /usr/bin/alias when invalid
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz# options are passed (e.g. $ /usr/bin/alias -c #). The shell
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz# code will call an error handler which does a |longjmp()| but
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz# somehow the code failed to do the |setjmp()| before this point.
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland MainzCPPFLAGS += -DWORKAROUND_FOR_ALIAS_CRASH
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. DikCFLAGS += \
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik $(ASTCFLAGS)
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. DikCFLAGS64 += \
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik $(ASTCFLAGS64)
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. DikROOTCMDDIR=$(ROOT)/usr/bin
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik
65f385795231fc5a4e021acc26afd73365a3b5abGarrett D'Amoreinstall: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTALIASPROG) $(ROOTXPG4ALIAS)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik$(PROG): $(OBJECTS)
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik $(RM) alias
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik $(POST_PROCESS)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinclean clobber:
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Dik rm -f $(PROG) $(OBJECTS)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
81af778e872fc2ec5f0ac36e7b25bdb24ebd2d6aCasper H.S. Diklint _msg: