author | Alan Coopersmith <Alan.Coopersmith@Sun.COM> |
Wed, 25 Jul 2007 12:48:36 -0700 | |
changeset 191 | 8c3443e72486 |
parent 156 | 1dec9ce4addc |
child 355 | a3a81e9c227d |
permissions | -rw-r--r-- |
90
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
1 |
############################################################################### |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
2 |
# |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
3 |
# Xpm Makefile |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
4 |
# |
156
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
90
diff
changeset
|
5 |
# Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
90
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
6 |
# Use subject to license terms. |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
7 |
# |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
8 |
# Permission is hereby granted, free of charge, to any person obtaining a |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
9 |
# copy of this software and associated documentation files (the |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
10 |
# "Software"), to deal in the Software without restriction, including |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
11 |
# without limitation the rights to use, copy, modify, merge, publish, |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
12 |
# distribute, and/or sell copies of the Software, and to permit persons |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
13 |
# to whom the Software is furnished to do so, provided that the above |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
14 |
# copyright notice(s) and this permission notice appear in all copies of |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
15 |
# the Software and that both the above copyright notice(s) and this |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
16 |
# permission notice appear in supporting documentation. |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
17 |
# |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
18 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
19 |
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
20 |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
21 |
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
22 |
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
23 |
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
24 |
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
25 |
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
26 |
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
27 |
# |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
28 |
# Except as contained in this notice, the name of a copyright holder |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
29 |
# shall not be used in advertising or otherwise to promote the sale, use |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
30 |
# or other dealings in this Software without prior written authorization |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
31 |
# of the copyright holder. |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
32 |
# |
191
8c3443e72486
6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
156
diff
changeset
|
33 |
# @(#)Makefile 1.6 07/07/20 |
90
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
34 |
# |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
35 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
36 |
PWD:sh=pwd |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
37 |
TOP=$(PWD)/../.. |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
38 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
39 |
# Package name used in tarballs |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
40 |
MODULE_NAME=libXpm |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
41 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
42 |
# Version number (used in path names) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
43 |
MODULE_VERS=3.5.6 |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
44 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
45 |
# Patches to apply to source after unpacking, in order |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
46 |
SOURCE_PATCHES = gettext.patch,-p1 |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
47 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
48 |
# Source tarball |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
49 |
SOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERS).tar.bz2 |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
50 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
51 |
# Download site for source |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
52 |
SOURCE_URL=$(XORG_RELEASES_URL)/lib/$(SOURCE_TARBALL_NAME) |
156
1dec9ce4addc
6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
90
diff
changeset
|
53 |
SOURCE_URL_SET=yes |
90
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
54 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
55 |
# Directory created by unpacking source |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
56 |
SOURCE_DIR=$(BUILD_DIR)/$(MODULE_NAME)-$(MODULE_VERS) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
57 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
58 |
# Where to install files |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
59 |
APP_prefix=$(X11_DIR) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
60 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
61 |
# man pages to apply Sun footer to & attributes to list |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
62 |
SUNTOUCHED_MANPAGES=cxpm/cxpm.man sxpm/sxpm.man |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
63 |
SUNTOUCH_MAN_FLAGS= -p $(APP_prefix)/bin/ \ |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
64 |
-a '{Availability, SUNWxwplt} {Interface Stability, Uncommitted}' |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
65 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
66 |
include $(TOP)/common/Makefile.inc |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
67 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
68 |
# Command line options to GNU autoconf configure script |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
69 |
CONFIG_OPTS = --prefix=$(APP_prefix) --mandir='$${prefix}/share/man' \ |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
70 |
$(APP_CONFIG_OPTS) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
71 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
72 |
# Environment variable options to GNU autoconf configure script |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
73 |
CONFIG_ENV = CC=$(CC) CFLAGS="$(PROG_CFLAGS)" LD="$(LD) $(LDFLAGS)" \ |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
74 |
CPPFLAGS="-I $(PROTODIR)$(X11_INCLUDES_DIR)" \ |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
75 |
LDFLAGS="$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)" \ |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
76 |
PKG_CONFIG_PATH=$(PROTODIR)/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
77 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
78 |
# Run configure script |
191
8c3443e72486
6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
156
diff
changeset
|
79 |
$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET) autoreconf |
8c3443e72486
6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
156
diff
changeset
|
80 |
(cd $(SOURCE_DIR) && $(CONFIG_ENV) ./configure $(CONFIG_OPTS) ) |
90
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
81 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
82 |
# Binary built in tree |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
83 |
APP_BIN=$(SOURCE_DIR)/cxpm/cxpm $(SOURCE_DIR)/sxpm/sxpm |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
84 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
85 |
build_gen: $(APP_BIN) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
86 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
87 |
$(APP_BIN): $(SOURCE_DIR)/Makefile |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
88 |
(cd $(SOURCE_DIR) ; $(MAKE) $(MFLAGS)) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
89 |
|
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
90 |
install_gen: $(APP_BIN) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
91 |
(cd $(SOURCE_DIR)/cxpm ; $(MAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) install) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
92 |
(cd $(SOURCE_DIR)/sxpm ; $(MAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) install) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
93 |
mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
94 |
(cd $(SOURCE_DIR)/cxpm ; cp -p cxpm.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)) |
aa93b75745de
6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
95 |
(cd $(SOURCE_DIR)/sxpm ; cp -p sxpm.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)) |