coreconf/rules.mk
author Kai Engert <kaie@kuix.de>
Fri, 23 Aug 2013 21:53:07 +0200
changeset 10844 82e7c0ea436407520e9da89f38a1e121167b862a
parent 10685 6c43fe3ab5dd41803bbd6705979f73275d7668f6
child 11349 047f9c1d1b3909791342af2008c0a14f33a41f17
permissions -rw-r--r--
bug 908617, address review comments, r=wtc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
     1
#
10324
64aab092a78923a492ced9ae9fd6866d03aace31 Bug 716563 - update license to MPL 2. r=rrelyea.
gerv%gerv.net
parents: 9636
diff changeset
     2
# This Source Code Form is subject to the terms of the Mozilla Public
64aab092a78923a492ced9ae9fd6866d03aace31 Bug 716563 - update license to MPL 2. r=rrelyea.
gerv%gerv.net
parents: 9636
diff changeset
     3
# License, v. 2.0. If a copy of the MPL was not distributed with this
64aab092a78923a492ced9ae9fd6866d03aace31 Bug 716563 - update license to MPL 2. r=rrelyea.
gerv%gerv.net
parents: 9636
diff changeset
     4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
     5
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
     6
#######################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
     7
###                                                                 ###
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
     8
###              R U L E S   O F   E N G A G E M E N T              ###
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
     9
###                                                                 ###
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    10
#######################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    11
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    12
#######################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    13
# Double-Colon rules for utilizing the binary release model.          #
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    14
#######################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    15
1504
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
    16
all:: export libs 
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    17
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    18
ifeq ($(AUTOCLEAN),1)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    19
autobuild:: clean export private_export libs program install
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    20
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    21
autobuild:: export private_export libs program install
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    22
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    23
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    24
platform::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    25
	@echo $(OBJDIR_NAME)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    26
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
    27
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
1443
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
    28
USE_NT_C_SYNTAX=1
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
    29
endif
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
    30
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    31
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    32
# IMPORTS will always be associated with a component.  Therefore,
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    33
# the "import" rule will always change directory to the top-level
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    34
# of a component, and traverse the IMPORTS keyword from the
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    35
# "manifest.mn" file located at this level only.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    36
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    37
# note: if there is a trailing slash, the component will be appended
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    38
#       (see import.pl - only used for xpheader.jar)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    39
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    40
import::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    41
	@echo "== import.pl =="
7800
837895a8352aed614a9c7b21349268f4d041a070 Bug 82268, Builds use wrong version of perl
neil.williams%sun.com
parents: 7799
diff changeset
    42
	@$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/import.pl \
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    43
		"RELEASE_TREE=$(RELEASE_TREE)"   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    44
		"IMPORTS=$(IMPORTS)"             \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    45
		"VERSION=$(VERSION)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    46
		"OS_ARCH=$(OS_ARCH)"             \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    47
		"PLATFORM=$(PLATFORM)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    48
		"OVERRIDE_IMPORT_CHECK=$(OVERRIDE_IMPORT_CHECK)"   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    49
		"ALLOW_VERSION_OVERRIDE=$(ALLOW_VERSION_OVERRIDE)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    50
		"SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)"   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    51
		"SOURCE_MD_DIR=$(SOURCE_MD_DIR)"      \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    52
		"SOURCE_XP_DIR=$(SOURCE_XP_DIR)"      \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    53
		"FILES=$(IMPORT_XPCLASS_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    54
		"$(IMPORT_XPCLASS_JAR)=$(IMPORT_XP_DIR)|$(IMPORT_XPCLASS_DIR)|"    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    55
		"$(XPHEADER_JAR)=$(IMPORT_XP_DIR)|$(SOURCE_XP_DIR)/public/|v" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    56
		"$(MDHEADER_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)/include|"        \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    57
		"$(MDBINARY_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)|"
3883
9f3d75fef3cec3c7788a9b88b2d9e5b468773a96 Bug 182086: on Mac OS X, ranlib needs to be rerun after static libraries
wtc%netscape.com
parents: 3536
diff changeset
    58
# On Mac OS X ranlib needs to be rerun after static libs are moved.
9f3d75fef3cec3c7788a9b88b2d9e5b468773a96 Bug 182086: on Mac OS X, ranlib needs to be rerun after static libraries
wtc%netscape.com
parents: 3536
diff changeset
    59
ifeq ($(OS_TARGET),Darwin)
9f3d75fef3cec3c7788a9b88b2d9e5b468773a96 Bug 182086: on Mac OS X, ranlib needs to be rerun after static libraries
wtc%netscape.com
parents: 3536
diff changeset
    60
	find $(SOURCE_MD_DIR)/lib -name "*.a" -exec $(RANLIB) {} \;
9f3d75fef3cec3c7788a9b88b2d9e5b468773a96 Bug 182086: on Mac OS X, ranlib needs to be rerun after static libraries
wtc%netscape.com
parents: 3536
diff changeset
    61
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    62
1464
ae97f3093cc6f1b5bbf5d6ba869acecfab095801 Changes to allow NT to compile to a separate build tree.
relyea%netscape.com
parents: 1443
diff changeset
    63
export:: 
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    64
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    65
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    66
private_export::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    67
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    68
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    69
release_export::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    70
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    71
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    72
release_classes::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    73
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    74
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    75
libs program install:: $(TARGETS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    76
ifdef LIBRARY
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    77
	$(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    78
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    79
ifdef SHARED_LIBRARY
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    80
	$(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_LIB_DIR)
7612
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    81
ifdef MOZ_DEBUG_SYMBOLS
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    82
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    83
	$(INSTALL) -m 644 $(SHARED_LIBRARY:$(DLL_SUFFIX)=pdb) $(SOURCE_LIB_DIR)
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    84
endif
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    85
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    86
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    87
ifdef IMPORT_LIBRARY
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    88
	$(INSTALL) -m 775 $(IMPORT_LIBRARY) $(SOURCE_LIB_DIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    89
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    90
ifdef PROGRAM
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    91
	$(INSTALL) -m 775 $(PROGRAM) $(SOURCE_BIN_DIR)
7612
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    92
ifdef MOZ_DEBUG_SYMBOLS
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    93
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    94
	$(INSTALL) -m 644 $(PROGRAM:$(PROG_SUFFIX)=.pdb) $(SOURCE_BIN_DIR)
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    95
endif
0a16a0f436f7d43dc44d3a0fe0b78ee91cd5e7dd Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
nelson%bolyard.com
parents: 7564
diff changeset
    96
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    97
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    98
ifdef PROGRAMS
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
    99
	$(INSTALL) -m 775 $(PROGRAMS) $(SOURCE_BIN_DIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   100
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   101
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   102
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   103
tests::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   104
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   105
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   106
clean clobber::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   107
	rm -rf $(ALL_TRASH)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   108
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   109
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   110
realclean clobber_all::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   111
	rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   112
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   113
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   114
#######################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   115
# Double-Colon rules for populating the binary release model.         #
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   116
#######################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   117
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   118
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   119
release_clean::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   120
	rm -rf $(SOURCE_XP_DIR)/release/$(RELEASE_MD_DIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   121
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   122
release:: release_clean release_export release_classes release_policy release_md release_jars release_cpdistdir
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   123
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   124
release_cpdistdir::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   125
	@echo "== cpdist.pl =="
7800
837895a8352aed614a9c7b21349268f4d041a070 Bug 82268, Builds use wrong version of perl
neil.williams%sun.com
parents: 7799
diff changeset
   126
	@$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/cpdist.pl \
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   127
		"RELEASE_TREE=$(RELEASE_TREE)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   128
		"CORE_DEPTH=$(CORE_DEPTH)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   129
		"MODULE=${MODULE}" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   130
		"OS_ARCH=$(OS_ARCH)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   131
		"RELEASE=$(RELEASE)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   132
		"PLATFORM=$(PLATFORM)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   133
		"RELEASE_VERSION=$(RELEASE_VERSION)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   134
		"SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   135
		"RELEASE_XP_DIR=$(RELEASE_XP_DIR)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   136
		"RELEASE_MD_DIR=$(RELEASE_MD_DIR)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   137
		"FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR) XP_FILES MD_FILES" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   138
		"$(XPCLASS_JAR)=$(SOURCE_RELEASE_CLASSES_DIR)|x"\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   139
		"$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_CLASSES_DBG_DIR)|x"\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   140
		"$(XPHEADER_JAR)=$(SOURCE_RELEASE_XPHEADERS_DIR)|x" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   141
		"$(MDHEADER_JAR)=$(SOURCE_RELEASE_MDHEADERS_DIR)|m" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   142
		"$(MDBINARY_JAR)=$(SOURCE_RELEASE_MD_DIR)|m" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   143
		"XP_FILES=$(XP_FILES)|xf" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   144
		"MD_FILES=$(MD_FILES)|mf"
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   145
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   146
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   147
# $(SOURCE_RELEASE_xxx_JAR) is a name like yyy.jar
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   148
# $(SOURCE_RELEASE_xx_DIR)  is a name like 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   149
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   150
release_jars::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   151
	@echo "== release.pl =="
7800
837895a8352aed614a9c7b21349268f4d041a070 Bug 82268, Builds use wrong version of perl
neil.williams%sun.com
parents: 7799
diff changeset
   152
	@$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/release.pl \
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   153
		"RELEASE_TREE=$(RELEASE_TREE)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   154
		"PLATFORM=$(PLATFORM)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   155
		"OS_ARCH=$(OS_ARCH)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   156
		"RELEASE_VERSION=$(RELEASE_VERSION)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   157
		"SOURCE_RELEASE_DIR=$(SOURCE_RELEASE_DIR)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   158
		"FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   159
		"$(XPCLASS_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)|b"\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   160
		"$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)|b"\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   161
		"$(XPHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_XPHEADERS_DIR)|a" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   162
		"$(MDHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MDHEADERS_DIR)|a" \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   163
		"$(MDBINARY_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MD_DIR)|bi"
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   164
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   165
# Rules for releasing classes.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   166
# We have to do some REALLY gross stuff to deal with multiple classes in one
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   167
# file, as well as nested classes, which have a filename of the form
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   168
# ContainingClass$NestedClass.class.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   169
# RELEASE_CLASSES simply performs a required patsubst on CLASSES
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   170
# RELEASE_CLASS_PATH is RELEASE_CLASSES with the path (in ns/dist) prepended
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   171
# RELEASE_NESTED is all the nested classes in RELEASE_CLASS_PATH.  We use a
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   172
#   foreach and wildcard to get all the files that start out like one of the
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   173
#   class files, then have a $.  So, for each class file, we look for file$*
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   174
# RELEASE_FILES is the combination of RELEASE_NESTED and the class files
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   175
#   specified by RELEASE_CLASSES which have .class appended to them.  Note that
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   176
#   the RELEASE_NESTED don't need to have .class appended because they were
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   177
#   read in from the wildcard as complete filenames.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   178
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   179
# The _DBG versions are the debuggable ones.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   180
ifneq ($(CLASSES),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   181
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   182
RELEASE_CLASSES := $(patsubst %,%,$(CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   183
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   184
ifdef BUILD_OPT
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   185
	RELEASE_CLASS_PATH := $(patsubst %,$(SOURCE_CLASSES_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   186
	RELEASE_NESTED := $(foreach file,$(RELEASE_CLASS_PATH),$(wildcard $(file)$$*))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   187
	RELEASE_FILES := $(patsubst %,%.class,$(RELEASE_CLASS_PATH)) $(RELEASE_NESTED)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   188
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   189
	RELEASE_DBG_CLASS_PATH:= $(patsubst %,$(SOURCE_CLASSES_DBG_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   190
	RELEASE_DBG_NESTED := $(foreach file,$(RELEASE_DBG_CLASS_PATH),$(wildcard $(file)$$*))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   191
	RELEASE_DBG_FILES := $(patsubst %,%.class,$(RELEASE_DBG_CLASS_PATH)) $(RELEASE_DBG_NESTED)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   192
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   193
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   194
# Substitute \$ for $ so the shell doesn't choke
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   195
ifdef BUILD_OPT
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   196
release_classes::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   197
	$(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)/$(PACKAGE)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   198
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   199
release_classes::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   200
	$(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_DBG_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)/$(PACKAGE)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   201
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   202
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   203
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   204
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   205
release_policy::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   206
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   207
1697
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   208
ifndef NO_MD_RELEASE
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   209
    ifdef LIBRARY
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   210
        MD_LIB_RELEASE_FILES +=  $(LIBRARY)
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   211
    endif
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   212
    ifdef SHARED_LIBRARY
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   213
        MD_LIB_RELEASE_FILES +=  $(SHARED_LIBRARY)
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   214
    endif
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   215
    ifdef IMPORT_LIBRARY
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   216
        MD_LIB_RELEASE_FILES +=  $(IMPORT_LIBRARY)
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   217
    endif
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   218
    ifdef PROGRAM
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   219
        MD_BIN_RELEASE_FILES +=  $(PROGRAM)
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   220
    endif
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   221
    ifdef PROGRAMS
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   222
        MD_BIN_RELEASE_FILES +=  $(PROGRAMS)
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   223
    endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   224
endif
1697
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   225
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   226
release_md::
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   227
ifneq ($(MD_LIB_RELEASE_FILES),)
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   228
	$(INSTALL) -m 444 $(MD_LIB_RELEASE_FILES) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   229
endif
1697
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   230
ifneq ($(MD_BIN_RELEASE_FILES),)
324c296ed5c4138b4477ca58e711ce72b40e4ebe Changes to make JSS more easily releasable.
nicolson%netscape.com
parents: 1657
diff changeset
   231
	$(INSTALL) -m 555 $(MD_BIN_RELEASE_FILES) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   232
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   233
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   234
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   235
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   236
alltags:
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   237
	rm -f TAGS
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   238
	find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   239
	find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   240
1639
7e6fd9e27f023384f6b8e674a3f315855d112d41 Removed unnecessary dependencies on $(BUILT_SRCS).
wtc%netscape.com
parents: 1593
diff changeset
   241
$(PROGRAM): $(OBJS) $(EXTRA_LIBS)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   242
	@$(MAKE_OBJDIR)
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   243
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
10500
57123668b4104e0525886b1d9759e0df94334109 Bug 654611: Remove WinCE code from NSS. The patch is contributed by
wtc%google.com
parents: 10493
diff changeset
   244
	$(MKPROG) $(subst /,\\,$(OBJS)) -Fe$@ -link $(LDFLAGS) $(subst /,\\,$(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS))
7465
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   245
ifdef MT
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   246
	if test -f $@.manifest; then \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   247
		$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   248
		rm -f $@.manifest; \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   249
	fi
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   250
endif	# MSVC with manifest tool
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   251
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   252
	$(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   253
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   254
999
2e2296e5b2c186f6c52afe07eeada460c9307303 More work on shared libraries for NSS.
wtc%netscape.com
parents: 982
diff changeset
   255
get_objs:
1040
2793b7d453955fa35fae5fc0327132f9969f5262 Bugzilla bug #64261: moved certread.c from lib/certhigh to lib/pkcs7.
wtc%netscape.com
parents: 1038
diff changeset
   256
	@echo $(OBJS)
999
2e2296e5b2c186f6c52afe07eeada460c9307303 More work on shared libraries for NSS.
wtc%netscape.com
parents: 982
diff changeset
   257
1639
7e6fd9e27f023384f6b8e674a3f315855d112d41 Removed unnecessary dependencies on $(BUILT_SRCS).
wtc%netscape.com
parents: 1593
diff changeset
   258
$(LIBRARY): $(OBJS)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   259
	@$(MAKE_OBJDIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   260
	rm -f $@
5137
a0d69d0f9ff7bf8b28f6674708f04dc0aec04323 Bugzilla bug 172651: added a necessary test for MinGW gcc in rules.mk.
wchang0222%aol.com
parents: 4367
diff changeset
   261
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
1464
ae97f3093cc6f1b5bbf5d6ba869acecfab095801 Changes to allow NT to compile to a separate build tree.
relyea%netscape.com
parents: 1443
diff changeset
   262
	$(AR) $(subst /,\\,$(OBJS))
1467
0693a884d4888dc30c623e6f8541921b248e7bc8 Don't translate .obj directory separators on Unix.
relyea%netscape.com
parents: 1464
diff changeset
   263
else
0693a884d4888dc30c623e6f8541921b248e7bc8 Don't translate .obj directory separators on Unix.
relyea%netscape.com
parents: 1464
diff changeset
   264
	$(AR) $(OBJS)
0693a884d4888dc30c623e6f8541921b248e7bc8 Don't translate .obj directory separators on Unix.
relyea%netscape.com
parents: 1464
diff changeset
   265
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   266
	$(RANLIB) $@
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   267
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   268
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   269
ifeq ($(OS_TARGET),OS2)
4310
00925e96457e948c297c09d24672dc6b6053e054 Bug 195797: support building NSS with GCC 3.x on OS/2. The patch is
wtc%netscape.com
parents: 4208
diff changeset
   270
$(IMPORT_LIBRARY): $(MAPFILE)
1191
1d4e437f5f54e7ea1e88ee46a1d436e258df500c Bugzilla bug #62855: added rule to build import libraries on OS/2. Thanks
wtc%netscape.com
parents: 1185
diff changeset
   271
	rm -f $@
5450
b2cc7baadd5988af9e93921a982f2b9481adac87 Bugzilla bug 267839: use $< and $@ in makefile rules where appropriate.
wchang0222%aol.com
parents: 5431
diff changeset
   272
	$(IMPLIB) $@ $<
1191
1d4e437f5f54e7ea1e88ee46a1d436e258df500c Bugzilla bug #62855: added rule to build import libraries on OS/2. Thanks
wtc%netscape.com
parents: 1185
diff changeset
   273
	$(RANLIB) $@
1d4e437f5f54e7ea1e88ee46a1d436e258df500c Bugzilla bug #62855: added rule to build import libraries on OS/2. Thanks
wtc%netscape.com
parents: 1185
diff changeset
   274
endif
1d4e437f5f54e7ea1e88ee46a1d436e258df500c Bugzilla bug #62855: added rule to build import libraries on OS/2. Thanks
wtc%netscape.com
parents: 1185
diff changeset
   275
999
2e2296e5b2c186f6c52afe07eeada460c9307303 More work on shared libraries for NSS.
wtc%netscape.com
parents: 982
diff changeset
   276
ifdef SHARED_LIBRARY_LIBS
1443
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
   277
ifdef BUILD_TREE
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
   278
SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(shell $(MAKE) -C $(dir) --no-print-directory get_objs))
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
   279
else
999
2e2296e5b2c186f6c52afe07eeada460c9307303 More work on shared libraries for NSS.
wtc%netscape.com
parents: 982
diff changeset
   280
SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(addprefix $(dir)/,$(shell $(MAKE) -C $(dir) --no-print-directory get_objs)))
2e2296e5b2c186f6c52afe07eeada460c9307303 More work on shared libraries for NSS.
wtc%netscape.com
parents: 982
diff changeset
   281
endif
1443
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
   282
endif
999
2e2296e5b2c186f6c52afe07eeada460c9307303 More work on shared libraries for NSS.
wtc%netscape.com
parents: 982
diff changeset
   283
3536
81b6b425ded10cc2cf677c7355e044a4a1ce63c6 Fix 166721: shared library rule does not handle dependencies correctly.
nicolson%netscape.com
parents: 3218
diff changeset
   284
$(SHARED_LIBRARY): $(OBJS) $(RES) $(MAPFILE) $(SUB_SHLOBJS)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   285
	@$(MAKE_OBJDIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   286
	rm -f $@
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   287
ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   288
	echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   289
	nm -B -C -g $(OBJS) \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   290
	| awk '/ [T,D] / {print $$3}' \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   291
	| sed -e 's/^\.//' \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   292
	| sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   293
	$(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   294
	-bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   295
else
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   296
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   297
ifdef NS_USE_GCC
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   298
	$(LINK_DLL) $(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS) $(RES)
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   299
else
2749
09f103b5b3d016bf9751778d974efc52dabf93d7 Fix warning on Windows builds. Bug 104541.
nelsonb%netscape.com
parents: 2734
diff changeset
   300
	$(LINK_DLL) -MAP $(DLLBASE) $(subst /,\\,$(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS) $(RES))
7465
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   301
ifdef MT
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   302
	if test -f $@.manifest; then \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   303
		$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;2; \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   304
		rm -f $@.manifest; \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   305
	fi
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   306
endif	# MSVC with manifest tool
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   307
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   308
else
6055
c018e714fe25fb042bf13a093dc188aa4c188f39 Fix for 297802 . r=wtchang . Add $(OS_LIBS) to MKSHLIB rules.
julien.pierre.bugs%sun.com
parents: 5754
diff changeset
   309
	$(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   310
	chmod +x $@
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   311
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   312
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   313
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   314
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   315
$(RES): $(RESNAME)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   316
	@$(MAKE_OBJDIR)
1118
41fdb9ead184961abbf949df6f4f5c71ee6fb3cd Add library version info to the NSS, S/MIME, and SSL shared libraries.
wtc%netscape.com
parents: 1069
diff changeset
   317
# The resource compiler does not understand the -U option.
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   318
ifdef NS_USE_GCC
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   319
	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   320
else
1118
41fdb9ead184961abbf949df6f4f5c71ee6fb3cd Add library version info to the NSS, S/MIME, and SSL shared libraries.
wtc%netscape.com
parents: 1069
diff changeset
   321
	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   322
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   323
	@echo $(RES) finished
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   324
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   325
6110
f841975ff2cdf9cb6f4128b6c199e1b21949a3dd Bugzilla Bug 303508: enhanced the makefile rule for $(MAPFILE). Added
wtchang%redhat.com
parents: 6055
diff changeset
   326
$(MAPFILE): $(MAPFILE_SOURCE)
1246
45f5ff346fb123e23964e88f52cb4d646f19a5dd When creating the mapfile, we need to create OBJDIR first if it
nicolson%netscape.com
parents: 1194
diff changeset
   327
	@$(MAKE_OBJDIR)
2282
7be5f9889e34c4921a77aac42138953bc11f11c3 Move map file processing definitions back into base .mk files.
relyea%netscape.com
parents: 2260
diff changeset
   328
	$(PROCESS_MAP_FILE)
1067
984a9ddb075f2b24c2bc168cc4d5418385630374 Implement new .def file processing rules.
relyea%netscape.com
parents: 1061
diff changeset
   329
1047
66c80d18a51e9c94d2e5e20178a980b9c7fa80ff Add rules for building the correct exportted list file for Sun, AIX, and Linux.
relyea%netscape.com
parents: 1040
diff changeset
   330
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   331
$(OBJDIR)/$(PROG_PREFIX)%$(PROG_SUFFIX): $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   332
	@$(MAKE_OBJDIR)
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   333
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
5421
6ea5fc7389e9809fb7d5c543f3cb8dae9556b174 Use the $< variable in the rule to build a program from a single object.
wchang0222%aol.com
parents: 5419
diff changeset
   334
	$(MKPROG) $< -Fe$@ -link \
10500
57123668b4104e0525886b1d9759e0df94334109 Bug 654611: Remove WinCE code from NSS. The patch is contributed by
wtc%google.com
parents: 10493
diff changeset
   335
	$(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
7465
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   336
ifdef MT
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   337
	if test -f $@.manifest; then \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   338
		$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   339
		rm -f $@.manifest; \
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   340
	fi
6f2dbadcf933d99c3e8ab0f5628f2c3c82fb5bef Bug 353475. When building NSS with MSVC 2005, use the "mt" command to
nelson%bolyard.com
parents: 7298
diff changeset
   341
endif	# MSVC with manifest tool
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   342
else
5421
6ea5fc7389e9809fb7d5c543f3cb8dae9556b174 Use the $< variable in the rule to build a program from a single object.
wchang0222%aol.com
parents: 5419
diff changeset
   343
	$(MKPROG) -o $@ $(CFLAGS) $< \
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   344
	$(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   345
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   346
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   347
WCCFLAGS1 := $(subst /,\\,$(CFLAGS))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   348
WCCFLAGS2 := $(subst -I,-i=,$(WCCFLAGS1))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   349
WCCFLAGS3 := $(subst -D,-d,$(WCCFLAGS2))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   350
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   351
# Translate source filenames to absolute paths. This is required for
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   352
# debuggers under Windows & OS/2 to find source files automatically
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   353
5621
julien.pierre.bugs%sun.com
parents: 5616
diff changeset
   354
ifeq (,$(filter-out OS2 AIX,$(OS_TARGET)))
6788
c84700bbc593a6cf8adcf4c2f2f97164ea4ec133 Fix for bug 315793 . Make shlibsign run in the OBJDIR rather than the source directory . r=nelson
julien.pierre.bugs%sun.com
parents: 6193
diff changeset
   355
# OS/2 and AIX
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   356
NEED_ABSOLUTE_PATH := 1
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   357
PWD := $(shell pwd)
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   358
6788
c84700bbc593a6cf8adcf4c2f2f97164ea4ec133 Fix for bug 315793 . Make shlibsign run in the OBJDIR rather than the source directory . r=nelson
julien.pierre.bugs%sun.com
parents: 6193
diff changeset
   359
else
c84700bbc593a6cf8adcf4c2f2f97164ea4ec133 Fix for bug 315793 . Make shlibsign run in the OBJDIR rather than the source directory . r=nelson
julien.pierre.bugs%sun.com
parents: 6193
diff changeset
   360
# Windows
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   361
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   362
NEED_ABSOLUTE_PATH := 1
10484
cd1a29f73bf02b7698be858e1328f9cd2553718e Bug 794896 - Make the NSS build system friendly to pymake, patch by Mike Hommey, r=rrelyea
kaie%kuix.de
parents: 10324
diff changeset
   363
ifdef .PYMAKE
cd1a29f73bf02b7698be858e1328f9cd2553718e Bug 794896 - Make the NSS build system friendly to pymake, patch by Mike Hommey, r=rrelyea
kaie%kuix.de
parents: 10324
diff changeset
   364
PWD := $(CURDIR)
cd1a29f73bf02b7698be858e1328f9cd2553718e Bug 794896 - Make the NSS build system friendly to pymake, patch by Mike Hommey, r=rrelyea
kaie%kuix.de
parents: 10324
diff changeset
   365
else
5754
8452dee7a7e997d22195546ce4705133b83fe0e2 Bugzilla Bug 294122: support building with MSYS (a set of Unix utilities
wtchang%redhat.com
parents: 5621
diff changeset
   366
PWD := $(shell pwd)
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   367
ifeq (,$(findstring ;,$(PATH)))
5754
8452dee7a7e997d22195546ce4705133b83fe0e2 Bugzilla Bug 294122: support building with MSYS (a set of Unix utilities
wtchang%redhat.com
parents: 5621
diff changeset
   368
ifndef USE_MSYS
8452dee7a7e997d22195546ce4705133b83fe0e2 Bugzilla Bug 294122: support building with MSYS (a set of Unix utilities
wtchang%redhat.com
parents: 5621
diff changeset
   369
PWD := $(subst \,/,$(shell cygpath -w $(PWD)))
8452dee7a7e997d22195546ce4705133b83fe0e2 Bugzilla Bug 294122: support building with MSYS (a set of Unix utilities
wtchang%redhat.com
parents: 5621
diff changeset
   370
endif
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   371
endif
10484
cd1a29f73bf02b7698be858e1328f9cd2553718e Bug 794896 - Make the NSS build system friendly to pymake, patch by Mike Hommey, r=rrelyea
kaie%kuix.de
parents: 10324
diff changeset
   372
endif
6788
c84700bbc593a6cf8adcf4c2f2f97164ea4ec133 Fix for bug 315793 . Make shlibsign run in the OBJDIR rather than the source directory . r=nelson
julien.pierre.bugs%sun.com
parents: 6193
diff changeset
   373
c84700bbc593a6cf8adcf4c2f2f97164ea4ec133 Fix for bug 315793 . Make shlibsign run in the OBJDIR rather than the source directory . r=nelson
julien.pierre.bugs%sun.com
parents: 6193
diff changeset
   374
else
c84700bbc593a6cf8adcf4c2f2f97164ea4ec133 Fix for bug 315793 . Make shlibsign run in the OBJDIR rather than the source directory . r=nelson
julien.pierre.bugs%sun.com
parents: 6193
diff changeset
   375
# everything else
6796
4bd3abf93e103920add8ba05428b215f8edfdfd7 Fix for bug 315793 . Wan-Teh's feedback for PWD
julien.pierre.bugs%sun.com
parents: 6788
diff changeset
   376
PWD := $(shell pwd)
6788
c84700bbc593a6cf8adcf4c2f2f97164ea4ec133 Fix for bug 315793 . Make shlibsign run in the OBJDIR rather than the source directory . r=nelson
julien.pierre.bugs%sun.com
parents: 6193
diff changeset
   377
endif
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   378
endif
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   379
9483
21d0ab697f080238d0ea7ddc117806aedf14f594 Bug 532417: Support building NSS in a directory with spaces in path names
wtc%google.com
parents: 9360
diff changeset
   380
# The quotes allow absolute paths to contain spaces.
21d0ab697f080238d0ea7ddc117806aedf14f594 Bug 532417: Support building NSS in a directory with spaces in path names
wtc%google.com
parents: 9360
diff changeset
   381
core_abspath = "$(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(PWD)/$(1)))"
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   382
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   383
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   384
	@$(MAKE_OBJDIR)
1443
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
   385
ifdef USE_NT_C_SYNTAX
7564
fdc8d37bdc764c02442502c2016403b2d174cf59 Bugzilla Bug 345482: changed abspath to core_abspath to avoid conflict with
wtchang%redhat.com
parents: 7465
diff changeset
   386
	$(CC) -Fo$@ -c $(CFLAGS) $(call core_abspath,$<)
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   387
else
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   388
ifdef NEED_ABSOLUTE_PATH
7564
fdc8d37bdc764c02442502c2016403b2d174cf59 Bugzilla Bug 345482: changed abspath to core_abspath to avoid conflict with
wtchang%redhat.com
parents: 7465
diff changeset
   389
	$(CC) -o $@ -c $(CFLAGS) $(call core_abspath,$<)
2260
jpierre%netscape.com
parents: 2223
diff changeset
   390
else
1464
ae97f3093cc6f1b5bbf5d6ba869acecfab095801 Changes to allow NT to compile to a separate build tree.
relyea%netscape.com
parents: 1443
diff changeset
   391
	$(CC) -o $@ -c $(CFLAGS) $<
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   392
endif
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   393
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   394
1593
7a07504328cb112d11fe6fde58485a0ab6a60022 Bugzilla bug #83811: added a new implicit rule to build BUILT_CSRCS
wtc%netscape.com
parents: 1567
diff changeset
   395
$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c
7a07504328cb112d11fe6fde58485a0ab6a60022 Bugzilla bug #83811: added a new implicit rule to build BUILT_CSRCS
wtc%netscape.com
parents: 1567
diff changeset
   396
ifdef USE_NT_C_SYNTAX
7564
fdc8d37bdc764c02442502c2016403b2d174cf59 Bugzilla Bug 345482: changed abspath to core_abspath to avoid conflict with
wtchang%redhat.com
parents: 7465
diff changeset
   397
	$(CC) -Fo$@ -c $(CFLAGS) $(call core_abspath,$<)
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   398
else
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   399
ifdef NEED_ABSOLUTE_PATH
7564
fdc8d37bdc764c02442502c2016403b2d174cf59 Bugzilla Bug 345482: changed abspath to core_abspath to avoid conflict with
wtchang%redhat.com
parents: 7465
diff changeset
   400
	$(CC) -o $@ -c $(CFLAGS) $(call core_abspath,$<)
1593
7a07504328cb112d11fe6fde58485a0ab6a60022 Bugzilla bug #83811: added a new implicit rule to build BUILT_CSRCS
wtc%netscape.com
parents: 1567
diff changeset
   401
else
7a07504328cb112d11fe6fde58485a0ab6a60022 Bugzilla bug #83811: added a new implicit rule to build BUILT_CSRCS
wtc%netscape.com
parents: 1567
diff changeset
   402
	$(CC) -o $@ -c $(CFLAGS) $<
7a07504328cb112d11fe6fde58485a0ab6a60022 Bugzilla bug #83811: added a new implicit rule to build BUILT_CSRCS
wtc%netscape.com
parents: 1567
diff changeset
   403
endif
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   404
endif
1593
7a07504328cb112d11fe6fde58485a0ab6a60022 Bugzilla bug #83811: added a new implicit rule to build BUILT_CSRCS
wtc%netscape.com
parents: 1567
diff changeset
   405
4367
082d70643bc02e384e716f1610dc65c2c554878d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
wtc%netscape.com
parents: 4355
diff changeset
   406
ifneq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   407
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.s
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   408
	@$(MAKE_OBJDIR)
1468
f774be4c4cefd807415813eb868e38ea31f5b60f Use the correct Make variables in the .cpp .s .S and .asm rules to vpath works
relyea%netscape.com
parents: 1467
diff changeset
   409
	$(AS) -o $@ $(ASFLAGS) -c $<
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   410
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   411
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   412
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.asm
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   413
	@$(MAKE_OBJDIR)
1468
f774be4c4cefd807415813eb868e38ea31f5b60f Use the correct Make variables in the .cpp .s .S and .asm rules to vpath works
relyea%netscape.com
parents: 1467
diff changeset
   414
	$(AS) -Fo$@ $(ASFLAGS) -c $<
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   415
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   416
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.S
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   417
	@$(MAKE_OBJDIR)
1468
f774be4c4cefd807415813eb868e38ea31f5b60f Use the correct Make variables in the .cpp .s .S and .asm rules to vpath works
relyea%netscape.com
parents: 1467
diff changeset
   418
	$(AS) -o $@ $(ASFLAGS) -c $<
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   419
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   420
$(OBJDIR)/$(PROG_PREFIX)%: %.cpp
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   421
	@$(MAKE_OBJDIR)
1443
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
   422
ifdef USE_NT_C_SYNTAX
7564
fdc8d37bdc764c02442502c2016403b2d174cf59 Bugzilla Bug 345482: changed abspath to core_abspath to avoid conflict with
wtchang%redhat.com
parents: 7465
diff changeset
   423
	$(CCC) -Fo$@ -c $(CFLAGS) $(call core_abspath,$<)
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   424
else
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   425
ifdef NEED_ABSOLUTE_PATH
7564
fdc8d37bdc764c02442502c2016403b2d174cf59 Bugzilla Bug 345482: changed abspath to core_abspath to avoid conflict with
wtchang%redhat.com
parents: 7465
diff changeset
   426
	$(CCC) -o $@ -c $(CFLAGS) $(call core_abspath,$<)
2260
jpierre%netscape.com
parents: 2223
diff changeset
   427
else
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   428
	$(CCC) -o $@ -c $(CFLAGS) $<
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   429
endif
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   430
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   431
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   432
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   433
# Please keep the next two rules in sync.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   434
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   435
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cc
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   436
	@$(MAKE_OBJDIR)
1468
f774be4c4cefd807415813eb868e38ea31f5b60f Use the correct Make variables in the .cpp .s .S and .asm rules to vpath works
relyea%netscape.com
parents: 1467
diff changeset
   437
	$(CCC) -o $@ -c $(CFLAGS) $<
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   438
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   439
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cpp
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   440
	@$(MAKE_OBJDIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   441
ifdef STRICT_CPLUSPLUS_SUFFIX
1468
f774be4c4cefd807415813eb868e38ea31f5b60f Use the correct Make variables in the .cpp .s .S and .asm rules to vpath works
relyea%netscape.com
parents: 1467
diff changeset
   442
	echo "#line 1 \"$<\"" | cat - $< > $(OBJDIR)/t_$*.cc
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   443
	$(CCC) -o $@ -c $(CFLAGS) $(OBJDIR)/t_$*.cc
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   444
	rm -f $(OBJDIR)/t_$*.cc
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   445
else
1443
349a74fa4b7d75b394cfa6ce1c7e6297d4afb676 Add client requested features to coreconf:
relyea%netscape.com
parents: 1246
diff changeset
   446
ifdef USE_NT_C_SYNTAX
7564
fdc8d37bdc764c02442502c2016403b2d174cf59 Bugzilla Bug 345482: changed abspath to core_abspath to avoid conflict with
wtchang%redhat.com
parents: 7465
diff changeset
   447
	$(CCC) -Fo$@ -c $(CFLAGS) $(call core_abspath,$<)
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   448
else
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   449
ifdef NEED_ABSOLUTE_PATH
7564
fdc8d37bdc764c02442502c2016403b2d174cf59 Bugzilla Bug 345482: changed abspath to core_abspath to avoid conflict with
wtchang%redhat.com
parents: 7465
diff changeset
   450
	$(CCC) -o $@ -c $(CFLAGS) $(call core_abspath,$<)
1185
9ef1248a0845ca56f8d2a9c38a571ceaaa5c8ab4 Bugzilla bug #62855: make the rule to build .cpp files work for OS/2
wtc%netscape.com
parents: 1175
diff changeset
   451
else
1468
f774be4c4cefd807415813eb868e38ea31f5b60f Use the correct Make variables in the .cpp .s .S and .asm rules to vpath works
relyea%netscape.com
parents: 1467
diff changeset
   452
	$(CCC) -o $@ -c $(CFLAGS) $<
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   453
endif
4355
27dbd02c8a4fefbe6059981206c614b2fbfcaaf0 Fix for 202058 - Compile source files wit absolute pathnames to ease debugging on Win32 & OS/2
jpierre%netscape.com
parents: 4332
diff changeset
   454
endif
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   455
endif #STRICT_CPLUSPLUS_SUFFIX
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   456
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   457
%.i: %.cpp
5450
b2cc7baadd5988af9e93921a982f2b9481adac87 Bugzilla bug 267839: use $< and $@ in makefile rules where appropriate.
wchang0222%aol.com
parents: 5431
diff changeset
   458
	$(CCC) -C -E $(CFLAGS) $< > $@
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   459
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   460
%.i: %.c
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   461
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   462
	$(CC) -C /P $(CFLAGS) $< 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   463
else
5450
b2cc7baadd5988af9e93921a982f2b9481adac87 Bugzilla bug 267839: use $< and $@ in makefile rules where appropriate.
wchang0222%aol.com
parents: 5431
diff changeset
   464
	$(CC) -C -E $(CFLAGS) $< > $@
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   465
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   466
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   467
ifneq (,$(filter-out WIN%,$(OS_TARGET)))
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   468
%.i: %.s
5450
b2cc7baadd5988af9e93921a982f2b9481adac87 Bugzilla bug 267839: use $< and $@ in makefile rules where appropriate.
wchang0222%aol.com
parents: 5431
diff changeset
   469
	$(CC) -C -E $(CFLAGS) $< > $@
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   470
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   471
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   472
%: %.pl
5450
b2cc7baadd5988af9e93921a982f2b9481adac87 Bugzilla bug 267839: use $< and $@ in makefile rules where appropriate.
wchang0222%aol.com
parents: 5431
diff changeset
   473
	rm -f $@; cp $< $@; chmod +x $@
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   474
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   475
%: %.sh
5450
b2cc7baadd5988af9e93921a982f2b9481adac87 Bugzilla bug 267839: use $< and $@ in makefile rules where appropriate.
wchang0222%aol.com
parents: 5431
diff changeset
   476
	rm -f $@; cp $< $@; chmod +x $@
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   477
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   478
################################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   479
# Bunch of things that extend the 'export' rule (in order):
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   480
################################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   481
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   482
$(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) $(JMCSRCDIR)::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   483
	@if test ! -d $@; then	    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   484
		echo Creating $@;   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   485
		rm -rf $@;	    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   486
		$(NSINSTALL) -D $@; \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   487
	fi
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   488
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   489
################################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   490
## IDL_GEN
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   491
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   492
ifneq ($(IDL_GEN),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   493
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   494
#export::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   495
#	$(IDL2JAVA) $(IDL_GEN)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   496
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   497
#all:: export
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   498
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   499
#clobber::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   500
#	rm -f $(IDL_GEN:.idl=.class)	# XXX wrong!
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   501
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   502
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   503
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   504
################################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   505
### JSRCS -- for compiling java files
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   506
###
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   507
###          NOTE:  For backwards compatibility, if $(NETLIBDEPTH) is defined,
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   508
###                 replace $(CORE_DEPTH) with $(NETLIBDEPTH).
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   509
###
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   510
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   511
ifneq ($(JSRCS),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   512
ifneq ($(JAVAC),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   513
ifdef NETLIBDEPTH
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   514
	CORE_DEPTH := $(NETLIBDEPTH)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   515
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   516
7800
837895a8352aed614a9c7b21349268f4d041a070 Bug 82268, Builds use wrong version of perl
neil.williams%sun.com
parents: 7799
diff changeset
   517
JAVA_EXPORT_SRCS=$(shell $(PERL) $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG)	-d $(JAVA_DESTPATH)/$(PACKAGE) $(JSRCS) $(PRIVATE_JSRCS))
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   518
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   519
export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   520
ifneq ($(JAVA_EXPORT_SRCS),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   521
	$(JAVAC) $(JAVA_EXPORT_SRCS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   522
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   523
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   524
all:: export
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   525
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   526
clobber::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   527
	rm -f $(SOURCE_XP_DIR)/classes/$(PACKAGE)/*.class
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   528
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   529
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   530
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   531
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   532
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   533
# JDIRS -- like JSRCS, except you can give a list of directories and it will
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   534
# compile all the out-of-date java files in those directories.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   535
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   536
# NOTE: recursing through these can speed things up, but they also cause
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   537
# some builds to run out of memory
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   538
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   539
# NOTE:  For backwards compatibility, if $(NETLIBDEPTH) is defined,
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   540
#        replace $(CORE_DEPTH) with $(NETLIBDEPTH).
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   541
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   542
ifdef JDIRS
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   543
ifneq ($(JAVAC),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   544
ifdef NETLIBDEPTH
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   545
	CORE_DEPTH := $(NETLIBDEPTH)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   546
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   547
1657
af35fa59a44875443861dc4c70a2c1f623be9695 Make JSS buildable with shmsdos.exe.
nicolson%netscape.com
parents: 1639
diff changeset
   548
# !!!!! THIS WILL CRASH SHMSDOS.EXE !!!!!
af35fa59a44875443861dc4c70a2c1f623be9695 Make JSS buildable with shmsdos.exe.
nicolson%netscape.com
parents: 1639
diff changeset
   549
# shmsdos does not support shell variables. It will crash when it tries
af35fa59a44875443861dc4c70a2c1f623be9695 Make JSS buildable with shmsdos.exe.
nicolson%netscape.com
parents: 1639
diff changeset
   550
# to parse the '=' character. A solution is to rewrite outofdate.pl so it
af35fa59a44875443861dc4c70a2c1f623be9695 Make JSS buildable with shmsdos.exe.
nicolson%netscape.com
parents: 1639
diff changeset
   551
# takes the Javac command as an argument and executes the command itself,
af35fa59a44875443861dc4c70a2c1f623be9695 Make JSS buildable with shmsdos.exe.
nicolson%netscape.com
parents: 1639
diff changeset
   552
# instead of returning a list of files.
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   553
export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE)
1657
af35fa59a44875443861dc4c70a2c1f623be9695 Make JSS buildable with shmsdos.exe.
nicolson%netscape.com
parents: 1639
diff changeset
   554
	@echo "!!! THIS COMMAND IS BROKEN ON WINDOWS--SEE rules.mk FOR DETAILS !!!"
af35fa59a44875443861dc4c70a2c1f623be9695 Make JSS buildable with shmsdos.exe.
nicolson%netscape.com
parents: 1639
diff changeset
   555
	return -1
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   556
	@for d in $(JDIRS); do							\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   557
		if test -d $$d; then						\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   558
			set $(EXIT_ON_ERROR);					\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   559
			files=`echo $$d/*.java`;				\
7800
837895a8352aed614a9c7b21349268f4d041a070 Bug 82268, Builds use wrong version of perl
neil.williams%sun.com
parents: 7799
diff changeset
   560
			list=`$(PERL) $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG)	\
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   561
				    -d $(JAVA_DESTPATH)/$(PACKAGE) $$files`;	\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   562
			if test "$${list}x" != "x"; then			\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   563
			    echo Building all java files in $$d;		\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   564
			    echo $(JAVAC) $$list;				\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   565
			    $(JAVAC) $$list;					\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   566
			fi;							\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   567
			set +e;							\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   568
		else								\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   569
			echo "Skipping non-directory $$d...";			\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   570
		fi;								\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   571
		$(CLICK_STOPWATCH);						\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   572
	done
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   573
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   574
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   575
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   576
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   577
# JDK_GEN -- for generating "old style" native methods 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   578
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   579
# Generate JDK Headers and Stubs into the '_gen' and '_stubs' directory
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   580
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   581
# NOTE:  For backwards compatibility, if $(NETLIBDEPTH) is defined,
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   582
#        replace $(CORE_DEPTH) with $(NETLIBDEPTH).
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   583
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   584
ifneq ($(JDK_GEN),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   585
ifneq ($(JAVAH),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   586
ifdef NSBUILDROOT
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   587
	INCLUDES += -I$(JDK_GEN_DIR) -I$(SOURCE_XP_DIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   588
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   589
	INCLUDES += -I$(JDK_GEN_DIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   590
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   591
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   592
ifdef NETLIBDEPTH
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   593
	CORE_DEPTH := $(NETLIBDEPTH)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   594
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   595
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   596
JDK_PACKAGE_CLASSES	:= $(JDK_GEN)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   597
JDK_PATH_CLASSES	:= $(subst .,/,$(JDK_PACKAGE_CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   598
JDK_HEADER_CLASSFILES	:= $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   599
JDK_STUB_CLASSFILES	:= $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   600
JDK_HEADER_CFILES	:= $(patsubst %,$(JDK_GEN_DIR)/%.h,$(JDK_GEN))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   601
JDK_STUB_CFILES		:= $(patsubst %,$(JDK_STUB_DIR)/%.c,$(JDK_GEN))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   602
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   603
$(JDK_HEADER_CFILES): $(JDK_HEADER_CLASSFILES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   604
$(JDK_STUB_CFILES): $(JDK_STUB_CLASSFILES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   605
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   606
export::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   607
	@echo Generating/Updating JDK headers 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   608
	$(JAVAH) -d $(JDK_GEN_DIR) $(JDK_PACKAGE_CLASSES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   609
	@echo Generating/Updating JDK stubs
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   610
	$(JAVAH) -stubs -d $(JDK_STUB_DIR) $(JDK_PACKAGE_CLASSES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   611
ifndef NO_MAC_JAVA_SHIT
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   612
	@if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then						\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   613
		echo "!!! You need to have a ns/lib/mac/Java directory checked out.";		\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   614
		echo "!!! This allows us to automatically update generated files for the mac.";	\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   615
		echo "!!! If you see any modified files there, please check them in.";		\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   616
	fi
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   617
	@echo Generating/Updating JDK headers for the Mac
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   618
	$(JAVAH) -mac -d $(CORE_DEPTH)/lib/mac/Java/_gen $(JDK_PACKAGE_CLASSES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   619
	@echo Generating/Updating JDK stubs for the Mac
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   620
	$(JAVAH) -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_stubs $(JDK_PACKAGE_CLASSES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   621
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   622
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   623
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   624
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   625
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   626
# JRI_GEN -- for generating "old style" JRI native methods
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   627
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   628
# Generate JRI Headers and Stubs into the 'jri' directory
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   629
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   630
# NOTE:  For backwards compatibility, if $(NETLIBDEPTH) is defined,
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   631
#        replace $(CORE_DEPTH) with $(NETLIBDEPTH).
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   632
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   633
ifneq ($(JRI_GEN),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   634
ifneq ($(JAVAH),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   635
ifdef NSBUILDROOT
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   636
	INCLUDES += -I$(JRI_GEN_DIR) -I$(SOURCE_XP_DIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   637
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   638
	INCLUDES += -I$(JRI_GEN_DIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   639
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   640
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   641
ifdef NETLIBDEPTH
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   642
	CORE_DEPTH := $(NETLIBDEPTH)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   643
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   644
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   645
JRI_PACKAGE_CLASSES	:= $(JRI_GEN)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   646
JRI_PATH_CLASSES	:= $(subst .,/,$(JRI_PACKAGE_CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   647
JRI_HEADER_CLASSFILES	:= $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   648
JRI_STUB_CLASSFILES	:= $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   649
JRI_HEADER_CFILES	:= $(patsubst %,$(JRI_GEN_DIR)/%.h,$(JRI_GEN))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   650
JRI_STUB_CFILES		:= $(patsubst %,$(JRI_GEN_DIR)/%.c,$(JRI_GEN))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   651
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   652
$(JRI_HEADER_CFILES): $(JRI_HEADER_CLASSFILES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   653
$(JRI_STUB_CFILES): $(JRI_STUB_CLASSFILES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   654
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   655
export::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   656
	@echo Generating/Updating JRI headers 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   657
	$(JAVAH) -jri -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   658
	@echo Generating/Updating JRI stubs
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   659
	$(JAVAH) -jri -stubs -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   660
ifndef NO_MAC_JAVA_SHIT
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   661
	@if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then						\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   662
		echo "!!! You need to have a ns/lib/mac/Java directory checked out.";		\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   663
		echo "!!! This allows us to automatically update generated files for the mac.";	\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   664
		echo "!!! If you see any modified files there, please check them in.";		\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   665
	fi
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   666
	@echo Generating/Updating JRI headers for the Mac
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   667
	$(JAVAH) -jri -mac -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   668
	@echo Generating/Updating JRI stubs for the Mac
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   669
	$(JAVAH) -jri -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   670
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   671
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   672
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   673
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   674
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   675
# JNI_GEN -- for generating JNI native methods
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   676
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   677
# Generate JNI Headers into the 'jni' directory
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   678
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   679
ifneq ($(JNI_GEN),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   680
ifneq ($(JAVAH),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   681
JNI_HEADERS		:= $(patsubst %,$(JNI_GEN_DIR)/%.h,$(JNI_GEN))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   682
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   683
export::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   684
	@if test ! -d $(JNI_GEN_DIR); then						\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   685
		echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN);			\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   686
		$(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN);				\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   687
	else										\
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   688
		echo "Checking for out of date header files" ;                          \
7800
837895a8352aed614a9c7b21349268f4d041a070 Bug 82268, Builds use wrong version of perl
neil.williams%sun.com
parents: 7799
diff changeset
   689
		$(PERL) $(CORE_DEPTH)/coreconf/jniregen.pl $(PERLARG)			\
1657
af35fa59a44875443861dc4c70a2c1f623be9695 Make JSS buildable with shmsdos.exe.
nicolson%netscape.com
parents: 1639
diff changeset
   690
		 -d $(JAVA_DESTPATH) -j "$(JAVAH) -jni -d $(JNI_GEN_DIR)" $(JNI_GEN);\
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   691
	fi
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   692
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   693
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   694
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   695
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   696
# JMC_EXPORT -- for declaring which java classes are to be exported for jmc
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   697
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   698
ifneq ($(JMC_EXPORT),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   699
JMC_EXPORT_PATHS	:= $(subst .,/,$(JMC_EXPORT))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   700
JMC_EXPORT_FILES	:= $(patsubst %,$(JAVA_DESTPATH)/$(PACKAGE)/%.class,$(JMC_EXPORT_PATHS))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   701
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   702
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   703
# We're doing NSINSTALL -t here (copy mode) because calling INSTALL will pick up 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   704
# your NSDISTMODE and make links relative to the current directory. This is a
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   705
# problem because the source isn't in the current directory:
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   706
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   707
export:: $(JMC_EXPORT_FILES) $(JMCSRCDIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   708
	$(NSINSTALL) -t -m 444 $(JMC_EXPORT_FILES) $(JMCSRCDIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   709
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   710
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   711
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   712
# JMC_GEN -- for generating java modules
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   713
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   714
# Provide default export & install rules when using JMC_GEN
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   715
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   716
ifneq ($(JMC_GEN),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   717
ifneq ($(JMC),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   718
	INCLUDES    += -I$(JMC_GEN_DIR) -I.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   719
	JMC_HEADERS := $(patsubst %,$(JMC_GEN_DIR)/%.h,$(JMC_GEN))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   720
	JMC_STUBS   := $(patsubst %,$(JMC_GEN_DIR)/%.c,$(JMC_GEN))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   721
	JMC_OBJS    := $(patsubst %,$(OBJDIR)/%$(OBJ_SUFFIX),$(JMC_GEN))
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   722
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   723
$(JMC_GEN_DIR)/M%.h: $(JMCSRCDIR)/%.class
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   724
	$(JMC) -d $(JMC_GEN_DIR) -interface $(JMC_GEN_FLAGS) $(?F:.class=)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   725
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   726
$(JMC_GEN_DIR)/M%.c: $(JMCSRCDIR)/%.class
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   727
	$(JMC) -d $(JMC_GEN_DIR) -module $(JMC_GEN_FLAGS) $(?F:.class=)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   728
5450
b2cc7baadd5988af9e93921a982f2b9481adac87 Bugzilla bug 267839: use $< and $@ in makefile rules where appropriate.
wchang0222%aol.com
parents: 5431
diff changeset
   729
$(OBJDIR)/M%$(OBJ_SUFFIX): $(JMC_GEN_DIR)/M%.c $(JMC_GEN_DIR)/M%.h
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   730
	@$(MAKE_OBJDIR)
5450
b2cc7baadd5988af9e93921a982f2b9481adac87 Bugzilla bug 267839: use $< and $@ in makefile rules where appropriate.
wchang0222%aol.com
parents: 5431
diff changeset
   731
	$(CC) -o $@ -c $(CFLAGS) $<
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   732
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   733
export:: $(JMC_HEADERS) $(JMC_STUBS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   734
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   735
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   736
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   737
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   738
# Copy each element of EXPORTS to $(SOURCE_XP_DIR)/public/$(MODULE)/
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   739
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   740
PUBLIC_EXPORT_DIR = $(SOURCE_XP_DIR)/public/$(MODULE)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   741
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   742
ifneq ($(EXPORTS),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   743
$(PUBLIC_EXPORT_DIR)::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   744
	@if test ! -d $@; then	    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   745
		echo Creating $@;   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   746
		$(NSINSTALL) -D $@; \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   747
	fi
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   748
1504
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   749
export:: $(PUBLIC_EXPORT_DIR) 
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   750
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   751
export:: $(EXPORTS) 
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   752
	$(INSTALL) -m 444 $^ $(PUBLIC_EXPORT_DIR)
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   753
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   754
export:: $(BUILT_SRCS)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   755
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   756
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   757
# Duplicate export rule for private exports, with different directories
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   758
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   759
PRIVATE_EXPORT_DIR = $(SOURCE_XP_DIR)/private/$(MODULE)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   760
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   761
ifneq ($(PRIVATE_EXPORTS),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   762
$(PRIVATE_EXPORT_DIR)::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   763
	@if test ! -d $@; then	    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   764
		echo Creating $@;   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   765
		$(NSINSTALL) -D $@; \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   766
	fi
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   767
1504
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   768
private_export:: $(PRIVATE_EXPORT_DIR)
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   769
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   770
private_export:: $(PRIVATE_EXPORTS) 
7f52f4f35d36b70481b32dbcbeef6236bb7a8186 Use gmake's VPATH feature instead of copying source files.
nelsonb%netscape.com
parents: 1468
diff changeset
   771
	$(INSTALL) -m 444 $^ $(PRIVATE_EXPORT_DIR)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   772
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   773
private_export:: 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   774
	@echo There are no private exports.;
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   775
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   776
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   777
##########################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   778
###   RULES FOR RUNNING REGRESSION SUITE TESTS
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   779
###   REQUIRES 'REGRESSION_SPEC' TO BE SET TO THE NAME OF A REGRESSION SPECFILE
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   780
###   AND RESULTS_SUBDIR TO BE SET TO SOMETHING LIKE SECURITY/PKCS5
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   781
##########################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   782
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   783
TESTS_DIR = $(RESULTS_DIR)/$(RESULTS_SUBDIR)/$(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   784
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   785
ifneq ($(REGRESSION_SPEC),)
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   786
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   787
ifneq ($(BUILD_OPT),)
7800
837895a8352aed614a9c7b21349268f4d041a070 Bug 82268, Builds use wrong version of perl
neil.williams%sun.com
parents: 7799
diff changeset
   788
REGDATE = $(subst \ ,, $(shell $(PERL)  $(CORE_DEPTH)/$(MODULE)/scripts/now))
2734
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   789
endif
91b01eda9168a4c8ca0b4eb7a631b9baada5a559 Change most coreconf and NSS makefiles to use OS_TARGET (which can
nelsonb%netscape.com
parents: 2368
diff changeset
   790
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   791
tests:: $(REGRESSION_SPEC) 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   792
	cd $(PLATFORM); \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   793
	../$(SOURCE_MD_DIR)/bin/regress$(PROG_SUFFIX) specfile=../$(REGRESSION_SPEC) progress $(EXTRA_REGRESS_OPTIONS); \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   794
	if test ! -d $(TESTS_DIR); then \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   795
		echo Creating $(TESTS_DIR);   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   796
		$(NSINSTALL) -D $(TESTS_DIR); \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   797
	fi
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   798
ifneq ($(BUILD_OPT),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   799
	$(NSINSTALL) -m 664 $(PLATFORM)/$(REGDATE).sum $(TESTS_DIR); \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   800
	$(NSINSTALL) -m 664 $(PLATFORM)/$(REGDATE).htm $(TESTS_DIR); \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   801
	echo "Please now make sure your results files are copied to $(TESTS_DIR), "; \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   802
	echo "then run 'reporter specfile=$(RESULTS_DIR)/rptspec'"
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   803
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   804
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   805
tests:: 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   806
	@echo Error: you didn't specify REGRESSION_SPEC in your manifest.mn file!;
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   807
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   808
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   809
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   810
# Duplicate export rule for releases, with different directories
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   811
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   812
ifneq ($(EXPORTS),)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   813
$(SOURCE_RELEASE_XP_DIR)/include::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   814
	@if test ! -d $@; then	    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   815
		echo Creating $@;   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   816
		$(NSINSTALL) -D $@; \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   817
	fi
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   818
2200
ead61dc4f76ba41ca086c20a86808659d2337c43 Bugzilla bug 106388: made the release_export rule work with VPATH.
wtc%netscape.com
parents: 2146
diff changeset
   819
release_export:: $(SOURCE_RELEASE_XP_DIR)/include
ead61dc4f76ba41ca086c20a86808659d2337c43 Bugzilla bug 106388: made the release_export rule work with VPATH.
wtc%netscape.com
parents: 2146
diff changeset
   820
ead61dc4f76ba41ca086c20a86808659d2337c43 Bugzilla bug 106388: made the release_export rule work with VPATH.
wtc%netscape.com
parents: 2146
diff changeset
   821
release_export:: $(EXPORTS)
ead61dc4f76ba41ca086c20a86808659d2337c43 Bugzilla bug 106388: made the release_export rule work with VPATH.
wtc%netscape.com
parents: 2146
diff changeset
   822
	$(INSTALL) -m 444 $^ $(SOURCE_RELEASE_XP_DIR)/include
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   823
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   824
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   825
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   826
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   827
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   828
################################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   829
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   830
-include $(DEPENDENCIES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   831
9273
1a67997d7814baee147335745519324747d8f762 Bug 491044: Remove support for VMS (a.k.a., OpenVMS) from coreconf, r=rrelyea
nelson%bolyard.com
parents: 8958
diff changeset
   832
ifneq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   833
# Can't use sed because of its 4000-char line length limit, so resort to perl
7298
2cbea42f54f59c2aa209c91a02add7d6b122ba8a Bugzilla Bug 325148: worked around the change of backslash-newline behavior
wtchang%redhat.com
parents: 6796
diff changeset
   834
PERL_DEPENDENCIES_PROGRAM =                                                   \
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   835
	    open(MD, "< $(DEPENDENCIES)");                                    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   836
	    while (<MD>) {                                                    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   837
		if (m@ \.*/*$< @) {                                           \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   838
		    $$found = 1;                                              \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   839
		    last;                                                     \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   840
		}                                                             \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   841
	    }                                                                 \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   842
	    if ($$found) {                                                    \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   843
		print "Removing stale dependency $< from $(DEPENDENCIES)\n";  \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   844
		seek(MD, 0, 0);                                               \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   845
		$$tmpname = "$(OBJDIR)/fix.md" . $$$$;                        \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   846
		open(TMD, "> " . $$tmpname);                                  \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   847
		while (<MD>) {                                                \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   848
		    s@ \.*/*$< @ @;                                           \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   849
		    if (!print TMD "$$_") {                                   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   850
			unlink(($$tmpname));                                  \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   851
			exit(1);                                              \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   852
		    }                                                         \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   853
		}                                                             \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   854
		close(TMD);                                                   \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   855
		if (!rename($$tmpname, "$(DEPENDENCIES)")) {                  \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   856
		    unlink(($$tmpname));                                      \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   857
		}                                                             \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   858
	    } elsif ("$<" ne "$(DEPENDENCIES)") {                             \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   859
		print "$(MAKE): *** No rule to make target $<.  Stop.\n";     \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   860
		exit(1);                                                      \
7298
2cbea42f54f59c2aa209c91a02add7d6b122ba8a Bugzilla Bug 325148: worked around the change of backslash-newline behavior
wtchang%redhat.com
parents: 6796
diff changeset
   861
	    }
2cbea42f54f59c2aa209c91a02add7d6b122ba8a Bugzilla Bug 325148: worked around the change of backslash-newline behavior
wtchang%redhat.com
parents: 6796
diff changeset
   862
2cbea42f54f59c2aa209c91a02add7d6b122ba8a Bugzilla Bug 325148: worked around the change of backslash-newline behavior
wtchang%redhat.com
parents: 6796
diff changeset
   863
.DEFAULT:
7800
837895a8352aed614a9c7b21349268f4d041a070 Bug 82268, Builds use wrong version of perl
neil.williams%sun.com
parents: 7799
diff changeset
   864
	@$(PERL) -e '$(PERL_DEPENDENCIES_PROGRAM)'
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   865
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   866
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   867
#############################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   868
# X dependency system
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   869
#############################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   870
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   871
ifdef MKDEPENDENCIES
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   872
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   873
# For Windows, $(MKDEPENDENCIES) must be -included before including rules.mk
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   874
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   875
$(MKDEPENDENCIES)::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   876
	@$(MAKE_OBJDIR)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   877
	touch $(MKDEPENDENCIES) 
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   878
	chmod u+w $(MKDEPENDENCIES) 
9636
08ec5c1190ab30732dcdda91ce539f5898aa4bd5 Bug 506041: Correct misspellings in source code comments
nelson%bolyard.com
parents: 9483
diff changeset
   879
#on NT, the preceding touch command creates a read-only file !?!?!
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   880
#which is why we have to explicitly chmod it.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   881
	$(MKDEPEND) -p$(OBJDIR_NAME)/ -o'$(OBJ_SUFFIX)' -f$(MKDEPENDENCIES) \
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   882
$(NOMD_CFLAGS) $(YOPT) $(CSRCS) $(CPPSRCS) $(ASFILES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   883
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   884
$(MKDEPEND):: $(MKDEPEND_DIR)/*.c $(MKDEPEND_DIR)/*.h
10484
cd1a29f73bf02b7698be858e1328f9cd2553718e Bug 794896 - Make the NSS build system friendly to pymake, patch by Mike Hommey, r=rrelyea
kaie%kuix.de
parents: 10324
diff changeset
   885
	$(MAKE) -C $(MKDEPEND_DIR)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   886
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   887
ifdef OBJS
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   888
depend:: $(MKDEPEND) $(MKDEPENDENCIES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   889
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   890
depend::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   891
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   892
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   893
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   894
dependclean::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   895
	rm -f $(MKDEPENDENCIES)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   896
	+$(LOOP_OVER_DIRS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   897
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   898
#-include $(NSINSTALL_DIR)/$(OBJDIR)/depend.mk
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   899
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   900
else
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   901
depend::
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   902
endif
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   903
8958
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   904
#
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   905
# HACK ALERT
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   906
#
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   907
# The only purpose of this rule is to pass Mozilla's Tinderbox depend
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   908
# builds (http://tinderbox.mozilla.org/showbuilds.cgi).  Mozilla's
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   909
# Tinderbox builds NSS continuously as part of the Mozilla client.
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   910
# Because NSS's make depend is not implemented, whenever we change
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   911
# an NSS header file, the depend build does not recompile the NSS
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   912
# files that depend on the header.
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   913
#
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   914
# This rule makes all the objects depend on a dummy header file.
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   915
# Check in a change to this dummy header file to force the depend
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   916
# build to recompile everything.
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   917
#
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   918
# This rule should be removed when make depend is implemented.
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   919
#
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   920
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   921
DUMMY_DEPEND = $(CORE_DEPTH)/coreconf/coreconf.dep
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   922
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   923
$(filter $(OBJDIR)/%$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%$(OBJ_SUFFIX): $(DUMMY_DEPEND)
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   924
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   925
# END OF HACK
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   926
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   927
################################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   928
# Special gmake rules.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   929
################################################################################
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   930
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   931
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   932
# Re-define the list of default suffixes, so gmake won't have to churn through
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   933
# hundreds of built-in suffix rules for stuff we don't need.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   934
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   935
.SUFFIXES:
8958
b839f80e3886a58a1c297482433a63f6353b7304 Bug 474473, Want short term NSS dependencies hack
kaie%kuix.de
parents: 8587
diff changeset
   936
.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .asm .dep
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   937
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   938
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   939
# Don't delete these files if we get killed.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   940
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   941
.PRECIOUS: .java $(JDK_HEADERS) $(JDK_STUBS) $(JRI_HEADERS) $(JRI_STUBS) $(JMC_HEADERS) $(JMC_STUBS) $(JNI_HEADERS)
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   942
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   943
#
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   944
# Fake targets.  Always run these rules, even if a file/directory with that
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   945
# name already exists.
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   946
#
10493
84a2dd7ed6b9ca3883631318eb151c969bbe8c44 Bug 794896: Remove the unused makefile target $(DIRS). The '+' is not
wtc%google.com
parents: 10484
diff changeset
   947
.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs program realclean release $(OBJDIR)
203
8067d3f62e67912df3dce20f6f01ca7f64f3ffaf Initial checkin of the NSS build environment for the open source release
relyea%netscape.com
parents:
diff changeset
   948