Makefile revision 1258
0N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
0N/A# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/Ainclude ../../make-rules/shared-macros.mk
0N/A
0N/ACOMPONENT_NAME= emacs
0N/ACOMPONENT_VERSION= 23.4
0N/ACOMPONENT_PROJECT_URL= http://www.gnu.org/software/emacs/
0N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
0N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
0N/ACOMPONENT_ARCHIVE_HASH= \
0N/A sha256:26576f9e664397c729f78f5ffcd092969251988461896fe8793062346ee988b9
0N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/emacs/$(COMPONENT_ARCHIVE)
0N/ACOMPONENT_BUGDB= utility/emacs
0N/A
0N/Ainclude ../../make-rules/prep.mk
0N/Ainclude ../../make-rules/configure.mk
0N/Ainclude ../../make-rules/ips.mk
0N/A
0N/A# we build three different variants of emacs for our users. As Solaris
0N/A# always has a 64-bit kernel, and 64-bit emacs can handle larger files,
0N/A# we only build and deliver 64-bit binaries.
0N/AVARIANTS = nox x gtk
0N/A
0N/ABUILD_64 = $(VARIANTS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
0N/AINSTALL_64 = $(VARIANTS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
0N/A
0N/A# emacs creates a directory in usr/lib/emacs/$(COMPONENT_VERSION) that
0N/A# contains the platform name. Although the name is platform dependent,
47N/A# the files inside it are the same on all platforms. By adding this
0N/A# to the pkgmogrify macros, we can write our manifests in a portable way.
0N/AEMACS_ULEV_PFX = $(MACH:sparc=sparc-sun)
0N/AEMACS_ULEVDIR = $(EMACS_ULEV_PFX:i386=x86_64-pc)-solaris$(SOLARIS_VERSION)
0N/APKG_MACROS += EMACS_ULEVDIR=$(EMACS_ULEVDIR)
0N/A
0N/A# LD_OPTIONS is defined to apply desirable link-editor options to Userland
0N/A# components. Non-executable stack and data break sparc emacs.
0N/A#
0N/ALD_MAP_NOEXSTK.sparc=
0N/ALD_MAP_NOEXDATA.sparc=
0N/A
0N/A# This code is built with gcc. The primary reason for this is that the
0N/A# configure script has problems using a non-GNU cpp. I am not aware of
0N/A# any reason Sun Studio could not be made to work, but simply made a
0N/A# cost/benefit decision not to pursue it at this time
0N/ACOMPILER = gcc
0N/A
0N/A# Uncomment this for debugging only. It configures emacs to run from the
0N/A# local proto instead of from its final installed location.
0N/A#CONFIGURE_PREFIX = $(PROTO_DIR)/usr
0N/A
0N/A# The configure script runs the pkg-config command. Since we're building
0N/A# 64-bit executables, we need pkg-config to use the 64-bit metadata files
0N/ACONFIGURE_ENV += PKG_CONFIG_PATH=/usr/lib/$(MACH64)/pkgconfig
0N/A
0N/A# configure options common to all variants of emacs that we want to build.
0N/ACONFIGURE_OPTIONS += CC="$(CC) -m64"
0N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
0N/ACONFIGURE_OPTIONS += --datarootdir=$(CONFIGURE_PREFIX)/share
0N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
0N/ACONFIGURE_OPTIONS += --with-gif=no
0N/ACONFIGURE_OPTIONS += ac_cv_sys_long_file_names=yes
0N/A
0N/A# variant specific configure options
0N/A$(BUILD_DIR)/%-nox/.configured: CONFIGURE_OPTIONS += --without-x
0N/A$(BUILD_DIR)/%-x/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=lucid
0N/A$(BUILD_DIR)/%-gtk/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=gtk
27N/A
0N/A# we need to build all variants, but only have to install one in order
0N/A# to get the common files shared by all. We use COMPONENT_POST_INSTALL_ACTION
0N/A# to remove unwanted files, copy the emacs binaries from the other tookit
0N/A# builds into place, and install the additional files we provide.
0N/A#
0N/A# Note that this tweaking is not required, as the proto need not match
0N/A# the packaging. However, doing it this way allows us to examine the proto
0N/A# as a finished and complete product, simplifies debugging emacs, and
0N/A# facilitates the use of 'gmake sample-manifest'.
0N/APBIN= $(PROTO_DIR)/usr/bin
0N/APETC= $(PROTO_DIR)/usr/share/emacs/$(COMPONENT_VERSION)/etc
0N/APGBIN= $(PROTO_DIR)/usr/gnu/bin
0N/APGSHAREMAN1= $(PROTO_DIR)/usr/gnu/share/man/man1
0N/APSHAREMAN1= $(PROTO_DIR)/usr/share/man/man1
0N/APVAR= $(PROTO_DIR)/var
0N/A
0N/A# Remove emacs existing emacs executables/script from usr/bin
0N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) $(PBIN)/emacs $(PBIN)/emacs-* ;
0N/A
0N/A# GTK binaries
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) $(BUILD_DIR)/$(MACH64)-gtk/src/emacs-$(COMPONENT_VERSION).1 \
0N/A $(PBIN)/emacs-gtk ;
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(LN) $(PBIN)/emacs-gtk $(PBIN)/emacs-gtk-$(COMPONENT_VERSION) ;
0N/A
0N/A# Non-X11 binaries
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) $(BUILD_DIR)/$(MACH64)-nox/src/emacs-$(COMPONENT_VERSION).1 \
9N/A $(PBIN)/emacs-nox ;
9N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(LN) $(PBIN)/emacs-nox $(PBIN)/emacs-nox-$(COMPONENT_VERSION) ;
0N/A
0N/A# X11 (Athena) binaries
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) $(BUILD_DIR)/$(MACH64)-x/src/emacs-$(COMPONENT_VERSION).1 \
0N/A $(PBIN)/emacs-x ;
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(LN) $(PBIN)/emacs-x $(PBIN)/emacs-x-$(COMPONENT_VERSION) ;
0N/A
0N/A# Emacs shell script that picks the right variant at runtime
0N/ACOMPONENT_POST_INSTALL_ACTION += $(CP) augment/emacs $(PBIN) ;
0N/ACOMPONENT_POST_INSTALL_ACTION += $(CHMOD) +x $(PBIN)/emacs ;
0N/A
0N/A# ctags and etags go in /usr/gnu/bin instead of /usr/bin
0N/ACOMPONENT_POST_INSTALL_ACTION += $(MKDIR) $(PGBIN) ;
0N/ACOMPONENT_POST_INSTALL_ACTION += $(MV) $(PBIN)/ctags $(PBIN)/etags $(PGBIN) ;
0N/A
0N/A# We do not install the files under /var/games/emacs. The reason for
0N/A# this is that we do not install update-game-score as setuid, and
0N/A# therefore the game files are not usable. This the same decision made
0N/A# by Debian, among others.
0N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) -r $(PVAR) ;
0N/A
0N/A# The file usr/share/emacs/23.1/etc/DOC-23.1.2 gets installed instead of
0N/A# DOC-23.1.1. Remove and replace.
0N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) $(PETC)/DOC-$(COMPONENT_VERSION).2 ;
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) $(BUILD_DIR)/$(MACH64)-x/etc/DOC-$(COMPONENT_VERSION).1 \
0N/A $(PETC)/DOC-$(COMPONENT_VERSION).1 ;
0N/A
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) augment/man/man1/emacs-gtk.1 $(PSHAREMAN1)/emacs-gtk.1 ;
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) augment/man/man1/emacs-nox.1 $(PSHAREMAN1)/emacs-nox.1 ;
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) augment/man/man1/emacs-x.1 $(PSHAREMAN1)/emacs-x.1 ;
0N/A
0N/ACOMPONENT_POST_INSTALL_ACTION += $(MKDIR) $(PGSHAREMAN1) ;
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) $(COMPONENT_SRC)/doc/man/ctags.1 $(PGSHAREMAN1)/ctags.1 ;
0N/ACOMPONENT_POST_INSTALL_ACTION += \
0N/A $(CP) $(COMPONENT_SRC)/doc/man/etags.1 $(PGSHAREMAN1)/etags.1 ;
0N/A
0N/A# Throw away usr/share/info/dir. This file is the topmost node of the Info
0N/A# hierarchy. Emacs builds it, as presumably do all GNU packages, but on
0N/A# Solaris, it is delivered by system/prerequisite/gnu.
0N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) $(PROTO_DIR)/usr/share/info/dir ;
0N/A
0N/A
0N/A# common targets
0N/Abuild: $(BUILD_64)
0N/A
0N/Ainstall: $(BUILD_64) $(BUILD_DIR)/$(MACH64)-x/.installed
0N/A
0N/Atest:
0N/A @echo "no tests available"
0N/A
0N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
0N/A
43N/Ainclude ../../make-rules/depend.mk
0N/A