diff options
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | cmd/shlibsign/Makefile | 5 | ||||
-rw-r--r-- | coreconf/Makefile | 2 | ||||
-rw-r--r-- | coreconf/README | 2 | ||||
-rw-r--r-- | coreconf/nsinstall/Makefile | 1 | ||||
-rw-r--r-- | coreconf/rules.mk | 118 | ||||
-rw-r--r-- | coreconf/ruleset.mk | 11 | ||||
-rw-r--r-- | lib/Makefile | 32 | ||||
-rw-r--r-- | lib/ckfw/Makefile | 3 |
9 files changed, 100 insertions, 85 deletions
@@ -47,9 +47,14 @@ include $(CORE_DEPTH)/coreconf/rules.mk # (7) Execute "local" rules. (OPTIONAL). # ####################################################################### -nss_build_all: build_nspr all latest - -nss_clean_all: clobber_nspr clobber +nss_build_all:: + $(MAKE) build_nspr + $(MAKE) all + $(MAKE) latest + +nss_clean_all:: + $(MAKE) clobber_nspr + $(MAKE) clobber NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status NSPR_CONFIGURE = $(CORE_DEPTH)/../nspr/configure diff --git a/cmd/shlibsign/Makefile b/cmd/shlibsign/Makefile index 83f90faa0..30f01ba40 100644 --- a/cmd/shlibsign/Makefile +++ b/cmd/shlibsign/Makefile @@ -95,5 +95,6 @@ else endif endif -libs install :: $(CHECKLOC) - +libs:: + $(MAKE) install + $(MAKE) $(CHECKLOC) diff --git a/coreconf/Makefile b/coreconf/Makefile index aca888216..6ba154496 100644 --- a/coreconf/Makefile +++ b/coreconf/Makefile @@ -11,5 +11,3 @@ DIRS = nsinstall include $(DEPTH)/coreconf/config.mk include $(DEPTH)/coreconf/rules.mk - -export:: libs diff --git a/coreconf/README b/coreconf/README index 4b1e410cb..835c72805 100644 --- a/coreconf/README +++ b/coreconf/README @@ -390,7 +390,7 @@ OVERVIEW of "rules.mk": "Tinderbox" to automatically generate binary releases on various platforms - tests:: automation tool used to run the + check:: automation tool used to run the "regress" and "reporter" tools on various regression test suites diff --git a/coreconf/nsinstall/Makefile b/coreconf/nsinstall/Makefile index 50128eded..08dfbc2fe 100644 --- a/coreconf/nsinstall/Makefile +++ b/coreconf/nsinstall/Makefile @@ -20,6 +20,7 @@ include $(DEPTH)/coreconf/config.mk ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET))) PROGRAM = +TARGETS = else TARGETS = $(PROGRAM) INSTALL = true diff --git a/coreconf/rules.mk b/coreconf/rules.mk index 751c8c618..bbe6a2331 100644 --- a/coreconf/rules.mk +++ b/coreconf/rules.mk @@ -13,7 +13,38 @@ # Double-Colon rules for utilizing the binary release model. # ####################################################################### -all:: export libs +all:: + $(MAKE) -C coreconf/nsinstall program + $(MAKE) export + # pre-build child dir -> parent dir dependencies + # ckfw/builtins -> ckfw + IGNORE_DIRS=1 $(MAKE) -C lib/ckfw libs + # ckfw/builtins/testlib -> ckfw/builtins + base + $(MAKE) -C lib/base libs + IGNORE_DIRS=1 $(MAKE) -C lib/ckfw/builtins libs + $(MAKE) -C lib/util libs + # softoken + legacydb -> util + sqlite + freebl + dbm + $(MAKE) -C lib/dbm libs + $(MAKE) -C lib/sqlite libs + $(MAKE) -C lib/freebl libs + # nss -> util + certhi + cryptohi + pk11wrap + certdb + pki + dev (+ base) + pkix + $(MAKE) -C lib/certhigh libs + $(MAKE) -C lib/cryptohi libs + $(MAKE) -C lib/pk11wrap libs + $(MAKE) -C lib/certdb libs + $(MAKE) -C lib/pki libs + $(MAKE) -C lib/dev libs + $(MAKE) -C lib/libpkix libs + $(MAKE) -C lib/nss libs + # smime -> nss + pkcs12 + pkcs7 + $(MAKE) -C lib/pkcs7 libs + $(MAKE) -C lib/pkcs12 libs + # all dependencies done -> finish libraries + $(MAKE) -C lib libs + # cmd library sectool + $(MAKE) -C cmd/lib libs + # everything still missing + $(MAKE) libs ifeq ($(AUTOCLEAN),1) autobuild:: clean export private_export libs program install @@ -28,6 +59,14 @@ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) USE_NT_C_SYNTAX=1 endif +ifdef DIRS +ifndef IGNORE_DIRS +$(DIRS):: + $(IGNORE_ERROR)@$(MAKE) -C $@ $(MAKECMDGOALS) + @$(CLICK_STOPWATCH) +endif +endif + # # IMPORTS will always be associated with a component. Therefore, # the "import" rule will always change directory to the top-level @@ -60,19 +99,15 @@ ifeq ($(OS_TARGET),Darwin) find $(SOURCE_MD_DIR)/lib -name "*.a" -exec $(RANLIB) {} \; endif -export:: - +$(LOOP_OVER_DIRS) +export:: $(DIRS) -private_export:: - +$(LOOP_OVER_DIRS) +private_export:: $(DIRS) -release_export:: - +$(LOOP_OVER_DIRS) +release_export:: $(DIRS) -release_classes:: - +$(LOOP_OVER_DIRS) +release_classes:: $(DIRS) -libs program install:: $(TARGETS) +libs program install:: $(DIRS) $(TARGETS) ifneq ($(LIBRARY),) $(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR) endif @@ -98,18 +133,14 @@ endif ifneq ($(PROGRAMS),) $(INSTALL) -m 775 $(PROGRAMS) $(SOURCE_BIN_DIR) endif - +$(LOOP_OVER_DIRS) -tests:: - +$(LOOP_OVER_DIRS) +check:: $(DIRS) -clean clobber:: +clean clobber:: $(DIRS) rm -rf $(ALL_TRASH) - +$(LOOP_OVER_DIRS) -realclean clobber_all:: +realclean clobber_all:: $(DIRS) rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH) - +$(LOOP_OVER_DIRS) ####################################################################### # Double-Colon rules for populating the binary release model. # @@ -202,8 +233,7 @@ endif endif -release_policy:: - +$(LOOP_OVER_DIRS) +release_policy:: $(DIRS) ifndef NO_MD_RELEASE ifdef LIBRARY @@ -223,15 +253,13 @@ ifndef NO_MD_RELEASE endif endif -release_md:: +release_md:: $(DIRS) ifneq ($(MD_LIB_RELEASE_FILES),) $(INSTALL) -m 444 $(MD_LIB_RELEASE_FILES) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR) endif ifneq ($(MD_BIN_RELEASE_FILES),) $(INSTALL) -m 555 $(MD_BIN_RELEASE_FILES) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR) endif - +$(LOOP_OVER_DIRS) - alltags: rm -f TAGS @@ -768,18 +796,13 @@ endif PUBLIC_EXPORT_DIR = $(SOURCE_XP_DIR)/public/$(MODULE) ifneq ($(EXPORTS),) -$(PUBLIC_EXPORT_DIR):: - @if test ! -d $@; then \ - echo Creating $@; \ - $(NSINSTALL) -D $@; \ - fi - -export:: $(PUBLIC_EXPORT_DIR) +$(PUBLIC_EXPORT_DIR)/d: + @$(MAKE_OBJDIR) -export:: $(EXPORTS) +$(PUBLIC_EXPORT_DIR)/%: % $(INSTALL) -m 444 $^ $(PUBLIC_EXPORT_DIR) -export:: $(BUILT_SRCS) +export:: $(addprefix $(PUBLIC_EXPORT_DIR)/,$(EXPORTS)) | $(PUBLIC_EXPORT_DIR)/d endif # Duplicate export rule for private exports, with different directories @@ -787,19 +810,16 @@ endif PRIVATE_EXPORT_DIR = $(SOURCE_XP_DIR)/private/$(MODULE) ifneq ($(PRIVATE_EXPORTS),) -$(PRIVATE_EXPORT_DIR):: - @if test ! -d $@; then \ - echo Creating $@; \ - $(NSINSTALL) -D $@; \ - fi - -private_export:: $(PRIVATE_EXPORT_DIR) +$(PRIVATE_EXPORT_DIR)/d: + @$(MAKE_OBJDIR) -private_export:: $(PRIVATE_EXPORTS) +$(PRIVATE_EXPORT_DIR)/%: % $(INSTALL) -m 444 $^ $(PRIVATE_EXPORT_DIR) + +private_export:: $(addprefix $(PRIVATE_EXPORT_DIR)/,$(PRIVATE_EXPORTS)) | $(PRIVATE_EXPORT_DIR)/d else private_export:: - @echo There are no private exports.; + @echo "There are no private exports." endif ########################################################################## @@ -816,7 +836,7 @@ ifneq ($(BUILD_OPT),) REGDATE = $(subst \ ,, $(shell $(PERL) $(CORE_DEPTH)/$(MODULE)/scripts/now)) endif -tests:: $(REGRESSION_SPEC) +check:: $(REGRESSION_SPEC) cd $(PLATFORM); \ ../$(SOURCE_MD_DIR)/bin/regress$(PROG_SUFFIX) specfile=../$(REGRESSION_SPEC) progress $(EXTRA_REGRESS_OPTIONS); \ if test ! -d $(TESTS_DIR); then \ @@ -830,8 +850,8 @@ ifneq ($(BUILD_OPT),) echo "then run 'reporter specfile=$(RESULTS_DIR)/rptspec'" endif else -tests:: - @echo Error: you didn't specify REGRESSION_SPEC in your manifest.mn file!; +check:: + @echo "Error: you didn't specify REGRESSION_SPEC in your manifest.mn file!" endif @@ -855,6 +875,7 @@ endif ################################################################################ +ifeq ($(MAKECMDGOALS),clean) -include $(DEPENDENCIES) ifneq (,$(filter-out OS2 WIN%,$(OS_TARGET))) @@ -913,21 +934,20 @@ $(MKDEPEND):: $(MKDEPEND_DIR)/*.c $(MKDEPEND_DIR)/*.h $(MAKE) -C $(MKDEPEND_DIR) ifdef OBJS -depend:: $(MKDEPEND) $(MKDEPENDENCIES) +depend:: $(DIRS) $(MKDEPEND) $(MKDEPENDENCIES) else -depend:: +depend:: $(DIRS) endif - +$(LOOP_OVER_DIRS) -dependclean:: +dependclean:: $(DIRS) rm -f $(MKDEPENDENCIES) - +$(LOOP_OVER_DIRS) #-include $(NSINSTALL_DIR)/$(OBJDIR)/depend.mk else depend:: endif +endif # # HACK ALERT @@ -972,5 +992,5 @@ $(filter $(OBJDIR)/%$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%$(OBJ_SUFFIX): $(DUMMY_DE # Fake targets. Always run these rules, even if a file/directory with that # name already exists. # -.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs program realclean release $(OBJDIR) +.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs program realclean release diff --git a/coreconf/ruleset.mk b/coreconf/ruleset.mk index e9646eecf..43ea718e4 100644 --- a/coreconf/ruleset.mk +++ b/coreconf/ruleset.mk @@ -203,15 +203,4 @@ ifdef SYSTEM_INCL_DIR YOPT = -Y$(SYSTEM_INCL_DIR) endif -ifdef DIRS -define SUBMAKE -+@echo "cd $2; $(MAKE) $1" -$(IGNORE_ERROR)@$(MAKE) -C $(2) $(1) -@$(CLICK_STOPWATCH) - -endef - - LOOP_OVER_DIRS = $(foreach dir,$(DIRS),$(call SUBMAKE,$@,$(dir))) -endif - MK_RULESET = included diff --git a/lib/Makefile b/lib/Makefile index 8eedad0b2..337b32860 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -54,22 +54,6 @@ ifndef NSS_DISABLE_LIBPKIX LIBPKIX_SRCDIR = libpkix # Add the libpkix directory to DIRS. endif -####################################################################### -# (5) Execute "global" rules. (OPTIONAL) # -####################################################################### - -include $(CORE_DEPTH)/coreconf/rules.mk - -####################################################################### -# (6) Execute "component" rules. (OPTIONAL) # -####################################################################### - - - -####################################################################### -# (7) Execute "local" rules. (OPTIONAL). # -####################################################################### - ifeq ($(NSS_BUILD_UTIL_ONLY),1) UTIL_SRCDIR = util FREEBL_SRCDIR = @@ -95,3 +79,19 @@ else endif endif endif + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### diff --git a/lib/ckfw/Makefile b/lib/ckfw/Makefile index 2902bef48..75c906a0a 100644 --- a/lib/ckfw/Makefile +++ b/lib/ckfw/Makefile @@ -6,7 +6,6 @@ include manifest.mn include $(CORE_DEPTH)/coreconf/config.mk include config.mk -include $(CORE_DEPTH)/coreconf/rules.mk ifdef NOTDEF # was ifdef MOZILLA_CLIENT NSS_BUILD_CAPI = 1 @@ -33,3 +32,5 @@ ifdef NSS_BUILD_CAPI DIRS += capi endif endif + +include $(CORE_DEPTH)/coreconf/rules.mk |