Makefile revision 844
79d4b708d021714647aab8b138ae671ed24765cewrowe#
ec79b29695b183f794264bbb578c51e93d1f9b1emartin# CDDL HEADER START
6aa2272cc4af77e605ba2c4a4781f8567408b7e3pquerna#
ee508128c414648982d1cca7801f63b01a0a4f8aminfrin# The contents of this file are subject to the terms of the
88a69c2c895d959ba4120a8ccaddfe603d6ee2c0wrowe# Common Development and Distribution License (the "License").
c7f65019a793b500f0e61d1be5c08d041c543470wrowe# You may not use this file except in compliance with the License.
88a69c2c895d959ba4120a8ccaddfe603d6ee2c0wrowe#
4f15e478033a94d4b2eb3c9cb55c4008806ecd18wrowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4f15e478033a94d4b2eb3c9cb55c4008806ecd18wrowe# or http://www.opensolaris.org/os/licensing.
4f15e478033a94d4b2eb3c9cb55c4008806ecd18wrowe# See the License for the specific language governing permissions
4f15e478033a94d4b2eb3c9cb55c4008806ecd18wrowe# and limitations under the License.
7aa189407cc993c97b31167201319a9ab2e1715ewrowe#
7aa189407cc993c97b31167201319a9ab2e1715ewrowe# When distributing Covered Code, include this CDDL HEADER in each
7aa189407cc993c97b31167201319a9ab2e1715ewrowe# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7e5a8c14bf68438e4098f74999e154d157e33eb7wrowe# If applicable, add the following below this CDDL HEADER, with the
7e5a8c14bf68438e4098f74999e154d157e33eb7wrowe# fields enclosed by brackets "[]" replaced with your own identifying
7e5a8c14bf68438e4098f74999e154d157e33eb7wrowe# information: Portions Copyright [yyyy] [name of copyright owner]
79d4b708d021714647aab8b138ae671ed24765cewrowe#
79d4b708d021714647aab8b138ae671ed24765cewrowe# CDDL HEADER END
79d4b708d021714647aab8b138ae671ed24765cewrowe#
79d4b708d021714647aab8b138ae671ed24765cewrowe# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
79d4b708d021714647aab8b138ae671ed24765cewrowe#
79d4b708d021714647aab8b138ae671ed24765cewroweinclude ../../make-rules/shared-macros.mk
6666167d402bfbfe002ab2626b788f5822e831e6niq
6666167d402bfbfe002ab2626b788f5822e831e6niqCOMPONENT_NAME= emacs
6666167d402bfbfe002ab2626b788f5822e831e6niqCOMPONENT_VERSION= 23.4
88d0e50f16b21d4d0af0a48da7ad28fb5991834crpluemCOMPONENT_PROJECT_URL= http://www.gnu.org/software/emacs/
88d0e50f16b21d4d0af0a48da7ad28fb5991834crpluemCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
88d0e50f16b21d4d0af0a48da7ad28fb5991834crpluemCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
88d0e50f16b21d4d0af0a48da7ad28fb5991834crpluemCOMPONENT_ARCHIVE_HASH= \
15264721069299ec26493e21d56bf8ff7faf6f0drpluem sha256:26576f9e664397c729f78f5ffcd092969251988461896fe8793062346ee988b9
15264721069299ec26493e21d56bf8ff7faf6f0drpluemCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/emacs/$(COMPONENT_ARCHIVE)
15264721069299ec26493e21d56bf8ff7faf6f0drpluem
11e1b16b907afb7de0678e28fe4849d9029e2df8rplueminclude ../../make-rules/prep.mk
11e1b16b907afb7de0678e28fe4849d9029e2df8rplueminclude ../../make-rules/configure.mk
11e1b16b907afb7de0678e28fe4849d9029e2df8rplueminclude ../../make-rules/ips.mk
11e1b16b907afb7de0678e28fe4849d9029e2df8rpluem
d4d8fbf75076eccfed70c8f715f7ed4210ab5ccdbnicholes# we build three different variants of emacs for our users. As Solaris
a085f5ab771cff650b27e7a761b7f19adf884686rpluem# always has a 64-bit kernel, and 64-bit emacs can handle larger files,
a085f5ab771cff650b27e7a761b7f19adf884686rpluem# we only build and deliver 64-bit binaries.
a085f5ab771cff650b27e7a761b7f19adf884686rpluemVARIANTS = nox x gtk
25a81ea1bca1c89cda713c4d23660e487b1488a0rpluem
25a81ea1bca1c89cda713c4d23660e487b1488a0rpluemBUILD_64 = $(VARIANTS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
25a81ea1bca1c89cda713c4d23660e487b1488a0rpluemINSTALL_64 = $(VARIANTS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd# emacs creates a directory in usr/lib/emacs/$(COMPONENT_VERSION) that
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd# contains the platform name. Although the name is platform dependent,
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd# the files inside it are the same on all platforms. By adding this
48fa058fe468025347930610ac2473094fa0f4e4chrisd# to the pkgmogrify macros, we can write our manifests in a portable way.
48fa058fe468025347930610ac2473094fa0f4e4chrisdEMACS_ULEV_PFX = $(MACH:sparc=sparc-sun)
48fa058fe468025347930610ac2473094fa0f4e4chrisdEMACS_ULEVDIR = $(EMACS_ULEV_PFX:i386=x86_64-pc)-solaris$(SOLARIS_VERSION)
42ace93dfd997e0c9b4fbae8185288320e95eb72rpluemPKG_MACROS += EMACS_ULEVDIR=$(EMACS_ULEVDIR)
3545f87968bf3ac4e691030f816c4360bdf83eacrpluem
42ace93dfd997e0c9b4fbae8185288320e95eb72rpluem# LD_OPTIONS is defined to apply desirable link-editor options to Userland
3ec4328f079d8867cc323155e59678ad9437914frooneg# components. Non-executable stack and data break sparc emacs.
3ec4328f079d8867cc323155e59678ad9437914frooneg#
3ec4328f079d8867cc323155e59678ad9437914froonegLD_MAP_NOEXSTK.sparc=
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisdLD_MAP_NOEXDATA.sparc=
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd# This code is built with gcc. The primary reason for this is that the
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd# configure script has problems using a non-GNU cpp. I am not aware of
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd# any reason Sun Studio could not be made to work, but simply made a
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisd# cost/benefit decision not to pursue it at this time
de0d0b50c96fae59c28e09fed61b0d15cfa4147bchrisdCOMPILER = gcc
cd59ac5e8f739afbdcd523c649550f7dce1709ceniq
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemme# Uncomment this for debugging only. It configures emacs to run from the
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemme# local proto instead of from its final installed location.
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemme#CONFIGURE_PREFIX = $(PROTO_DIR)/usr
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemme
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemme# The configure script runs the pkg-config command. Since we're building
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemme# 64-bit executables, we need pkg-config to use the 64-bit metadata files
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemmeCONFIGURE_ENV += PKG_CONFIG_PATH=/usr/lib/$(MACH64)/pkgconfig
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemme
60262a02cfeba50d60d990b56d0e0c1d1fafb672sctemme# configure options common to all variants of emacs that we want to build.
3ddec0f3e161d5a5afab12c522d92c44e4d7d8fcgregamesCONFIGURE_OPTIONS += CC="$(CC) -m64"
3ddec0f3e161d5a5afab12c522d92c44e4d7d8fcgregamesCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
3ddec0f3e161d5a5afab12c522d92c44e4d7d8fcgregamesCONFIGURE_OPTIONS += --datarootdir=$(CONFIGURE_PREFIX)/share
3ddec0f3e161d5a5afab12c522d92c44e4d7d8fcgregamesCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
db78659055df54243bca678c35bd2ce7e31a9237roonegCONFIGURE_OPTIONS += --with-gif=no
edf6757df85878dc8ce11fb3840ee4cde6de5b2froonegCONFIGURE_OPTIONS += ac_cv_sys_long_file_names=yes
db78659055df54243bca678c35bd2ce7e31a9237rooneg
95817edd05387a5276f51fcd5db79fc21b89b55brooneg# variant specific configure options
95817edd05387a5276f51fcd5db79fc21b89b55brooneg$(BUILD_DIR)/%-nox/.configured: CONFIGURE_OPTIONS += --without-x
95817edd05387a5276f51fcd5db79fc21b89b55brooneg$(BUILD_DIR)/%-x/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=lucid
63689d77e084e36b8194fb6df5adfc0344965e01trawick$(BUILD_DIR)/%-gtk/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=gtk
63689d77e084e36b8194fb6df5adfc0344965e01trawick
63689d77e084e36b8194fb6df5adfc0344965e01trawick# we need to build all variants, but only have to install one in order
63689d77e084e36b8194fb6df5adfc0344965e01trawick# to get the common files shared by all. We use COMPONENT_POST_INSTALL_ACTION
5714cdd83e23557d801437daa5e3ab8ba78ae595jorton# to remove unwanted files, copy the emacs binaries from the other tookit
5714cdd83e23557d801437daa5e3ab8ba78ae595jorton# builds into place, and install the additional files we provide.
5714cdd83e23557d801437daa5e3ab8ba78ae595jorton#
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes# Note that this tweaking is not required, as the proto need not match
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes# the packaging. However, doing it this way allows us to examine the proto
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes# as a finished and complete product, simplifies debugging emacs, and
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes# facilitates the use of 'gmake sample-manifest'.
a1a615ca49b162d71d88089210395c9a9cfeb539rpluemPBIN= $(PROTO_DIR)/usr/bin
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesPETC= $(PROTO_DIR)/usr/share/emacs/$(COMPONENT_VERSION)/etc
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesPGBIN= $(PROTO_DIR)/usr/gnu/bin
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesPGSHAREMAN1= $(PROTO_DIR)/usr/gnu/share/man/man1
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesPSHAREMAN1= $(PROTO_DIR)/usr/share/man/man1
a1a615ca49b162d71d88089210395c9a9cfeb539rpluemPVAR= $(PROTO_DIR)/var
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes# Remove emacs existing emacs executables/script from usr/bin
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesCOMPONENT_POST_INSTALL_ACTION += $(RM) $(PBIN)/emacs $(PBIN)/emacs-* ;
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
a1a615ca49b162d71d88089210395c9a9cfeb539rpluem# GTK binaries
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesCOMPONENT_POST_INSTALL_ACTION += \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(CP) $(BUILD_DIR)/$(MACH64)-gtk/src/emacs-$(COMPONENT_VERSION).1 \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(PBIN)/emacs-gtk ;
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesCOMPONENT_POST_INSTALL_ACTION += \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(LN) $(PBIN)/emacs-gtk $(PBIN)/emacs-gtk-$(COMPONENT_VERSION) ;
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes# Non-X11 binaries
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesCOMPONENT_POST_INSTALL_ACTION += \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(CP) $(BUILD_DIR)/$(MACH64)-nox/src/emacs-$(COMPONENT_VERSION).1 \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(PBIN)/emacs-nox ;
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholesCOMPONENT_POST_INSTALL_ACTION += \
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes $(LN) $(PBIN)/emacs-nox $(PBIN)/emacs-nox-$(COMPONENT_VERSION) ;
69c36bbae91de0e99a682aaae9d6fa61fceb2771bnicholes
a1a615ca49b162d71d88089210395c9a9cfeb539rpluem# X11 (Athena) binaries
1b0dce86d7fc8a5aa4c89b05255be26e508c615crpluemCOMPONENT_POST_INSTALL_ACTION += \
1b0dce86d7fc8a5aa4c89b05255be26e508c615crpluem $(CP) $(BUILD_DIR)/$(MACH64)-x/src/emacs-$(COMPONENT_VERSION).1 \
1b0dce86d7fc8a5aa4c89b05255be26e508c615crpluem $(PBIN)/emacs-x ;
1b0dce86d7fc8a5aa4c89b05255be26e508c615crpluemCOMPONENT_POST_INSTALL_ACTION += \
edc5389f50ce4153e6192740f3c7a188c8cf8d67niq $(LN) $(PBIN)/emacs-x $(PBIN)/emacs-x-$(COMPONENT_VERSION) ;
edc5389f50ce4153e6192740f3c7a188c8cf8d67niq
6c05afd314b4ddd545d63b4ff5de822cc30eec79trawick# Emacs shell script that picks the right variant at runtime
6c05afd314b4ddd545d63b4ff5de822cc30eec79trawickCOMPONENT_POST_INSTALL_ACTION += $(CP) augment/emacs $(PBIN) ;
6c05afd314b4ddd545d63b4ff5de822cc30eec79trawickCOMPONENT_POST_INSTALL_ACTION += $(CHMOD) +x $(PBIN)/emacs ;
13cd67e9c1dacbd6b9f040bda337c725cedd98f3brianp
13cd67e9c1dacbd6b9f040bda337c725cedd98f3brianp# ctags and etags go in /usr/gnu/bin instead of /usr/bin
a623efbff95aab78da9e030524b0fa69b054f6d0brianpCOMPONENT_POST_INSTALL_ACTION += $(MKDIR) $(PGBIN) ;
a623efbff95aab78da9e030524b0fa69b054f6d0brianpCOMPONENT_POST_INSTALL_ACTION += $(MV) $(PBIN)/ctags $(PBIN)/etags $(PGBIN) ;
a623efbff95aab78da9e030524b0fa69b054f6d0brianp
a623efbff95aab78da9e030524b0fa69b054f6d0brianp# We do not install the files under /var/games/emacs. The reason for
a623efbff95aab78da9e030524b0fa69b054f6d0brianp# this is that we do not install update-game-score as setuid, and
a623efbff95aab78da9e030524b0fa69b054f6d0brianp# therefore the game files are not usable. This the same decision made
0b4b04d8621478ba59f0a6ba2950ddc02ab92b58colm# by Debian, among others.
0b4b04d8621478ba59f0a6ba2950ddc02ab92b58colmCOMPONENT_POST_INSTALL_ACTION += $(RM) -r $(PVAR) ;
0b4b04d8621478ba59f0a6ba2950ddc02ab92b58colm
2f1bb5376c5c4022383bb729679ca751dd75a2eabrianp# The file usr/share/emacs/23.1/etc/DOC-23.1.2 gets installed instead of
2f1bb5376c5c4022383bb729679ca751dd75a2eabrianp# DOC-23.1.1. Remove and replace.
ad862ab5716726a2d72a292ba1dfb29566c86153brianpCOMPONENT_POST_INSTALL_ACTION += $(RM) $(PETC)/DOC-$(COMPONENT_VERSION).2 ;
ad862ab5716726a2d72a292ba1dfb29566c86153brianpCOMPONENT_POST_INSTALL_ACTION += \
ad862ab5716726a2d72a292ba1dfb29566c86153brianp $(CP) $(BUILD_DIR)/$(MACH64)-x/etc/DOC-$(COMPONENT_VERSION).1 \
17d53ea32c4968e47733f1c2c063ae07d280efd6jerenkrantz $(PETC)/DOC-$(COMPONENT_VERSION).1 ;
17d53ea32c4968e47733f1c2c063ae07d280efd6jerenkrantz
17d53ea32c4968e47733f1c2c063ae07d280efd6jerenkrantzCOMPONENT_POST_INSTALL_ACTION += \
2d5532b13110a8d85653da92e97795b09cc25cc2trawick $(CP) augment/man/man1/emacs-gtk.1 $(PSHAREMAN1)/emacs-gtk.1 ;
b38565306421ff53e9f7499bc728d6df5cec294dpquernaCOMPONENT_POST_INSTALL_ACTION += \
b38565306421ff53e9f7499bc728d6df5cec294dpquerna $(CP) augment/man/man1/emacs-nox.1 $(PSHAREMAN1)/emacs-nox.1 ;
b38565306421ff53e9f7499bc728d6df5cec294dpquernaCOMPONENT_POST_INSTALL_ACTION += \
b38565306421ff53e9f7499bc728d6df5cec294dpquerna $(CP) augment/man/man1/emacs-x.1 $(PSHAREMAN1)/emacs-x.1 ;
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluem
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluemCOMPONENT_POST_INSTALL_ACTION += $(MKDIR) $(PGSHAREMAN1) ;
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluemCOMPONENT_POST_INSTALL_ACTION += \
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluem $(CP) $(COMPONENT_SRC)/doc/man/ctags.1 $(PGSHAREMAN1)/ctags.1 ;
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluemCOMPONENT_POST_INSTALL_ACTION += \
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluem $(CP) $(COMPONENT_SRC)/doc/man/etags.1 $(PGSHAREMAN1)/etags.1 ;
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluem
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluem# Throw away usr/share/info/dir. This file is the topmost node of the Info
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluem# hierarchy. Emacs builds it, as presumably do all GNU packages, but on
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluem# Solaris, it is delivered by system/prerequisite/gnu.
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluemCOMPONENT_POST_INSTALL_ACTION += $(RM) $(PROTO_DIR)/usr/share/info/dir ;
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluem
a9e9e4d9b1e6bb081282f75bf450b7d7d5a1f581rpluem
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluem# common targets
200fd0ce73d992a43b500ddfe94487a840bd56darpluembuild: $(BUILD_64)
200fd0ce73d992a43b500ddfe94487a840bd56darpluem
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rplueminstall: $(BUILD_64) $(BUILD_DIR)/$(MACH64)-x/.installed
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluem
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluemtest:
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluem @echo "no tests available"
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluem
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluemBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluem
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rplueminclude ../../make-rules/depend.mk
0c5a6a11ce72ad41b14c755f4a2254e0c7b70245rpluem