Makefile revision 34f9b3eef6fdadbda0a846aa4d68691ac40eace5
208651a016b098f4fa1f6279559f104d70f1632dtakashi#
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki# CDDL HEADER START
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki#
353bea4bd4f2d567232d91686f797810bc176f2etakashi# The contents of this file are subject to the terms of the
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki# Common Development and Distribution License (the "License").
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# You may not use this file except in compliance with the License.
031b91a62d25106ae69d4693475c79618dd5e884fielding#
031b91a62d25106ae69d4693475c79618dd5e884fielding# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
031b91a62d25106ae69d4693475c79618dd5e884fielding# or http://www.opensolaris.org/os/licensing.
031b91a62d25106ae69d4693475c79618dd5e884fielding# See the License for the specific language governing permissions
031b91a62d25106ae69d4693475c79618dd5e884fielding# and limitations under the License.
031b91a62d25106ae69d4693475c79618dd5e884fielding#
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# When distributing Covered Code, include this CDDL HEADER in each
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# If applicable, add the following below this CDDL HEADER, with the
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# fields enclosed by brackets "[]" replaced with your own identifying
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# information: Portions Copyright [yyyy] [name of copyright owner]
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd#
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# CDDL HEADER END
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd#
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd#
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# Use is subject to license terms.
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki#
208651a016b098f4fa1f6279559f104d70f1632dtakashi
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiSHELL=/usr/bin/ksh93
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiPROG= alias
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiALIASPROG= \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki bg \
a695049cbf9160d334b2caf9d3b8862ed9710ff2kawai cd \
208651a016b098f4fa1f6279559f104d70f1632dtakashi cksum \
208651a016b098f4fa1f6279559f104d70f1632dtakashi cmp \
a695049cbf9160d334b2caf9d3b8862ed9710ff2kawai comm \
208651a016b098f4fa1f6279559f104d70f1632dtakashi command \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki cut \
a695049cbf9160d334b2caf9d3b8862ed9710ff2kawai fc \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki fg \
208651a016b098f4fa1f6279559f104d70f1632dtakashi getopts \
208651a016b098f4fa1f6279559f104d70f1632dtakashi hash \
208651a016b098f4fa1f6279559f104d70f1632dtakashi jobs \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki join \
208651a016b098f4fa1f6279559f104d70f1632dtakashi kill \
208651a016b098f4fa1f6279559f104d70f1632dtakashi logname \
208651a016b098f4fa1f6279559f104d70f1632dtakashi paste \
a695049cbf9160d334b2caf9d3b8862ed9710ff2kawai print \
a695049cbf9160d334b2caf9d3b8862ed9710ff2kawai read \
a695049cbf9160d334b2caf9d3b8862ed9710ff2kawai rev \
a695049cbf9160d334b2caf9d3b8862ed9710ff2kawai sleep \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki sum \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki tee \
b2e2128a2254db4b0dd7ae022e5616fe4d61db0cyoshiki test \
353bea4bd4f2d567232d91686f797810bc176f2etakashi type \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki ulimit \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki umask \
208651a016b098f4fa1f6279559f104d70f1632dtakashi unalias \
353bea4bd4f2d567232d91686f797810bc176f2etakashi uniq \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki wait \
208651a016b098f4fa1f6279559f104d70f1632dtakashi wc
353bea4bd4f2d567232d91686f797810bc176f2etakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashiinclude ../../Makefile.cmd
208651a016b098f4fa1f6279559f104d70f1632dtakashi$(SPARC_BLD)include ../../Makefile.cmd.64
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%)
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiFILEMODE= 555
208651a016b098f4fa1f6279559f104d70f1632dtakashiOWNER= root
208651a016b098f4fa1f6279559f104d70f1632dtakashiGROUP= bin
208651a016b098f4fa1f6279559f104d70f1632dtakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashi.KEEP_STATE:
208651a016b098f4fa1f6279559f104d70f1632dtakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashiall: $(PROG)
208651a016b098f4fa1f6279559f104d70f1632dtakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashi$(ROOTBIN)/%: $(ROOTBIN)/alias
208651a016b098f4fa1f6279559f104d70f1632dtakashi $(INS.link)
208651a016b098f4fa1f6279559f104d70f1632dtakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashi.KEEP_STATE:
208651a016b098f4fa1f6279559f104d70f1632dtakashi
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki# Set common AST build flags (e.g., needed to support the math stuff).
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiinclude ../../../Makefile.ast
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiOBJECTS= \
208651a016b098f4fa1f6279559f104d70f1632dtakashi alias.o
208651a016b098f4fa1f6279559f104d70f1632dtakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashiSRCS= $(OBJECTS:%.o=%.c)
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiGROUP= bin
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiLDLIBS += -lshell -lcmd -last
353bea4bd4f2d567232d91686f797810bc176f2etakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashiCPPFLAGS = \
208651a016b098f4fa1f6279559f104d70f1632dtakashi $(DTEXTDOM) $(DTS_ERRNO) \
208651a016b098f4fa1f6279559f104d70f1632dtakashi -I$(ROOT)/usr/include/ast \
208651a016b098f4fa1f6279559f104d70f1632dtakashi -I$(ROOT)/usr/include
208651a016b098f4fa1f6279559f104d70f1632dtakashi
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki# Enable workaround for a crash in /usr/bin/alias when invalid
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki# options are passed (e.g. $ /usr/bin/alias -c #). The shell
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki# code will call an error handler which does a |longjmp()| but
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki# somehow the code failed to do the |setjmp()| before this point.
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiCPPFLAGS += -DWORKAROUND_FOR_ALIAS_CRASH
208651a016b098f4fa1f6279559f104d70f1632dtakashi
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiCFLAGS += \
e50dced6f51b101fcf63e1b51ebf771287870107yoshiki $(ASTCFLAGS)
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiCFLAGS64 += \
208651a016b098f4fa1f6279559f104d70f1632dtakashi $(ASTCFLAGS64)
208651a016b098f4fa1f6279559f104d70f1632dtakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashiROOTCMDDIR=$(ROOT)/usr/bin
208651a016b098f4fa1f6279559f104d70f1632dtakashi
353bea4bd4f2d567232d91686f797810bc176f2etakashi# .WAIT is needed to get the hardlinks properly done
e50dced6f51b101fcf63e1b51ebf771287870107yoshikiinstall: all $(ROOTCMD) .WAIT $(ROOTALIASPROG)
208651a016b098f4fa1f6279559f104d70f1632dtakashi
208651a016b098f4fa1f6279559f104d70f1632dtakashi$(PROG): $(OBJECTS)
208651a016b098f4fa1f6279559f104d70f1632dtakashi $(RM) alias
208651a016b098f4fa1f6279559f104d70f1632dtakashi $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
208651a016b098f4fa1f6279559f104d70f1632dtakashi $(POST_PROCESS)
b2e2128a2254db4b0dd7ae022e5616fe4d61db0cyoshiki
b2e2128a2254db4b0dd7ae022e5616fe4d61db0cyoshikiclean clobber:
b2e2128a2254db4b0dd7ae022e5616fe4d61db0cyoshiki rm -f $(PROG) $(OBJECTS)
b2e2128a2254db4b0dd7ae022e5616fe4d61db0cyoshiki
b2e2128a2254db4b0dd7ae022e5616fe4d61db0cyoshikilint _msg:
b2e2128a2254db4b0dd7ae022e5616fe4d61db0cyoshiki