Makefile revision 844
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht#
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# CDDL HEADER START
dcbd586414fbe6a9b4355081269912c864b72991Simon Ulbricht#
d6865474d3248c1d8ed080c221c4a9548b0a4bb3Simon Ulbricht# The contents of this file are subject to the terms of the
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# Common Development and Distribution License (the "License").
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# You may not use this file except in compliance with the License.
d6865474d3248c1d8ed080c221c4a9548b0a4bb3Simon Ulbricht#
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# or http://www.opensolaris.org/os/licensing.
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# See the License for the specific language governing permissions
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# and limitations under the License.
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht#
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# When distributing Covered Code, include this CDDL HEADER in each
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4eefa68fee720a9e28cec9f7e664f0d4f68c4114Simon Ulbricht# If applicable, add the following below this CDDL HEADER, with the
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# fields enclosed by brackets "[]" replaced with your own identifying
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# information: Portions Copyright [yyyy] [name of copyright owner]
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht#
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# CDDL HEADER END
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht#
0b9b34d5c7078caabe393d9433c576613222b579Simon Ulbricht
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht#
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht#
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbrichtinclude ../../make-rules/shared-macros.mk
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbrichtinclude ../../make-rules/shared-targets.mk
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht
af14ce5114c39c964531ebba25cbd46cf70ecd7fSimon UlbrichtCOMPONENT_NAME= zsh
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCOMPONENT_VERSION= 4.3.12
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCOMPONENT_PROJECT_URL= http://www.zsh.org/
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
dd0d471630e5a700970dd61448de1a0b930c5981Simon UlbrichtCOMPONENT_ARCHIVE_HASH= \
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht sha256:4a9fd2dac76fc08fd1dc400deba854fcefa12ad76226d93fb6c01a801324f106
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/zsh/zsh-dev/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht
63e13fba77925b57db0b135f1979cdecd7113ef0Simon Ulbrichtinclude ../../make-rules/prep.mk
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbrichtinclude ../../make-rules/configure.mk
290d722d917f50371735586e68dc4d4045225fa0Simon Ulbrichtinclude ../../make-rules/ips.mk
dd0d471630e5a700970dd61448de1a0b930c5981Simon Ulbricht
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += -n
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --enable-cppflags="$(CPP_LARGEFILES)"
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --enable-dynamic
d6865474d3248c1d8ed080c221c4a9548b0a4bb3Simon UlbrichtCONFIGURE_OPTIONS += --enable-etcdir=/etc
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --enable-function-subdirs
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --enable-ldflags="-zignore"
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --enable-libs="-lnsl"
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --enable-maildir-support
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --enable-multibyte
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --enable-pcre
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtCONFIGURE_OPTIONS += --with-tcsetpgrp
0b9b34d5c7078caabe393d9433c576613222b579Simon UlbrichtCONFIGURE_OPTIONS += --disable-gdbm
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# pcre-config --libs unnecessarily emits "-L/usr/lib -R/usr/lib"; we remove it
dcbd586414fbe6a9b4355081269912c864b72991Simon Ulbricht# so that it doesn't end up in the binaries.
0425e5ed787f937a67a33d20c263fa72409bfe73Simon UlbrichtCOMPONENT_POST_CONFIGURE_ACTION = \
0425e5ed787f937a67a33d20c263fa72409bfe73Simon Ulbricht (cd $(@D); \
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht sed -e 's,-L/usr/lib -R/usr/lib,,' \
0425e5ed787f937a67a33d20c263fa72409bfe73Simon Ulbricht config.status > config.status.new; \
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht mv config.status.new config.status; \
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht chmod 755 config.status; \
0425e5ed787f937a67a33d20c263fa72409bfe73Simon Ulbricht ./config.status)
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht
dcbd586414fbe6a9b4355081269912c864b72991Simon UlbrichtCOMPOVERRIDES = $(shell find Completion -type f -print)
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht$(PROTOETCDIR)/%: % $(PROTOETCDIR)
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht $(INS.file)
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht$(PROTOETCDIR)/zprofile: $(PROTOETCDIR)
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht $(RM) $@; $(SYMLINK) profile $@
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht# makepro.awk leaves turds behind when using gawk 3.1.5 and LANG=en_US.UTF-8.
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht# Upgrading gawk would fix the problem, but for now, all we can do is change
c86cf77506812a2479ce7754d5b483e10a8f0c78Simon Ulbricht# the language.
c86cf77506812a2479ce7754d5b483e10a8f0c78Simon UlbrichtCOMPONENT_BUILD_ENV += LANG=C
c86cf77506812a2479ce7754d5b483e10a8f0c78Simon Ulbricht
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht$(COMPONENT_SRC)/Completion/%: Completion/%
c86cf77506812a2479ce7754d5b483e10a8f0c78Simon Ulbricht $(CP) $< $@
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht
c86cf77506812a2479ce7754d5b483e10a8f0c78Simon Ulbricht$(COMPONENT_SRC)/LICENCE: prep
c86cf77506812a2479ce7754d5b483e10a8f0c78Simon Ulbricht
0b9b34d5c7078caabe393d9433c576613222b579Simon Ulbrichtlicense: $(COMPONENT_SRC)/LICENCE
faa53f457a1847053529e6cdeda3586329815392Simon Ulbricht iconv -f 8859-1 -t utf-8 $< > $@
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht
7d37379cce57a8078407dde00d98867a8109a87aSimon UlbrichtCLEAN_PATHS += license
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# common targets
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbrichtbuild: $(BUILD_32) $(COMPOVERRIDES:%=$(COMPONENT_SRC)/%)
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht
7295fc55bb16da7bc967fdf6d63cdfd03b061127Simon Ulbrichtinstall: build $(INSTALL_32) $(PROTOETCDIR)/zprofile $(PROTOETCDIR)/zshrc license
7295fc55bb16da7bc967fdf6d63cdfd03b061127Simon Ulbricht
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht# build does this always
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbrichttest: $(TEST_32)
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht
366c3a899de56473bd4e714c5079d7a873411605Simon UlbrichtBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
366c3a899de56473bd4e714c5079d7a873411605Simon Ulbricht
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbrichtinclude ../../make-rules/depend.mk
7d37379cce57a8078407dde00d98867a8109a87aSimon Ulbricht