usr/src/cmd/zsh/Makefile.sfw
author Jon Tibble <meths@btinternet.com>
Mon, 04 May 2015 14:04:39 +0100
branchoi_151a
changeset 254 9c2a4ac793f0
parent 8 950f332cc02b
permissions -rw-r--r--
Bash patch catchup including shellshock

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)Makefile.sfw	1.20	10/02/11 SMI"
#

VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
TARBALL=$(VER).tar.bz2

COMPOVERRIDES:sh = find Completion -type f | grep -v SCCS

include ../Makefile.cmd

all: $(VER)/config.status
	(cd $(VER); env \
	    LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \
	    CC=$(CC) CXX=$(CCC) \
	    "CFLAGS=$(CFLAGS)" \
	    PATH=$(SFW_PATH) \
	    MAKE=$(CCSMAKE) \
	    $(CCSMAKE) -e)
	@find . -name core -exec rm -f {} \;

test:	# there aren't any

install: all $(ROOT)/etc/zshrc $(ROOT)/etc/zprofile
	$(SH) ./install-zsh $(COMPONENT_NAME:sh) $(COMPONENT_VERSION:sh)

LFS_CFLAGS:sh = getconf LFS_CFLAGS

$(VER)/%: %
	$(CP) $< $@

$(ROOT)/etc/zshrc := FILEMODE=0644

$(ROOT)/etc/%: %
	$(INS.file)

$(ROOT)/etc/zprofile:
	$(RM) $@; $(SYMLINK) profile $@

$(VER)/config.status: $(VER)/configure
	(cd $(VER); env \
	    CC=$(CC) CXX=$(CCC) \
	    "CFLAGS=$(CFLAGS)" \
	    PATH=$(SFW_PATH) \
	    MAKE=$(CCSMAKE) \
	    ./configure -n $(CONFIGURE_OPTIONS) \
		--enable-cppflags="-I$(ROOT)/usr/include/pcre $(LFS_CFLAGS)" \
		--enable-dynamic \
		--enable-etcdir=/etc \
		--enable-function-subdirs \
		--enable-ldflags="-zignore -L$(ROOT)/usr/lib" \
		--enable-maildir-support \
		--enable-multibyte \
		--enable-pcre \
		--with-tcsetpgrp \
		--disable-gdbm)
	cd $(VER); \
	sed -e 's,-L/usr/lib -R/usr/lib,,' \
		config.status > config.status.new; \
	mv config.status.new config.status; \
	chmod 755 config.status; \
	./config.status

$(VER)/configure: $(VER)/.patched $(COMPOVERRIDES:%=$(VER)/%)
	touch $@

clean:
	-rm -rf $(VER)

include ../Makefile.targ