1# 2# CDDL HEADER START 3# 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. 7# 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. 12# 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] 18# 19# CDDL HEADER END 20# 21 22# 23# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# Copyright 2010 Nexenta Systems, Inc. All rights reserved. 27# Copyright (c) 2018, Joyent, Inc. 28# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 29# 30 31PROG= alias 32ALIASPROG= \ 33 bg \ 34 cd \ 35 cksum \ 36 cmp \ 37 comm \ 38 command \ 39 cut \ 40 fc \ 41 fg \ 42 getopts \ 43 hash \ 44 jobs \ 45 join \ 46 kill \ 47 logname \ 48 paste \ 49 print \ 50 read \ 51 rev \ 52 sum \ 53 tee \ 54 test \ 55 type \ 56 ulimit \ 57 umask \ 58 unalias \ 59 uniq \ 60 wait \ 61 wc 62 63XPG4ALIASPROG= \ 64 alias \ 65 bg \ 66 cd \ 67 command \ 68 fc \ 69 fg \ 70 getopts \ 71 hash \ 72 jobs \ 73 kill \ 74 read \ 75 test \ 76 type \ 77 ulimit \ 78 umask \ 79 unalias \ 80 wait 81 82XPG4SH= \ 83 sh 84 85ROOTXPG4ALIAS= \ 86 $(XPG4SH:%=$(ROOTXPG4BIN)/%) $(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%) 87ROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%) 88 89include ../../../Makefile.cmd 90$(SPARC_BLD)include ../../../Makefile.cmd.64 91 92FILEMODE= 555 93CERRWARN += -_gcc=-Wno-parentheses 94 95# not linted 96SMATCH=off 97 98.KEEP_STATE: 99 100all: $(PROG) 101 102$(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%): 103 $(RM) $@; $(SYMLINK) ../../bin/alias $@ 104 105$(XPG4SH:%=$(ROOTXPG4BIN)/%): 106 $(RM) $@; $(SYMLINK) ../../bin/ksh93 $@ 107 108$(ALIASPROG:%=$(ROOTBIN)/%): $(ROOTPROG) 109 $(RM) $@; $(LN) $(ROOTPROG) $@ 110 111# Set common AST build flags (e.g., needed to support the math stuff). 112include ../../Makefile.ast 113 114ASTSRC= $(C_AST)/src/cmd/ksh93 115 116OBJECTS= \ 117 alias.o 118 119SRCS= $(OBJECTS:%.o=%.c) 120 121LDLIBS += -lshell -lcmd -last -lumem 122 123CPPFLAGS= \ 124 $(DTEXTDOM) $(DTS_ERRNO) \ 125 -I$(ASTSRC)/include \ 126 -I$(AST)/libshell/$(MACH) \ 127 -I$(ROOT)/usr/include/ast \ 128 -I$(ROOT)/usr/include 129 130CFLAGS += $(ASTCFLAGS) 131CFLAGS64 += $(ASTCFLAGS64) 132 133ROOTCMDDIR=$(ROOT)/usr/bin 134 135install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTALIASPROG) $(ROOTXPG4ALIAS) 136 137$(PROG): $(OBJECTS) 138 $(RM) alias 139 $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) 140 $(POST_PROCESS) 141 142clean clobber: 143 rm -f $(PROG) $(OBJECTS) 144 145_msg: 146