open-src/common/Makefile.inc
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Mon, 15 Sep 2008 16:17:12 -0700
changeset 536 25f17a95d600
parent 494 549ab2aae6ae
child 561 3c2df35483af
permissions -rw-r--r--
6748141 SUNWxwfnt, SUNWxwcft, SUNWxwoft installs fail due to libfont.so.1: open failed 6748519 Move installalias to open-src & port to libXfont
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     1
# -*- Makefile -*- rules commonly shared among X consolidation open source dirs
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     2
#
291
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
     3
# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
# Use subject to license terms.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     6
# Permission is hereby granted, free of charge, to any person obtaining a
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     7
# copy of this software and associated documentation files (the
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     8
# "Software"), to deal in the Software without restriction, including
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     9
# without limitation the rights to use, copy, modify, merge, publish,
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    10
# distribute, and/or sell copies of the Software, and to permit persons
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    11
# to whom the Software is furnished to do so, provided that the above
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    12
# copyright notice(s) and this permission notice appear in all copies of
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    13
# the Software and that both the above copyright notice(s) and this
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    14
# permission notice appear in supporting documentation.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    15
# 
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    17
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    18
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    19
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    20
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    21
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    22
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
# 
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
# Except as contained in this notice, the name of a copyright holder
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
# shall not be used in advertising or otherwise to promote the sale, use
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
# or other dealings in this Software without prior written authorization
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
# of the copyright holder.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    30
#
536
25f17a95d600 6748141 SUNWxwfnt, SUNWxwcft, SUNWxwoft installs fail due to libfont.so.1: open failed
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 494
diff changeset
    31
# @(#)Makefile.inc	1.93	08/09/15
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    32
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    34
### Default rules
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    35
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    36
# Which compiler to use to build module
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    37
MODTYPE_COMPILER_DEFAULT	= $(MODTYPE_COMPILER_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    38
$(MODTYPE_COMPILER_DEFAULT)	MODTYPE_COMPILER = $(DEFAULT_COMPILER)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    39
MODULE_COMPILER_DEFAULT		= $(MODULE_COMPILER_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    40
$(MODULE_COMPILER_DEFAULT)	MODULE_COMPILER = $(MODTYPE_COMPILER)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    42
# Which make to use to build module
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    43
MODTYPE_MAKE_DEFAULT		= $(MODTYPE_MAKE_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    44
$(MODTYPE_MAKE_DEFAULT)		MODTYPE_MAKE = $(MAKE)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    45
MODULE_MAKE_DEFAULT		= $(MODULE_MAKE_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    46
$(MODULE_MAKE_DEFAULT)		MODULE_MAKE = $(MODTYPE_MAKE)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    47
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    48
# Where to install files
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    49
MODTYPE_PREFIX_DEFAULT		= $(MODTYPE_PREFIX_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    50
$(MODULE_PREFIX_DEFAULT)	MODTYPE_PREFIX=$(X11_DIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    51
MODULE_PREFIX_DEFAULT		= $(MODULE_PREFIX_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    52
$(MODULE_PREFIX_DEFAULT)	MODULE_PREFIX=$(MODTYPE_PREFIX)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    53
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    54
# Directory created by unpacking source, if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    55
SOURCE_DIRNAME_DEFAULT		= $(SOURCE_DIRNAME_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    56
$(SOURCE_DIRNAME_DEFAULT)	SOURCE_DIRNAME=$(MODULE_NAME)-$(MODULE_VERSION)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    57
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    58
SOURCE_DIR = $(BUILD_DIR)/$(SOURCE_DIRNAME)
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
    59
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    60
# Set default tarball if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    61
SOURCE_TARBALL_NAME_DEFAULT	= $(SOURCE_TARBALL_NAME_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    62
$(SOURCE_TARBALL_NAME_DEFAULT)	SOURCE_TARBALL_NAME=$(SOURCE_DIRNAME).tar.bz2
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
    63
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    64
# Tarballs for most modules built here are found in the X.Org archives/repos
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    65
# in a directory with the same name as what we use in our tree
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    66
SOURCE_TARBALL_DIR_DEFAULT	= $(SOURCE_TARBALL_DIR_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    67
$(SOURCE_TARBALL_DIR_DEFAULT)	SOURCE_TARBALL_DIR=$(MODTYPE)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    68
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    69
# Set default download location if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    70
SOURCE_URL_DEFAULT		= $(SOURCE_URL_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    71
$(SOURCE_URL_DEFAULT)		SOURCE_URL=$(XORG_RELEASES_URL)/$(SOURCE_TARBALL_DIR)/$(SOURCE_TARBALL_NAME)
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
    72
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    73
# Set default git repo location if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    74
GIT_URL_DEFAULT		= $(GIT_URL_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    75
$(GIT_URL_DEFAULT)	GIT_URL=$(XORG_GIT_URL)/$(SOURCE_TARBALL_DIR)/$(MODULE_NAME).git
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
    76
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    77
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    78
BUILD_DIR_32 = build_32
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    79
BUILD_DIR_64 = build_64
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    80
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    81
# Set default build type to 32-bit if not set in module makefile
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    82
BUILD_TYPES_DEFAULT	= $(BUILD_TYPES_SET:yes=$(POUND_SIGN))
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    83
$(BUILD_TYPES_DEFAULT)	BUILD_TYPES=32
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    84
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    85
# Set default rules if not set in module/modtype Makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    86
SOURCE_TARGETS_DEFAULT		= $(SOURCE_TARGETS_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    87
$(SOURCE_TARGETS_DEFAULT)	SOURCE_TARGETS=default_source
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    88
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    89
CONFIGURE_TARGETS_DEFAULT	= $(CONFIGURE_TARGETS_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    90
$(CONFIGURE_TARGETS_DEFAULT)	CONFIGURE_TARGETS=default_configure
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    91
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    92
BUILD_TARGETS_DEFAULT		= $(BUILD_TARGETS_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    93
$(BUILD_TARGETS_DEFAULT)	BUILD_TARGETS=default_build
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    94
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    95
INSTALL_TARGETS_DEFAULT		= $(INSTALL_TARGETS_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    96
$(INSTALL_TARGETS_DEFAULT)	INSTALL_TARGETS=default_install
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    97
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    98
# Additional flags to pass to make in 32-bit & 64-bit builds
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    99
BUILD_32_FLAGS= BUILD_DIR=$(BUILD_DIR_32) ARCH_FLAGS="$(ARCH32_FLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   100
	$(MODTYPE_BUILD_32_FLAGS) $(MODULE_BUILD_32_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   101
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   102
BUILD_64_FLAGS= BUILD_DIR=$(BUILD_DIR_64) ARCH_FLAGS="$(ARCH64_FLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   103
	$(MODTYPE_BUILD_64_FLAGS) $(MODULE_BUILD_64_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   104
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   105
all: $(BUILD_TYPES:%=source_%) $(BUILD_TYPES:%=build_%)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   106
all_32: source_32 configure_32 build_32
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   107
all_64: source_64 configure_64 build_64
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   108
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   109
clean:: $(BUILD_TYPES:%=clean_%)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   110
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   111
clean_32::
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   112
	-rm -rf $(BUILD_DIR_32)
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   113
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   114
clean_64::
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   115
	-rm -rf $(BUILD_DIR_64)
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   116
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   117
source: $(BUILD_TYPES:%=source_%)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   118
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   119
source_gen:: $(SOURCE_TARGETS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   120
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   121
source_32: $(BUILD_DIR_32)/.unpack_done
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   122
$(BUILD_DIR_32)/.unpack_done:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   123
	$(MAKE) $(MAKEFLAGS) BUILD_DIR=$(BUILD_DIR_32) source_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   124
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   125
source_64: $(BUILD_DIR_64)/.unpack_done
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   126
$(BUILD_DIR_64)/.unpack_done:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   127
	$(MAKE) $(MAKEFLAGS) BUILD_DIR=$(BUILD_DIR_64) source_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   128
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   129
configure: $(BUILD_TYPES:%=configure_%)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   130
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   131
configure_gen: $(CONFIGURE_TARGETS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   132
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   133
configure_32:: 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   134
	$(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) configure_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   135
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   136
configure_64::
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   137
	$(MAKE) $(MAKEFLAGS) LIBSUBDIR=/$(SUBDIR64) ARCHLIBSUBDIR=/$(SUBDIR64) $(BUILD_64_FLAGS) configure_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   138
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   139
build: $(BUILD_TYPES:%=build_%)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   140
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   141
build_gen: $(BUILD_TARGETS)
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   142
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   143
build_32::
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   144
	$(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) build_gen
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   145
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   146
build_64::
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   147
	$(MAKE) $(MAKEFLAGS) LIBSUBDIR=/$(SUBDIR64) ARCHLIBSUBDIR=/$(SUBDIR64) $(BUILD_64_FLAGS) build_gen
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   148
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   149
install: $(BUILD_TYPES:%=install_%)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   150
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   151
install_gen:: $(INSTALL_TARGETS) install_license
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   152
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   153
install_32:: build_32
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   154
	$(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) install_gen
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   155
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   156
install_64:: build_64
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   157
	$(MAKE) $(MAKEFLAGS) LIBSUBDIR=/64 ARCHLIBSUBDIR=/$(SUBDIR64) $(BUILD_64_FLAGS) install_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   158
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   159
DEBUG_BUILD_FLAGS = BUILD_DEBUG=yes
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   160
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   161
debug:
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   162
	$(MAKE) $(MAKEFLAGS) all $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   163
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   164
debug_32:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   165
	$(MAKE) $(MAKEFLAGS) all_32 $(DEBUG_BUILD_FLAGS) 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   166
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   167
debug_64:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   168
	$(MAKE) $(MAKEFLAGS) all_64 $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   169
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   170
debug-install:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   171
	$(MAKE) $(MAKEFLAGS) install $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   172
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   173
debug-install_32:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   174
	$(MAKE) $(MAKEFLAGS) install_32 $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   175
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   176
debug-install_64:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   177
	$(MAKE) $(MAKEFLAGS) install $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   178
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   179
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   180
### Source tarballs & downloading if necessary
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   181
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   182
SOURCE_TARBALL=$(TARBALLDIR)/$(SOURCE_TARBALL_NAME)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   183
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   184
GIT_CLONE_DIR=$(MODULE_NAME)-$(MODULE_VERSION)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   185
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   186
# Download if SOURCE_TARBALL_NAME is not set to NONE and the file either
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   187
# doesn't exist or is empty
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   188
# If MODULE_VERSION is xgit, checkout source from git repo instead of
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   189
# a tarball
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   190
download:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   191
	@case '$(MAKEFLAGS)' in *[ik]*) set +e;; esac; set -x ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   192
	if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   193
	    if [[ ! -d $(GIT_CLONE_DIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   194
		$(GIT) clone $(GIT_URL) $(GIT_CLONE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   195
		if [[ ! -z "$(GIT_BRANCH)" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   196
		    cd $(GIT_CLONE_DIR) && $(GIT) checkout $(GIT_BRANCH) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   197
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   198
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   199
	else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   200
	    if [[ "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   201
		if [[ ! -s $(SOURCE_TARBALL) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   202
		    $(WGET) -O $(SOURCE_TARBALL) $(SOURCE_URL) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   203
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   204
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   205
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   206
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   207
# Update a git cloned repo
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   208
git-update:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   209
	if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   210
	    if [[ -d $(GIT_CLONE_DIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   211
		cd $(GIT_CLONE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   212
		if [[ ! -z "$(GIT_BRANCH)" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   213
		    $(GIT) checkout master && \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   214
		    $(GIT) fetch && \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   215
		    $(GIT) checkout $(GIT_BRANCH) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   216
		else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   217
		    $(GIT) fetch ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   218
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   219
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   220
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   221
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   222
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   223
### Unpack source and apply patches
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   224
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   225
FIX_PC_OPS= \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   226
	-e 's|-L\$${libdir}|-L\$${libdir} -R\$${libdir}|;' \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   227
	-e 's|Requires.private: .*$$||;'
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   228
354
c5722f7db2ea 6671721 Update libXt to opensrc verion 1.0.5 from X.org [build fixes]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
   229
#	-e 's|(Requires: .*)\bx11\b|$$1|;' \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   230
#	-e 's|^prefix=@prefix@|prefix=\$$\{top_builddir\}@prefix@|'
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   231
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   232
SUNTOUCH_MAN_FLAGS = \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   233
	-a '{Availability, $(SUN_PACKAGE)}' \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   234
	-a '{Interface Stability, $(MODULE_STABILITY)}' \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   235
	$(MODTYPE_SUNTOUCH_MAN_FLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   236
	$(MODULE_SUNTOUCH_MAN_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   237
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   238
default_source: $(MODULE_SOURCE_DEPS) $(MODTYPE_SOURCE_DEPS)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   239
	mkdir -p $(BUILD_DIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   240
	@ if [[ "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   241
	  if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   242
	    SOURCE_CMD='gtar --exclude=.git* -cf - $(GIT_CLONE_DIR)' ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   243
	  else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   244
	    UNCOMP_CMD="$(SOURCE_UNCOMPRESS)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   245
	    SOURCE_CMD="$${UNCOMP_CMD:-bzcat} $(SOURCE_TARBALL)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   246
	  fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   247
	  print "$${SOURCE_CMD} | (cd $(BUILD_DIR) ; gtar -xf - )" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   248
	  $${SOURCE_CMD} | (cd $(BUILD_DIR) ; gtar -xf - ) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   249
	else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   250
	  print "mkdir -p $(SOURCE_DIR)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   251
	  mkdir -p $(SOURCE_DIR) ; \
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   252
	fi ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   253
	if [[ "$(ADDITIONAL_SOURCE_DIR)" != "" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   254
	  if [[ ! -x $(LNDIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   255
	    (cd $(TOP)/util/lndir && $(MAKE) $(MAKEFLAGS) install) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   256
	  fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   257
	  print "cd $(SOURCE_DIR) && $(LNDIR) ../../$(ADDITIONAL_SOURCE_DIR)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   258
	  (cd $(SOURCE_DIR) && $(LNDIR) ../../$(ADDITIONAL_SOURCE_DIR) ) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   259
	fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   260
	if [[ "$(SOURCE_PATCHES)" != "" ]] ; then \
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   261
	    for p in $(SOURCE_PATCHES) x ; do \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   262
	        if [[ "$$p" != "x" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   263
		    PATCH_CMD="$$(print $$p | awk -F, '{if (NF > 1) FLAGS = $$2; else FLAGS="-p0" ; printf "gpatch -d $(SOURCE_DIR) %s < %s\n", FLAGS, $$1}')" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   264
		    print "$${PATCH_CMD}" ; \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   265
		    eval $${PATCH_CMD} ; \
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   266
		fi ; \
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   267
	    done ; \
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   268
	fi ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   269
	if [[ "$(SUNTOUCHED_MANPAGES)" != "" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   270
	    print "/usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   271
		$(SUNTOUCH_MAN_FLAGS) $(SUNTOUCHED_MANPAGES)" ; \
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   272
	    (cd $(SOURCE_DIR) && \
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   273
		/usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   274
		$(SUNTOUCH_MAN_FLAGS) $(SUNTOUCHED_MANPAGES) ) ; \
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   275
	fi ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   276
	if [[ "$(FIX_PC_FILES)" != "" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   277
	    print "/usr/perl5/bin/perl -i.orig -p \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   278
			$(FIX_PC_OPS) $(FIX_PC_FILES)" ; \
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 47
diff changeset
   279
	    (cd $(SOURCE_DIR) && \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   280
		/usr/perl5/bin/perl -i.orig -p \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   281
			$(FIX_PC_OPS) $(FIX_PC_FILES) ); \
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 47
diff changeset
   282
	fi
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   283
	touch $(BUILD_DIR)/$(UNPACK_FILE)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   284
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   285
### Run configure scripts
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   286
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   287
# Include Xorg autoconf macros when rebuilding configure scripts
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   288
ACLOCAL_PATH=aclocal -I $(PROTODIR)$(X11_ACLOCAL_DIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   289
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   290
# Dependencies for running configure to make a Makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   291
CONFIGURE_DEPS = $(UNPACK_TARGET) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   292
	$(MODTYPE_CONFIGURE_DEPS) $(MODULE_CONFIGURE_DEPS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   293
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   294
# Command line options to GNU autoconf configure script
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   295
DEFAULT_CONFIG_OPTS = --prefix=$(MODULE_PREFIX) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   296
	--mandir='$${prefix}/share/man' --localstatedir=/var \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   297
	--disable-libtool-lock
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   298
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   299
CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   300
	$(MODTYPE_CONFIG_OPTS) $(MODULE_CONFIG_OPTS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   301
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   302
# Environment variable options to GNU autoconf configure script
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   303
$(USE_DEFAULT_CONFIG_CPPFLAGS:no=$(POUND_SIGN)) DEFAULT_CONFIG_CPPFLAGS= \
494
549ab2aae6ae 6735203 open-src Makefile cleanup & enhancements (fix Studio 11 builds)
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
   304
	-I$(PROTODIR)$(X11_INCLUDES_DIR) \
549ab2aae6ae 6735203 open-src Makefile cleanup & enhancements (fix Studio 11 builds)
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
   305
	-I$(PROTODIR)/usr/include -I$(PROTODIR)/usr/include/freetype2
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   306
$(USE_DEFAULT_CONFIG_LDFLAGS:no=$(POUND_SIGN)) DEFAULT_CONFIG_LDFLAGS= \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   307
	-L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   308
	-L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   309
DEFAULT_PKG_CONFIG_PATH=$(PROTODIR)/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   310
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   311
# Set USE_DEFAULT_CONFIG_ENV=no in a Makefile to not use this default
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   312
# autoconfig environment
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   313
$(USE_DEFAULT_CONFIG_ENV:no=$(POUND_SIGN))	DEFAULT_CONFIG_ENV = \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   314
    CC="$(CC)" CXX="$(CXX)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   315
    LD="$(CC) $(LDFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   316
    CFLAGS="$(MODTYPE_CFLAGS) $(MODULE_CFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   317
    CXXFLAGS="$(MODTYPE_CXXFLAGS) $(MODULE_CXXFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   318
    CPPFLAGS="$(DEFAULT_CONFIG_CPPFLAGS) $(MODTYPE_CPPFLAGS) $(MODULE_CPPFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   319
    LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_CFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   320
    PKG_CONFIG_PATH="$(DEFAULT_PKG_CONFIG_PATH)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   321
    INSTALL="$(INSTALL_SCRIPT)" CPPROG="cp -p" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   322
    MAKE="$(MODULE_MAKE)" CONFIG_SHELL="$(SHELL)"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   323
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   324
CONFIG_ENV = $(DEFAULT_CONFIG_ENV) $(MODTYPE_CONFIG_ENV) $(MODULE_CONFIG_ENV)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   325
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   326
# File created by running configure - defaults to the top-level Makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   327
# in a source directory unless AUTOCONF_TARGET_SET=yes is set
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   328
AUTOCONF_TARGET_DEFAULT = $(AUTOCONF_TARGET_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   329
$(AUTOCONF_TARGET_DEFAULT)	AUTOCONF_TARGET=$(SOURCE_DIR)/Makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   330
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   331
$(AUTOCONF_TARGET): $(CONFIGURE_DEPS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   332
	cd $(SOURCE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   333
	if [[ "$(AUTORECONF)" = "yes" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   334
	     ACLOCAL="$(ACLOCAL_PATH)" autoreconf -v --install --force ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   335
	fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   336
	chmod a+x configure ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   337
	$(CONFIG_ENV) $(SHELL) ./configure $(CONFIG_OPTS) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   338
	if [[ "$(DELIBTOOLIZE)" = "yes" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   339
	    $(TOP)/common/delibtoolize.pl $(DELIBTOOLIZE_FLAGS) . ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   340
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   341
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   342
default_configure:: $(AUTOCONF_TARGET)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   343
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   344
291
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
   345
### Remove libtool from build process when needed
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
   346
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
   347
delibtoolize:
341
0a1eb61fd56e 6668846 Upgrade libX11 to X11R7 version
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 291
diff changeset
   348
	$(TOP)/common/delibtoolize.pl $(DELIBTOOLIZE_FLAGS) $(SOURCE_DIR)
291
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
   349
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   350
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   351
### Generate mapfiles to limit/version exported symbols in libraries
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   352
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   353
SPEC2MAP=       /usr/lib/abi/spec2map
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   354
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   355
SPECMAP=	mapfile.vers.$(LIBNAME)
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   356
SPECFILE=	spec/$(LIBNAME).spec 
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   357
VERSFILE=	spec/versions
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   358
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   359
$(BUILD_DIR_32)/$(SPECMAP): $(SPECFILE) $(VERSFILE)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   360
	$(MAKE) $(MAKEFLAGS) BUILD_DIR=$(BUILD_DIR_32) MACH=$(MACH32) spec_gen
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   361
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   362
$(BUILD_DIR_64)/$(SPECMAP): $(SPECFILE) $(VERSFILE)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   363
	$(MAKE) $(MAKEFLAGS) BUILD_DIR=$(BUILD_DIR_64) MACH=$(MACH64) spec_gen
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   364
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   365
spec_gen:
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   366
	$(SPEC2MAP) -a $(MACH) -v $(VERSFILE) -p -l $(LIBNAME) \
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   367
	 -o $(BUILD_DIR)/$(SPECMAP) $(SPECFILE)
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   368
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   369
### Default rules for common build pattern
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   370
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   371
LD_OPTIONS = -L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   372
	$(MODTYPE_LD_OPTIONS) $(MODULE_LD_OPTIONS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   373
536
25f17a95d600 6748141 SUNWxwfnt, SUNWxwcft, SUNWxwoft installs fail due to libfont.so.1: open failed
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 494
diff changeset
   374
BUILD_ENV = LD_OPTIONS='$(LD_OPTIONS)' \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   375
	$(MODTYPE_BUILD_ENV) $(MODULE_BUILD_ENV)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   376
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   377
DEFAULT_BUILD_MAKEFLAGS=$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   378
	$(MODTYPE_BUILD_MAKEFLAGS) $(MODULE_BUILD_MAKEFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   379
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   380
default_build:: $(UNPACK_TARGET) $(CONFIGURE_TARGETS) $(MODTYPE_BUILD_DEPS) $(MODULE_BUILD_DEPS) $(MODULE_MAKE)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   381
	(cd $(SOURCE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   382
	 $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   383
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   384
print_default_build_flags:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   385
	@print "BUILD_ENV='$(BUILD_ENV)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   386
	print "MAKE='$(MODULE_MAKE)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   387
	print "MAKE_FLAGS='$(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS)'"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   388
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   389
build-in-subdir:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   390
	(cd $(subdir) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   391
	 $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   392
	 $(subdir_cmd) )
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   393
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   394
DEFAULT_INSTALL_MAKEFLAGS= -e DESTDIR=$(PROTODIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   395
	pkgconfigdir=/usr/lib$(ARCHLIBSUBDIR)/pkgconfig \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   396
	$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   397
	$(MODTYPE_INSTALL_MAKEFLAGS) $(MODULE_INSTALL_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   398
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   399
default_install:: $(BUILD_TARGETS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   400
	(cd $(SOURCE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   401
	 $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   402
	 install)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   403
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   404
print_default_install_flags:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   405
	@print "BUILD_ENV='$(BUILD_ENV)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   406
	print "MAKE='$(MODULE_MAKE)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   407
	print "MAKE_FLAGS='$(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS)'"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   408
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   409
install-in-subdir: 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   410
	(cd $(subdir) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   411
	 $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   412
	 $(subdir_cmd))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   413
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   414
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   415
### Other tools/dependencies needed to build
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   416
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   417
# Some modules (such as FreeType 2) require GNU make
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   418
$(GNUMAKE):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   419
	@print -n "Building with GNU make from $$(whence gmake): "
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   420
	@$(GNUMAKE) --version
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   421
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   422
$(MAKE):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   423
	@print "Building with make from $$(whence $(MAKE))"
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   424
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   425
# Some modules use lndir to merge in sources from Sun specific directories
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   426
$(LNDIR):
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   427
	(cd $(TOP)/util/lndir && $(MAKE) $(MAKEFLAGS) install)
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   428
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   429
# Some modules use these tools to convert DocBook docs to text or html
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   430
$(DOCBOOK2HTML) $(DOCBOOK2TEXT):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   431
	cd $(TOP)/doc/docbook-utils && $(MAKE) $(MAKEFLAGS) install
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
   432
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   433
$(XORG_DEFS_ENT):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   434
	cd $(TOP)/doc/xorg-sgml-doctools && $(MAKE) $(MAKEFLAGS) install
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   435
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   436
# Almost everything depends on the headers in xproto
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   437
$(XPROTO_DEP):
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   438
	@print "$(XPROTO_DEP) not found..."
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   439
	@print "Installing dependency proto/x11proto"
253
88e5aa1fb5f9 6632519 X proto source dirs should be renamed
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 241
diff changeset
   440
	(cd $(TOP)/proto/x11proto ; make install)
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   441
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   442
### Useful rules for maintaining patch sets
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   443
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   444
# regenerate patches against new baseline to reduce messages about hunks
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   445
# having fuzz or offsets when applying patches - new patches will be in new/
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   446
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   447
regen-patches: 
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   448
	CUR_LIST=""
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   449
	rm -rf tmp-regen
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   450
	make SOURCE_PATCHES="$(CUR_LIST)" BUILD_DIR=tmp-regen source_gen
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   451
	mkdir -p new
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   452
	for f in $(SOURCE_PATCHES) ; do \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   453
	    p=$$(print $$f | sed 's/,.*$$//') ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   454
	    print '=================' $$p ; \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   455
	    rm -rf prev ; \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   456
	    mv tmp-regen prev ; \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   457
	    $(MAKE) SOURCE_PATCHES="$${CUR_LIST} $$f" BUILD_DIR=tmp-regen source_gen ; \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   458
	    awk '/^--- /	{exit} \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   459
		 /^diff -u/	{exit} \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   460
			 	{print}' $$p > new/$$p ; \
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
   461
	    gdiff -urp -x '*~' -x '*.orig' ./prev ./tmp-regen \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   462
		| sed -e 's% \./prev$(SOURCE_DIR)/% %' -e 's% \./tmp-regen$(SOURCE_DIR)/% %' \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   463
		| grep -v '^Common subdirectories:' \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   464
		| grep -v '^Only in ' \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   465
		>> new/$$p ; \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   466
	    CUR_LIST="$${CUR_LIST} new/$$p" ; \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   467
	done
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   468
	rm -rf tmp-regen
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   469
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   470
### Licensing files
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   471
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   472
# Default license file name is COPYING (X.Org & GNU autoconf default)
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   473
# For other license file names, set LICENSE_FILE to the file name
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   474
# and set LICENSE_FILE_SET=yes
387
5ce4f3ae3e65 6681709 Copyright update project for Xorg
Jay Cotton <Jay.Cotton@Sun.COM>
parents: 359
diff changeset
   475
# A file in the same directory as the Makefile takes precedence
5ce4f3ae3e65 6681709 Copyright update project for Xorg
Jay Cotton <Jay.Cotton@Sun.COM>
parents: 359
diff changeset
   476
# over one that is delivered in the package.
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   477
LICENSE_FILE_DEFAULT	= $(LICENSE_FILE_SET:yes=$(POUND_SIGN))
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   478
$(LICENSE_FILE_DEFAULT)	LICENSE_FILE=COPYING
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   479
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   480
install_license:
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   481
	@THIS_MODULE=`echo $(PWD) | sed 's|.*/open-src/||'` ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   482
	if [[ -f $(LICENSE_FILE) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   483
	    LICENSE_TO_COPY="$(LICENSE_FILE)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   484
	elif [[ -f $(SOURCE_DIR)/$(LICENSE_FILE) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   485
	    LICENSE_TO_COPY="$(SOURCE_DIR)/$(LICENSE_FILE)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   486
	fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   487
	if [[ "$${LICENSE_TO_COPY}" != "" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   488
	    set -x ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   489
	    mkdir -p $(LICENSE_DEST)/$${THIS_MODULE}/ ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   490
	    cp -pf $${LICENSE_TO_COPY} \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   491
		$(LICENSE_DEST)/$${THIS_MODULE}/COPYING ; \
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   492
	fi