Makefile revision 99
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or http://www.opensolaris.org/os/licensing.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/shared-macros.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/shared-targets.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_NAME= zsh
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_VERSION= 4.3.10
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_HASH= sha1:132f9ce411bf318abccbae9cdc2f8cc14f8be85b
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/zsh/zsh-dev/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/prep.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/configure.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/ips.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += -n
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-cppflags="$(CPP_LARGEFILES)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-dynamic
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-etcdir=/etc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-function-subdirs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-ldflags="-zignore"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-maildir-support
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-multibyte
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-pcre
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --with-tcsetpgrp
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --disable-gdm
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# pcre-config --libs unnecessarily emits "-L/usr/lib -R/usr/lib"; we remove it
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# so that it doesn't end up in the binaries.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_POST_CONFIGURE_ACTION = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (cd $(@D); \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sed -e 's,-L/usr/lib -R/usr/lib,,' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews config.status > config.status.new; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mv config.status.new config.status; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews chmod 755 config.status; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ./config.status)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPOVERRIDES = $(shell find Completion -type f -print)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(PROTOETCDIR)/%: % $(PROTOETCDIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(INS.file)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(PROTOETCDIR)/zprofile: $(PROTOETCDIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(RM) $@; $(SYMLINK) profile $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# makepro.awk leaves turds behind when using gawk 3.1.5 and LANG=en_US.UTF-8.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Upgrading gawk would fix the problem, but for now, all we can do is change
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the language.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_BUILD_ENV += LANG=C
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(COMPONENT_SRC)/Completion/%: Completion/%
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(CP) $< $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(COMPONENT_SRC)/LICENCE: prep
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewslicense: $(COMPONENT_SRC)/LICENCE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews iconv -f 8859-1 -t utf-8 $< > $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCLEAN_PATHS += license
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# common targets
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbuild: $(BUILD_32) $(COMPOVERRIDES:%=$(COMPONENT_SRC)/%)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall: build $(INSTALL_32) $(PROTOETCDIR)/zprofile $(PROTOETCDIR)/zshrc license
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# build does this always
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewstest:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/depend.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews