Changes to allow NT to compile to a separate build tree.

This commit is contained in:
relyea%netscape.com 2001-04-30 16:38:43 +00:00
Родитель c6b6202d80
Коммит 7864a5a4b2
3 изменённых файлов: 28 добавлений и 101 удалений

Просмотреть файл

@ -42,13 +42,13 @@
ifdef BUILD_TREE
BUILD = $(BUILD_TREE)/nss/$(LIBRARY_NAME)
OBJDIR = $(BUILD_TREE)/nss/$(LIBRARY_NAME)
VPATH = $(BUILD_TREE)/nss/$(LIBRARY_NAME)
#VPATH = $(BUILD_TREE)/nss/$(LIBRARY_NAME)
DEPENDENCIES = $(BUILD_TREE)/nss/$(LIBRARY_NAME)/.md
else
BUILD = $(PLATFORM)
OBJDIR = $(PLATFORM)
VPATH = $(NSINSTALL_DIR)/$(PLATFORM)
#VPATH = $(NSINSTALL_DIR)/$(PLATFORM)
DEPENDENCIES = $(PLATFORM)/.md
endif

Просмотреть файл

@ -88,7 +88,7 @@ import::
"$(MDHEADER_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)/include|" \
"$(MDBINARY_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)|"
export::
export::
+$(LOOP_OVER_DIRS)
private_export::
@ -239,28 +239,8 @@ endif
endif
ifneq ($(POLICY),)
release_policy::
ifdef LIBRARY
-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(LIBRARY)
endif
ifdef SHARED_LIBRARY
-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(SHARED_LIBRARY)
endif
ifdef IMPORT_LIBRARY
-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(IMPORT_LIBRARY)
endif
ifdef PROGRAM
-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(PROGRAM)
endif
ifdef PROGRAMS
-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(PROGRAMS)
endif
+$(LOOP_OVER_DIRS)
else
release_policy::
+$(LOOP_OVER_DIRS)
endif
release_md::
ifdef LIBRARY
@ -286,10 +266,10 @@ alltags:
find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
$(PROGRAM): $(OBJS) $(EXTRA_LIBS)
$(PROGRAM): $(BUILT_SRCS) $(OBJS) $(EXTRA_LIBS)
@$(MAKE_OBJDIR)
ifeq ($(OS_ARCH),WINNT)
$(MKPROG) $(OBJS) -Fe$@ -link $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
$(MKPROG) $(subst /,\\,$(OBJS)) -Fe$@ -link $(LDFLAGS) $(subst /,\\,$(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS))
else
ifdef XP_OS2_VACPP
$(MKPROG) -Fe$@ $(CFLAGS) $(OBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
@ -301,15 +281,16 @@ endif
get_objs:
@echo $(OBJS)
$(LIBRARY): $(OBJS)
$(LIBRARY): $(BUILT_SRCS) $(OBJS)
@$(MAKE_OBJDIR)
rm -f $@
$(AR) $(OBJS)
$(AR) $(subst /,\\,$(OBJS))
$(RANLIB) $@
echo $(BUILT_SRCS) $(OBJS)
ifeq ($(OS_ARCH),OS2)
$(IMPORT_LIBRARY): $(OBJS)
$(IMPORT_LIBRARY): $(BUILT_SRCS) $(OBJS)
rm -f $@
$(IMPLIB) $@ $(patsubst %.lib,%.dll.def,$@)
$(RANLIB) $@
@ -323,7 +304,7 @@ SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(addprefix $(dir)/,$(shell $
endif
endif
$(SHARED_LIBRARY): $(OBJS) $(MAPFILE)
$(SHARED_LIBRARY): $(BUILT_SRCS) $(OBJS) $(MAPFILE)
@$(MAKE_OBJDIR)
rm -f $@
ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
@ -336,7 +317,7 @@ ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
-bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
else
ifeq ($(OS_ARCH), WINNT)
$(LINK_DLL) -MAP $(DLLBASE) $(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS)
$(LINK_DLL) -MAP $(DLLBASE) $(subst /,\\,$(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS))
else
ifeq ($(OS_ARCH),OS2)
@cmd /C "echo LIBRARY $(notdir $(basename $(SHARED_LIBRARY))) INITINSTANCE TERMINSTANCE >$@.def"
@ -405,21 +386,13 @@ WCCFLAGS1 := $(subst /,\\,$(CFLAGS))
WCCFLAGS2 := $(subst -I,-i=,$(WCCFLAGS1))
WCCFLAGS3 := $(subst -D,-d,$(WCCFLAGS2))
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): $(OBJDIR)/%.c
@$(MAKE_OBJDIR)
ifdef USE_NT_C_SYNTAX
$(CC) -Fo$@ -c $(CFLAGS) $(OBJDIR)/$*.c
else
$(CC) -o $@ -c $(CFLAGS) $(OBJDIR)/$*.c
endif
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c
@$(MAKE_OBJDIR)
@echo vpath=$(VPATH)
ifdef USE_NT_C_SYNTAX
$(CC) -Fo$@ -c $(CFLAGS) $*.c
$(CC) -Fo$@ -c $(CFLAGS) $(subst /,\\,$<)
else
$(CC) -o $@ -c $(CFLAGS) $*.c
$(CC) -o $@ -c $(CFLAGS) $<
endif
ifneq ($(OS_ARCH), WINNT)
@ -769,7 +742,7 @@ $(PUBLIC_EXPORT_DIR)::
$(NSINSTALL) -D $@; \
fi
export:: $(EXPORTS) $(PUBLIC_EXPORT_DIR)
export:: $(EXPORTS) $(PUBLIC_EXPORT_DIR) $(BUILT_SRCS)
$(INSTALL) -m 444 $(EXPORTS) $(PUBLIC_EXPORT_DIR)
endif
@ -929,5 +902,5 @@ endif
# 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 realclean release $(OBJDIR) $(DIRS)
.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs program realclean release $(OBJDIR) $(DIRS)

Просмотреть файл

@ -147,18 +147,9 @@ endif
ifdef LIBRARY_NAME
ifeq ($(OS_ARCH), WINNT)
#
# Win16 requires library names conforming to the 8.3 rule.
# other platforms do not.
#
LIBRARY = $(OBJDIR)/$(LIBRARY_NAME).lib
ifeq ($(OS_TARGET), WIN16)
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)16$(JDK_DEBUG_SUFFIX).dll
IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)16$(JDK_DEBUG_SUFFIX).lib
else
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll
IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib
endif
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll
IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib
else
LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME).$(LIB_SUFFIX)
ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
@ -194,30 +185,20 @@ ifndef OBJS
$(addsuffix $(OBJ_SUFFIX), $(JMC_GEN)) \
$(CSRCS:.c=$(OBJ_SUFFIX)) \
$(CPPSRCS:.cpp=$(OBJ_SUFFIX)) \
$(ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX))
OBJS = $(BUILT_CSRCS:.c=$(OBJ_SUFFIX)) \
$(ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX)) \
$(BUILT_CSRCS:.c=$(OBJ_SUFFIX)) \
$(BUILT_CPPSRCS:.cpp=$(OBJ_SUFFIX)) \
$(BUILT_ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX)) \
$(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS))
$(BUILT_ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX))
OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS))
endif
ifeq ($(OS_TARGET), WIN16)
comma := ,
empty :=
space := $(empty) $(empty)
W16OBJS := $(subst $(space),$(comma)$(space),$(strip $(OBJS)))
W16TEMP = $(OS_LIBS) $(EXTRA_LIBS)
ifeq ($(strip $(W16TEMP)),)
W16LIBS =
else
W16LIBS := library $(subst $(space),$(comma)$(space),$(strip $(W16TEMP)))
endif
ifndef BUILT_SRCS
BUILT_SRCS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), \
$(BUILT_CSRCS) $(BUILT_CPPSRCS) $(BUILT_ASFILES))
endif
ifeq ($(OS_ARCH),WINNT)
ifneq ($(OS_TARGET), WIN16)
OBJS += $(RES)
endif
MAKE_OBJDIR = $(INSTALL) -D $(OBJDIR)
else
define MAKE_OBJDIR
@ -234,7 +215,8 @@ ALL_TRASH := $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \
$(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) $(JNI_HEADERS) $(JMC_STUBS) \
$(JMC_HEADERS) $(JMC_EXPORT_FILES) so_locations \
_gen _jmc _jri _jni _stubs \
$(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class)
$(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class) \
$(BUILT_SOURCES)
ifdef JDIRS
ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS))
@ -268,9 +250,6 @@ else
endif
ifdef REQUIRES
ifeq ($(OS_TARGET),WIN16)
INCLUDES += -I$(SOURCE_XP_DIR)/public/win16
else
MODULE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/public/, $(REQUIRES))
INCLUDES += $(MODULE_INCLUDES)
ifeq ($(MODULE), sectools)
@ -278,7 +257,6 @@ else
INCLUDES += $(PRIVATE_INCLUDES)
endif
endif
endif
ifdef SYSTEM_INCL_DIR
YOPT = -Y$(SYSTEM_INCL_DIR)
@ -309,27 +287,3 @@ else
REGCOREDEPTH = $(subst \\,/,$(CORE_DEPTH))
REGDATE = $(subst \ ,, $(shell perl $(CORE_DEPTH)/$(MODULE)/scripts/now))
endif
#
# export control policy patcher program and arguments
#
PLCYPATCH = $(SOURCE_BIN_DIR)/plcypatch$(PROG_SUFFIX)
DOMESTIC_POLICY = -us
EXPORT_POLICY = -ex
FRANCE_POLICY = -fr
ifeq ($(POLICY), domestic)
PLCYPATCH_ARGS = $(DOMESTIC_POLICY)
else
ifeq ($(POLICY), export)
PLCYPATCH_ARGS = $(EXPORT_POLICY)
else
ifeq ($(POLICY), france)
PLCYPATCH_ARGS = $(FRANCE_POLICY)
else
PLCYPATCH_ARGS =
endif
endif
endif