1998-03-28 02:44:41 +00:00
|
|
|
|
#
|
1999-11-06 03:40:37 +00:00
|
|
|
|
# The contents of this file are subject to the Netscape Public
|
|
|
|
|
# License Version 1.1 (the "License"); you may not use this file
|
|
|
|
|
# except in compliance with the License. You may obtain a copy of
|
|
|
|
|
# the License at http://www.mozilla.org/NPL/
|
1998-03-28 02:44:41 +00:00
|
|
|
|
#
|
1999-11-06 03:40:37 +00:00
|
|
|
|
# Software distributed under the License is distributed on an "AS
|
|
|
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
|
# implied. See the License for the specific language governing
|
|
|
|
|
# rights and limitations under the License.
|
1998-03-28 02:44:41 +00:00
|
|
|
|
#
|
1999-11-06 03:40:37 +00:00
|
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
|
#
|
|
|
|
|
# The Initial Developer of the Original Code is Netscape
|
1998-03-28 02:44:41 +00:00
|
|
|
|
# Communications Corporation. Portions created by Netscape are
|
1999-11-06 03:40:37 +00:00
|
|
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
|
# Rights Reserved.
|
|
|
|
|
#
|
|
|
|
|
# Contributor(s):
|
1998-03-28 02:44:41 +00:00
|
|
|
|
#
|
|
|
|
|
################################################################################
|
|
|
|
|
#
|
|
|
|
|
# We now use a 3-pass build system. This needs to be re-thought....
|
|
|
|
|
#
|
|
|
|
|
# Pass 1. export - Create generated headers and stubs. Publish public headers
|
1999-09-09 09:24:58 +00:00
|
|
|
|
# to dist/include.
|
1998-03-28 02:44:41 +00:00
|
|
|
|
#
|
1999-09-09 09:24:58 +00:00
|
|
|
|
# Pass 2. libs - Create libraries. Publish libraries to dist/lib.
|
1998-03-28 02:44:41 +00:00
|
|
|
|
#
|
1999-09-09 09:24:58 +00:00
|
|
|
|
# Pass 3. install - Create programs. Publish them to dist/bin.
|
1998-03-28 02:44:41 +00:00
|
|
|
|
#
|
|
|
|
|
# 'gmake' will build each of these properly, but 'gmake -jN' will break (need
|
|
|
|
|
# to do each pass explicitly when using -j).
|
|
|
|
|
#
|
|
|
|
|
# Parameters to this makefile (set these before including):
|
|
|
|
|
#
|
|
|
|
|
# a)
|
|
|
|
|
# TARGETS -- the target to create
|
|
|
|
|
# (defaults to $LIBRARY $PROGRAM)
|
|
|
|
|
# b)
|
|
|
|
|
# DIRS -- subdirectories for make to recurse on
|
|
|
|
|
# (the 'all' rule builds $TARGETS $DIRS)
|
|
|
|
|
# c)
|
|
|
|
|
# CSRCS, CPPSRCS -- .c and .cpp files to compile
|
|
|
|
|
# (used to define $OBJS)
|
|
|
|
|
# d)
|
|
|
|
|
# PROGRAM -- the target program name to create from $OBJS
|
1999-01-23 11:41:15 +00:00
|
|
|
|
# d2)
|
|
|
|
|
# SIMPLE_PROGRAMS -- Compiles Foo.cpp Bar.cpp into Foo, Bar executables.
|
1998-03-28 02:44:41 +00:00
|
|
|
|
# e)
|
|
|
|
|
# LIBRARY_NAME -- the target library name to create from $OBJS
|
|
|
|
|
# f)
|
|
|
|
|
# JSRCS -- java source files to compile into class files
|
|
|
|
|
# (if you don't specify this it will default to *.java)
|
|
|
|
|
# g)
|
|
|
|
|
# PACKAGE -- the package to put the .class files into
|
|
|
|
|
# (e.g. netscape/applet)
|
|
|
|
|
# h)
|
|
|
|
|
# JMC_EXPORT -- java files to be exported for use by JMC_GEN
|
|
|
|
|
# (this is a list of Class names)
|
|
|
|
|
# i)
|
|
|
|
|
# JRI_GEN -- files to run through javah to generate headers and stubs
|
|
|
|
|
# (output goes into the _jri sub-dir)
|
|
|
|
|
# j)
|
1998-07-31 20:19:50 +00:00
|
|
|
|
# JNI_GEN -- files to run through javah to generate headers and stubs
|
|
|
|
|
# (output goes into the _jni sub-dir)
|
|
|
|
|
# k)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
# JMC_GEN -- files to run through jmc to generate headers and stubs
|
|
|
|
|
# (output goes into the _jmc sub-dir)
|
|
|
|
|
#
|
|
|
|
|
################################################################################
|
1998-08-19 20:42:14 +00:00
|
|
|
|
ifndef topsrcdir
|
1999-09-09 09:24:58 +00:00
|
|
|
|
topsrcdir = $(DEPTH)
|
1998-08-19 20:42:14 +00:00
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Common rules used by lots of makefiles...
|
|
|
|
|
#
|
|
|
|
|
ifndef NS_CONFIG_MK
|
1998-08-19 20:42:14 +00:00
|
|
|
|
include $(topsrcdir)/config/config.mk
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1999-09-01 14:43:44 +00:00
|
|
|
|
ifdef INTERNAL_TOOLS
|
1999-09-03 22:11:18 +00:00
|
|
|
|
ifdef CROSS_COMPILE
|
1999-09-09 09:24:58 +00:00
|
|
|
|
CC = $(HOST_CC)
|
|
|
|
|
CXX = $(HOST_CXX)
|
|
|
|
|
CFLAGS = $(HOST_CFLAGS) -I$(DIST)/include $(NSPR_CFLAGS)
|
|
|
|
|
CXXFLAGS = $(HOST_CXXFLAGS) -I$(DIST)/include $(NSPR_CFLAGS)
|
|
|
|
|
RANLIB = $(HOST_RANLIB)
|
|
|
|
|
AR = $(HOST_AR)
|
1999-09-03 22:11:18 +00:00
|
|
|
|
endif
|
1999-09-01 14:43:44 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1998-07-08 03:49:31 +00:00
|
|
|
|
#
|
|
|
|
|
# Library rules
|
|
|
|
|
#
|
|
|
|
|
# If NO_STATIC_LIB is set, the static library will not be built.
|
|
|
|
|
# If NO_SHARED_LIB is set, the shared library will not be built.
|
|
|
|
|
#
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifndef LIBRARY
|
|
|
|
|
ifdef LIBRARY_NAME
|
|
|
|
|
LIBRARY := lib$(LIBRARY_NAME).$(LIB_SUFFIX)
|
1999-09-09 09:24:58 +00:00
|
|
|
|
endif
|
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
ifdef LIBRARY
|
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
|
ifndef DEF_FILE
|
|
|
|
|
DEF_FILE := $(LIBRARY:.lib=.def)
|
1999-09-09 09:24:58 +00:00
|
|
|
|
endif
|
|
|
|
|
endif
|
1999-02-19 03:06:32 +00:00
|
|
|
|
|
1998-07-08 03:49:31 +00:00
|
|
|
|
ifndef NO_SHARED_LIB
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef MKSHLIB
|
1999-05-05 23:38:15 +00:00
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
|
SHARED_LIBRARY := $(LIBRARY:.lib=.dll)
|
|
|
|
|
MAPS := $(LIBRARY:.lib=.map)
|
1999-02-19 03:06:32 +00:00
|
|
|
|
else # OS2
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
|
SHARED_LIBRARY := $(LIBRARY:.lib=.dll)
|
1999-02-19 03:06:32 +00:00
|
|
|
|
else # WINNT
|
1999-06-26 08:16:01 +00:00
|
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
|
SHARED_LIBRARY := $(LIBRARY:.a=.$(DLL_SUFFIX))
|
|
|
|
|
else
|
1999-05-05 23:38:15 +00:00
|
|
|
|
|
|
|
|
|
# Unix only
|
|
|
|
|
ifdef LIB_IS_C_ONLY
|
|
|
|
|
MKSHLIB = $(MKCSHLIB)
|
|
|
|
|
endif
|
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifeq ($(OS_ARCH),HP-UX)
|
|
|
|
|
SHARED_LIBRARY := $(LIBRARY:.a=.sl)
|
1999-02-19 03:06:32 +00:00
|
|
|
|
else # HPUX
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifeq ($(OS_ARCH)$(OS_RELEASE),SunOS4.1)
|
|
|
|
|
SHARED_LIBRARY := $(LIBRARY:.a=.so.1.0)
|
1999-02-19 03:06:32 +00:00
|
|
|
|
else # SunOS4
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifeq ($(OS_ARCH)$(OS_RELEASE),AIX4.1)
|
|
|
|
|
SHARED_LIBRARY := $(LIBRARY:.a=)_shr.a
|
1999-02-19 03:06:32 +00:00
|
|
|
|
else # AIX
|
1998-08-18 09:06:48 +00:00
|
|
|
|
SHARED_LIBRARY := $(LIBRARY:.a=.$(DLL_SUFFIX))
|
1999-02-19 03:06:32 +00:00
|
|
|
|
endif # AIX
|
|
|
|
|
endif # SunOS4
|
|
|
|
|
endif # HPUX
|
1999-06-26 08:16:01 +00:00
|
|
|
|
|
|
|
|
|
endif # BeOS
|
1999-02-19 03:06:32 +00:00
|
|
|
|
endif # WINNT
|
|
|
|
|
endif # OS2
|
|
|
|
|
endif # MKSHLIB
|
|
|
|
|
endif # !NO_SHARED_LIB
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
1998-07-08 03:49:31 +00:00
|
|
|
|
|
|
|
|
|
ifdef NO_STATIC_LIB
|
|
|
|
|
LIBRARY = $(NULL)
|
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1998-08-19 20:42:14 +00:00
|
|
|
|
ifdef NO_SHARED_LIB
|
|
|
|
|
DLL_SUFFIX = a
|
|
|
|
|
endif
|
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifndef TARGETS
|
1999-01-23 11:41:15 +00:00
|
|
|
|
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifndef OBJS
|
|
|
|
|
OBJS = $(JRI_STUB_CFILES) $(addsuffix .o, $(JMC_GEN)) $(CSRCS:.c=.o) $(CPPSRCS:.cpp=.o) $(ASFILES:.s=.o)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifndef OS2_IMPLIB
|
|
|
|
|
LIBOBJS := $(addprefix \", $(OBJS))
|
|
|
|
|
LIBOBJS := $(addsuffix \", $(LIBOBJS))
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifndef PACKAGE
|
|
|
|
|
PACKAGE = .
|
|
|
|
|
endif
|
|
|
|
|
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1999-06-03 08:15:52 +00:00
|
|
|
|
ALL_TRASH = $(TARGETS) $(OBJS) LOGS TAGS $(GARBAGE) a.out \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
$(NOSUCHFILE) $(JDK_HEADER_CFILES) $(JDK_STUB_CFILES) \
|
|
|
|
|
$(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) $(JMC_STUBS) \
|
|
|
|
|
$(JMC_HEADERS) $(JMC_EXPORT_FILES) so_locations \
|
1999-09-15 17:52:38 +00:00
|
|
|
|
_gen _jmc _jri _stubs $(MDDEPDIR) \
|
1999-10-01 03:02:53 +00:00
|
|
|
|
$(wildcard gts_tmp_*) $(PROGOBJS) \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
$(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class)
|
|
|
|
|
else
|
1999-06-03 08:15:52 +00:00
|
|
|
|
ALL_TRASH = $(TARGETS) $(OBJS) LOGS TAGS $(GARBAGE) a.out \
|
|
|
|
|
$(NOSUCHFILE) $(JMC_STUBS) so_locations \
|
1999-09-15 17:52:38 +00:00
|
|
|
|
_gen _stubs $(MDDEPDIR) $(wildcard gts_tmp_*) \
|
1999-10-08 05:18:46 +00:00
|
|
|
|
$(PROGOBJS) $(LIBRARY:%.a=.%.timestamp)
|
1999-03-22 20:43:05 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef JDIRS
|
|
|
|
|
ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS))
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
1999-08-09 14:55:56 +00:00
|
|
|
|
ifdef QTDIR
|
|
|
|
|
ALL_TRASH += $(MOCSRCS)
|
|
|
|
|
endif
|
|
|
|
|
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
JMC_SUBDIR = _jmc
|
|
|
|
|
else
|
|
|
|
|
JMC_SUBDIR = $(LOCAL_JMC_SUBDIR)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
JDK_GEN_DIR = _gen
|
|
|
|
|
JMC_GEN_DIR = $(JMC_SUBDIR)
|
|
|
|
|
JRI_GEN_DIR = _jri
|
1998-07-31 20:19:50 +00:00
|
|
|
|
JNI_GEN_DIR = _jni
|
1998-03-28 02:44:41 +00:00
|
|
|
|
JDK_STUB_DIR = _stubs
|
1999-05-08 02:06:15 +00:00
|
|
|
|
XPIDL_GEN_DIR = _xpidlgen
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# If this is an "official" build, try to build everything.
|
|
|
|
|
# I.e., don't exit on errors.
|
|
|
|
|
#
|
|
|
|
|
ifdef BUILD_OFFICIAL
|
|
|
|
|
EXIT_ON_ERROR = +e
|
|
|
|
|
CLICK_STOPWATCH = date
|
|
|
|
|
else
|
|
|
|
|
EXIT_ON_ERROR = -e
|
|
|
|
|
CLICK_STOPWATCH = true
|
|
|
|
|
endif
|
|
|
|
|
|
1999-02-08 19:59:25 +00:00
|
|
|
|
ifdef MOZ_UPDATE_XTERM
|
1999-11-16 20:58:24 +00:00
|
|
|
|
UPDATE_TITLE = echo "]2;gmake: $@ in $(shell pwd | sed 's:\.\./::g ')/$$d"
|
1999-02-08 19:59:25 +00:00
|
|
|
|
else
|
|
|
|
|
UPDATE_TITLE = true
|
|
|
|
|
endif
|
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef DIRS
|
|
|
|
|
LOOP_OVER_DIRS = \
|
|
|
|
|
@for d in $(DIRS); do \
|
1999-04-27 23:08:59 +00:00
|
|
|
|
$(UPDATE_TITLE); \
|
1999-09-03 22:18:30 +00:00
|
|
|
|
set $(EXIT_ON_ERROR); \
|
|
|
|
|
echo "cd $$d; $(MAKE) $@"; \
|
|
|
|
|
oldDir=`pwd`; \
|
|
|
|
|
cd $$d; $(MAKE) $@; cd $$oldDir; \
|
|
|
|
|
set +e; \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
$(CLICK_STOPWATCH); \
|
|
|
|
|
done
|
|
|
|
|
endif
|
|
|
|
|
|
1998-07-08 03:49:31 +00:00
|
|
|
|
#
|
|
|
|
|
# Now we can differentiate between objects used to build a library, and
|
|
|
|
|
# objects used to build an executable in the same directory.
|
|
|
|
|
#
|
|
|
|
|
ifndef PROGOBJS
|
|
|
|
|
PROGOBJS = $(OBJS)
|
|
|
|
|
endif
|
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
|
# SUBMAKEFILES: List of Makefiles for next level down.
|
|
|
|
|
# This is used to update or create the Makefiles before invoking them.
|
1999-09-09 09:24:58 +00:00
|
|
|
|
ifneq ($(DIRS),)
|
|
|
|
|
SUBMAKEFILES := $(addsuffix /Makefile, $(filter-out $(STATIC_MAKEFILES), $(DIRS)))
|
1999-08-24 21:45:06 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# MAKE_DIRS: List of directories to build while looping over directories.
|
1999-09-09 09:24:58 +00:00
|
|
|
|
MAKE_DIRS =
|
1999-08-24 21:45:06 +00:00
|
|
|
|
|
|
|
|
|
ifdef COMPILER_DEPEND
|
|
|
|
|
ifdef OBJS
|
1999-09-09 09:24:58 +00:00
|
|
|
|
MAKE_DIRS += $(MDDEPDIR)
|
|
|
|
|
endif
|
1999-08-24 21:45:06 +00:00
|
|
|
|
endif
|
1999-09-09 09:24:58 +00:00
|
|
|
|
|
|
|
|
|
ifneq ($(XPIDLSRCS),)
|
|
|
|
|
MAKE_DIRS += $(XPIDL_GEN_DIR)
|
1999-08-24 21:45:06 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1999-09-09 09:24:58 +00:00
|
|
|
|
#
|
|
|
|
|
# Tags: emacs (etags), vi (ctags)
|
|
|
|
|
# TAG_PROGRAM := ctags -L -
|
|
|
|
|
#
|
|
|
|
|
TAG_PROGRAM = xargs etags -a
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Turn on C++ linking if we have any .cpp files
|
|
|
|
|
# (moved this from config.mk so that config.mk can be included
|
|
|
|
|
# before the CPPSRCS are defined)
|
|
|
|
|
#
|
|
|
|
|
ifdef CPPSRCS
|
|
|
|
|
CPP_PROG_LINK = 1
|
|
|
|
|
endif
|
|
|
|
|
|
1999-09-22 09:54:00 +00:00
|
|
|
|
#
|
|
|
|
|
# This will strip out symbols that the component shouldnt be
|
|
|
|
|
# exporting from the .dynsym section.
|
|
|
|
|
#
|
1999-09-16 13:43:15 +00:00
|
|
|
|
ifdef IS_COMPONENT
|
1999-09-22 09:54:00 +00:00
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
|
1999-09-16 13:43:15 +00:00
|
|
|
|
endif # IS_COMPONENT
|
|
|
|
|
|
1999-09-09 09:24:58 +00:00
|
|
|
|
#
|
|
|
|
|
# BeOS specific section: link against dependent shared libs
|
|
|
|
|
#
|
|
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
|
ifdef SHARED_LIBRARY
|
|
|
|
|
BEOS_LIB_LIST = $(shell cat $(topsrcdir)/dependencies.beos/$(LIBRARY_NAME).dependencies)
|
|
|
|
|
BEOS_LINK_LIBS = $(foreach lib,$(BEOS_LIB_LIST),$(shell $(topsrcdir)/config/beos/checklib.sh $(DIST)/bin $(lib)))
|
|
|
|
|
LDFLAGS += -L$(DIST)/bin $(BEOS_LINK_LIBS) $(NSPR_LIBS)
|
|
|
|
|
EXTRA_DSO_LDOPTS += -L$(DIST)/bin $(BEOS_LINK_LIBS) $(NSPR_LIBS)
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
1999-11-18 02:49:30 +00:00
|
|
|
|
#
|
|
|
|
|
# HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
|
|
|
|
|
# which uses internal symbols first
|
|
|
|
|
#
|
|
|
|
|
ifeq ($(OS_ARCH),HP-UX)
|
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
|
ifeq ($(GNU_CC)$(GNU_CXX),)
|
|
|
|
|
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
|
|
|
|
|
endif # non-gnu compilers
|
|
|
|
|
endif # IS_COMPONENT
|
|
|
|
|
endif # HP-UX
|
|
|
|
|
|
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
all:: export libs install
|
|
|
|
|
|
1999-01-21 07:42:44 +00:00
|
|
|
|
# Do depend as well
|
|
|
|
|
alldep:: export depend libs install
|
|
|
|
|
|
|
|
|
|
# Do everything from scratch
|
1999-07-20 02:10:47 +00:00
|
|
|
|
everything:: realclean alldep
|
1999-01-21 07:42:44 +00:00
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef ALL_PLATFORMS
|
|
|
|
|
all_platforms:: $(NFSPWD)
|
|
|
|
|
@d=`$(NFSPWD)`; \
|
1999-08-24 21:45:06 +00:00
|
|
|
|
if test ! -d LOGS; then rm -rf LOGS; mkdir LOGS; else true; fi; \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
for h in $(PLATFORM_HOSTS); do \
|
|
|
|
|
echo "On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\
|
|
|
|
|
rsh $$h -n "(chdir $$d; \
|
|
|
|
|
$(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log; \
|
|
|
|
|
echo DONE) &" 2>&1 > LOGS/$$h.pid & \
|
|
|
|
|
sleep 1; \
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
$(NFSPWD):
|
|
|
|
|
cd $(@D); $(MAKE) $(@F)
|
|
|
|
|
endif
|
|
|
|
|
|
1999-09-03 22:18:30 +00:00
|
|
|
|
# Target to only regenerate makefiles
|
|
|
|
|
makefiles: $(SUBMAKEFILES)
|
|
|
|
|
ifdef DIRS
|
|
|
|
|
@for d in $(filter-out $(STATIC_MAKEFILES), $(DIRS)); do\
|
|
|
|
|
$(UPDATE_TITLE); \
|
|
|
|
|
oldDir=`pwd`; \
|
|
|
|
|
echo "cd $$d; $(MAKE) $@"; \
|
|
|
|
|
cd $$d; $(MAKE) $@; cd $$oldDir; \
|
|
|
|
|
done
|
|
|
|
|
endif
|
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
|
export:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
|
1998-07-08 03:49:31 +00:00
|
|
|
|
ifndef LIBS_NEQ_INSTALL
|
1999-08-24 21:45:06 +00:00
|
|
|
|
libs install:: $(SUBMAKEFILES) $(MAKE_DIRS) $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(MAPS)
|
1998-07-08 03:49:31 +00:00
|
|
|
|
ifndef NO_STATIC_LIB
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef LIBRARY
|
1999-05-27 04:25:42 +00:00
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
|
$(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib/components
|
|
|
|
|
else
|
1998-03-28 02:44:41 +00:00
|
|
|
|
$(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib
|
|
|
|
|
endif
|
1998-07-08 03:49:31 +00:00
|
|
|
|
endif
|
1999-05-27 04:25:42 +00:00
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef MAPS
|
|
|
|
|
$(INSTALL) -m 444 $(MAPS) $(DIST)/bin
|
|
|
|
|
endif
|
|
|
|
|
ifdef SHARED_LIBRARY
|
1999-03-03 01:25:21 +00:00
|
|
|
|
ifdef IS_COMPONENT
|
1999-03-09 01:20:03 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/lib/components
|
1999-03-03 01:25:21 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/bin/components
|
1999-07-22 03:33:24 +00:00
|
|
|
|
ifeq ($(OS_ARCH),OpenVMS)
|
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(DIST)/bin/components
|
|
|
|
|
endif
|
1999-03-03 01:25:21 +00:00
|
|
|
|
else
|
1999-03-09 01:20:03 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/lib
|
1998-03-28 02:44:41 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/bin
|
1999-07-22 03:33:24 +00:00
|
|
|
|
ifeq ($(OS_ARCH),OpenVMS)
|
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(DIST)/bin
|
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
1999-03-03 01:25:21 +00:00
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef PROGRAM
|
1999-03-09 01:20:03 +00:00
|
|
|
|
$(INSTALL) -m 555 $(PROGRAM) $(DIST)/bin
|
1999-01-23 11:41:15 +00:00
|
|
|
|
endif
|
|
|
|
|
ifdef SIMPLE_PROGRAMS
|
1999-03-09 01:20:03 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SIMPLE_PROGRAMS) $(DIST)/bin
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
1998-07-08 03:49:31 +00:00
|
|
|
|
else
|
1999-08-24 21:45:06 +00:00
|
|
|
|
libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(LIBRARY) $(SHARED_LIBRARY) $(SHARED_LIBRARY_LIBS)
|
1998-07-08 03:49:31 +00:00
|
|
|
|
ifndef NO_STATIC_LIB
|
|
|
|
|
ifdef LIBRARY
|
1999-05-27 04:25:42 +00:00
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
|
$(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib/components
|
|
|
|
|
else
|
1998-07-08 03:49:31 +00:00
|
|
|
|
$(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib
|
|
|
|
|
endif
|
|
|
|
|
endif
|
1999-05-27 04:25:42 +00:00
|
|
|
|
endif
|
1998-07-08 03:49:31 +00:00
|
|
|
|
ifdef SHARED_LIBRARY
|
1999-03-03 01:25:21 +00:00
|
|
|
|
ifdef IS_COMPONENT
|
1999-03-09 01:20:03 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/lib/components
|
1999-03-03 01:25:21 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/bin/components
|
1999-07-22 03:33:24 +00:00
|
|
|
|
ifeq ($(OS_ARCH),OpenVMS)
|
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(DIST)/bin/components
|
|
|
|
|
endif
|
1999-03-03 01:25:21 +00:00
|
|
|
|
else
|
1999-03-09 01:20:03 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/lib
|
1998-07-08 03:49:31 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/bin
|
1999-07-22 03:33:24 +00:00
|
|
|
|
ifeq ($(OS_ARCH),OpenVMS)
|
|
|
|
|
$(INSTALL) -m 555 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(DIST)/bin
|
|
|
|
|
endif
|
1999-03-03 01:25:21 +00:00
|
|
|
|
endif
|
1998-07-08 03:49:31 +00:00
|
|
|
|
endif
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
|
install:: $(SUBMAKEFILES) $(PROGRAM) $(SIMPLE_PROGRAMS)
|
1998-07-08 03:49:31 +00:00
|
|
|
|
ifdef MAPS
|
|
|
|
|
$(INSTALL) -m 444 $(MAPS) $(DIST)/bin
|
|
|
|
|
endif
|
|
|
|
|
ifdef PROGRAM
|
1999-03-09 01:20:03 +00:00
|
|
|
|
$(INSTALL) -m 555 $(PROGRAM) $(DIST)/bin
|
1999-06-26 08:16:01 +00:00
|
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
1999-07-01 21:04:07 +00:00
|
|
|
|
-rm components add-ons lib
|
1999-06-26 08:16:01 +00:00
|
|
|
|
ln -sf $(DIST)/bin/components components
|
|
|
|
|
ln -sf $(DIST)/bin add-ons
|
|
|
|
|
ln -sf $(DIST)/bin lib
|
|
|
|
|
endif
|
1999-01-23 11:41:15 +00:00
|
|
|
|
endif
|
|
|
|
|
ifdef SIMPLE_PROGRAMS
|
1999-03-09 01:20:03 +00:00
|
|
|
|
$(INSTALL) -m 555 $(SIMPLE_PROGRAMS) $(DIST)/bin
|
1999-06-26 08:16:01 +00:00
|
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
1999-07-01 21:04:07 +00:00
|
|
|
|
-rm components add-ons lib
|
1999-06-26 08:16:01 +00:00
|
|
|
|
ln -sf $(DIST)/bin/components components
|
|
|
|
|
ln -sf $(DIST)/bin add-ons
|
|
|
|
|
ln -sf $(DIST)/bin lib
|
|
|
|
|
endif
|
1998-07-08 03:49:31 +00:00
|
|
|
|
endif
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-02-17 17:33:07 +00:00
|
|
|
|
checkout:
|
|
|
|
|
cd $(topsrcdir); $(MAKE) -f client.mk checkout
|
|
|
|
|
|
1999-02-18 18:44:48 +00:00
|
|
|
|
run_viewer: $(DIST)/bin/viewer
|
|
|
|
|
cd $(DIST)/bin; \
|
1999-03-31 19:07:29 +00:00
|
|
|
|
MOZILLA_FIVE_HOME=`pwd` \
|
1999-02-18 18:44:48 +00:00
|
|
|
|
LD_LIBRARY_PATH=".:$(LIBS_PATH):$$LD_LIBRARY_PATH" \
|
|
|
|
|
viewer
|
|
|
|
|
|
1999-02-25 19:18:59 +00:00
|
|
|
|
run_apprunner: $(DIST)/bin/apprunner
|
|
|
|
|
cd $(DIST)/bin; \
|
1999-03-31 19:07:29 +00:00
|
|
|
|
MOZILLA_FIVE_HOME=`pwd` \
|
1999-02-25 19:18:59 +00:00
|
|
|
|
LD_LIBRARY_PATH=".:$(LIBS_PATH):$$LD_LIBRARY_PATH" \
|
|
|
|
|
apprunner
|
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
|
clean clobber:: $(SUBMAKEFILES)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -rf $(ALL_TRASH)
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
|
realclean clobber_all:: $(SUBMAKEFILES)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH)
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
|
distclean:: $(SUBMAKEFILES)
|
1999-06-03 22:23:06 +00:00
|
|
|
|
rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH) $(wildcard *.map) \
|
|
|
|
|
Makefile config.log config.cache depend.mk .md .deps .HSancillary _xpidlgen
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
alltags:
|
|
|
|
|
rm -f TAGS
|
1999-06-11 20:21:48 +00:00
|
|
|
|
find $(topsrcdir) -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' -o -name '*.idl' \) -print | $(TAG_PROGRAM)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-01-23 11:41:15 +00:00
|
|
|
|
#
|
|
|
|
|
# PROGRAM = Foo
|
|
|
|
|
# creates OBJS, links with LIBS to create Foo
|
|
|
|
|
#
|
1999-08-17 13:08:51 +00:00
|
|
|
|
$(PROGRAM): $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
1998-07-08 03:49:31 +00:00
|
|
|
|
$(LINK) -FREE -OUT:$@ $(LDFLAGS) $(OS_LFLAGS) $(PROGOBJS) $(EXTRA_LIBS) -MAP:$(@:.exe=.map) $(OS_LIBS) $(DEF_FILE)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
else
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
1998-07-08 03:49:31 +00:00
|
|
|
|
$(CC) $(PROGOBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
|
|
|
|
|
else
|
1999-02-17 00:32:17 +00:00
|
|
|
|
ifeq ($(CPP_PROG_LINK),1)
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(CCC) $(WRAP_MALLOC_CFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB)
|
1999-09-17 00:53:36 +00:00
|
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
1999-06-26 08:16:01 +00:00
|
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
|
ifdef BEOS_PROGRAM_RESOURCE
|
|
|
|
|
xres -o $@ $(BEOS_PROGRAM_RESOURCE)
|
|
|
|
|
mimeset $@
|
|
|
|
|
endif
|
|
|
|
|
endif
|
1999-01-23 10:14:58 +00:00
|
|
|
|
else
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(CC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-06-26 08:16:01 +00:00
|
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
|
ifdef BEOS_PROGRAM_RESOURCE
|
|
|
|
|
xres -o $@ $(BEOS_PROGRAM_RESOURCE)
|
|
|
|
|
mimeset $@
|
|
|
|
|
endif
|
|
|
|
|
endif
|
1999-01-23 10:14:58 +00:00
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
endif
|
1999-01-23 09:36:40 +00:00
|
|
|
|
|
1999-01-23 11:41:15 +00:00
|
|
|
|
#
|
|
|
|
|
# This is an attempt to support generation of multiple binaries
|
|
|
|
|
# in one directory, it assumes everything to compile Foo is in
|
|
|
|
|
# Foo.o (from either Foo.c or Foo.cpp).
|
|
|
|
|
#
|
|
|
|
|
# SIMPLE_PROGRAMS = Foo Bar
|
|
|
|
|
# creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
|
|
|
|
|
#
|
1999-08-20 06:52:59 +00:00
|
|
|
|
$(SIMPLE_PROGRAMS):%: %.o $(EXTRA_DEPS) Makefile Makefile.in
|
1999-02-17 00:32:17 +00:00
|
|
|
|
ifeq ($(CPP_PROG_LINK),1)
|
1999-03-25 19:52:19 +00:00
|
|
|
|
$(CCC) $(WRAP_MALLOC_CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB)
|
1999-06-10 16:27:39 +00:00
|
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
1999-01-23 12:20:00 +00:00
|
|
|
|
else
|
1999-03-29 23:50:57 +00:00
|
|
|
|
$(CC) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB)
|
1999-06-10 16:27:39 +00:00
|
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
1999-01-23 12:20:00 +00:00
|
|
|
|
endif
|
1999-01-23 11:41:15 +00:00
|
|
|
|
|
1999-01-27 07:17:32 +00:00
|
|
|
|
#
|
|
|
|
|
# Purify target. Solaris/sparc only to start.
|
|
|
|
|
# Purify does not recognize "egcs" or "c++" so we go with
|
|
|
|
|
# "gcc" and "g++" for now.
|
|
|
|
|
#
|
|
|
|
|
pure: $(PROGRAM)
|
1999-02-17 00:32:17 +00:00
|
|
|
|
ifeq ($(CPP_PROG_LINK),1)
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(PURIFY) $(CCC) -o $^.pure $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-01-27 07:17:32 +00:00
|
|
|
|
else
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(PURIFY) $(CC) -o $^.pure $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-01-27 07:17:32 +00:00
|
|
|
|
endif
|
1999-03-09 04:21:51 +00:00
|
|
|
|
$(INSTALL) -m 555 $^.pure $(DIST)/bin
|
1999-01-23 11:41:15 +00:00
|
|
|
|
|
1999-03-10 08:32:42 +00:00
|
|
|
|
quantify: $(PROGRAM)
|
|
|
|
|
ifeq ($(CPP_PROG_LINK),1)
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(QUANTIFY) $(CCC) -o $^.quantify $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-03-10 08:32:42 +00:00
|
|
|
|
else
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(QUANTIFY) $(CC) -o $^.quantify $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-03-10 08:32:42 +00:00
|
|
|
|
endif
|
|
|
|
|
$(INSTALL) -m 555 $^.quantify $(DIST)/bin
|
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifneq ($(OS_ARCH),OS2)
|
1999-03-25 21:01:59 +00:00
|
|
|
|
#
|
|
|
|
|
# This allows us to create static versions of the shared libraries
|
|
|
|
|
# that are built using other static libraries. Confused...?
|
|
|
|
|
#
|
|
|
|
|
ifdef SHARED_LIBRARY_LIBS
|
1999-07-01 01:59:09 +00:00
|
|
|
|
ifneq (,$(filter OSF1 BSD_OS FreeBSD NetBSD OpenBSD SunOS,$(OS_ARCH)))
|
1999-05-20 03:27:20 +00:00
|
|
|
|
CLEANUP1 := | egrep -v '(________64ELEL_|__.SYMDEF)'
|
|
|
|
|
CLEANUP2 := rm -f ________64ELEL_ __.SYMDEF
|
1999-04-06 23:26:00 +00:00
|
|
|
|
else
|
|
|
|
|
CLEANUP2 := true
|
|
|
|
|
endif
|
|
|
|
|
SUB_LOBJS = $(shell for lib in $(SHARED_LIBRARY_LIBS); do $(AR_LIST) $${lib} $(CLEANUP1); done;)
|
1999-03-25 21:01:59 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1999-10-12 12:36:07 +00:00
|
|
|
|
ifdef USE_IMPLICIT_ARCHIVE
|
1999-10-08 05:18:46 +00:00
|
|
|
|
# This rule overrides the builtin rule that tells make how to insert object
|
|
|
|
|
# files into archive libraries. A few notes about what is going on:
|
|
|
|
|
# The whole point of doing this is to avoid having to store the .o files in
|
|
|
|
|
# addition to the .a files, but not have regenerate all the .o files every time
|
|
|
|
|
# we regenerate the .a file. Make knows how to do this by itself. However,
|
|
|
|
|
# it wants to insert the .o files into the .a file 1 at a time which is both
|
|
|
|
|
# slow and also breaks parallel builds. These rules get make to build all
|
|
|
|
|
# the .o files ahead of time and insert them all at once. We use the
|
|
|
|
|
# .timestamp file to make this work reliably.
|
|
|
|
|
#
|
|
|
|
|
# I have learned that $(shell) and $(wildcard) variables do not necessarily
|
|
|
|
|
# get evaluated when they are used. All the $(shell) variables for a rule
|
|
|
|
|
# seem to get evaluated right before the rules commands are executed, not
|
|
|
|
|
# as we proceed from command to the next. This means that the "ar t" is
|
|
|
|
|
# evaluating the library before we insert new objects.
|
|
|
|
|
#
|
1999-10-12 12:36:07 +00:00
|
|
|
|
ifndef SHARED_LIBRARY_LIBS
|
1999-10-08 05:18:46 +00:00
|
|
|
|
$(LIBRARY)(%.o): %.o
|
|
|
|
|
@echo 'queueing $< for insertion into $(LIBRARY)'; \
|
|
|
|
|
touch $(LIBRARY:%.a=.%.timestamp)
|
|
|
|
|
|
|
|
|
|
$(LIBRARY:%.a=.%.timestamp) :
|
|
|
|
|
@touch $@
|
|
|
|
|
|
1999-10-08 21:17:32 +00:00
|
|
|
|
ifneq (, $(LIBRARY))
|
1999-10-08 20:30:28 +00:00
|
|
|
|
AR_FILES_TO_REMOVE := $(filter-out \
|
|
|
|
|
$(filter %.o, $(LIBRARY)($(OBJS) $(LOBJS)) ), \
|
|
|
|
|
$(shell [ -f $(LIBRARY) ] && $(AR_LIST) $(LIBRARY)))
|
1999-10-08 21:17:32 +00:00
|
|
|
|
endif
|
1999-10-08 20:30:28 +00:00
|
|
|
|
|
1999-10-08 05:18:46 +00:00
|
|
|
|
$(LIBRARY): $(LIBRARY)($(OBJS) $(LOBJS)) $(LIBRARY:%.a=.%.timestamp) Makefile.in Makefile
|
|
|
|
|
@touch $(LIBRARY:%.a=.%.timestamp)
|
|
|
|
|
$(AR) $(AR_FLAGS) $(filter $filter(%.o, $^), $(shell echo *.o))
|
1999-10-11 14:41:25 +00:00
|
|
|
|
if [ "${AR_FILES_TO_REMOVE}" != "" ]; then $(AR_DELETE) $(LIBRARY) $(AR_FILES_TO_REMOVE); else true; fi
|
1999-10-08 05:18:46 +00:00
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
1999-10-12 12:36:07 +00:00
|
|
|
|
$(LIBRARY): $(OBJS) $(LOBJS) Makefile Makefile.in
|
|
|
|
|
rm -f $@
|
|
|
|
|
@rm -f $(SUB_LOBJS)
|
|
|
|
|
@for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
|
|
|
|
|
$(AR) $(AR_FLAGS) $(OBJS) $(LOBJS) $(SUB_LOBJS)
|
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
@rm -f foodummyfilefoo $(SUB_LOBJS)
|
|
|
|
|
endif # ! SHARED_LIBRARY_LIBS
|
|
|
|
|
|
|
|
|
|
else # ! USE_IMPLICIT_ARCHIVE
|
|
|
|
|
|
1999-08-17 14:04:54 +00:00
|
|
|
|
$(LIBRARY): $(OBJS) $(LOBJS) Makefile Makefile.in
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -f $@
|
1999-03-25 21:01:59 +00:00
|
|
|
|
ifdef SHARED_LIBRARY_LIBS
|
|
|
|
|
@rm -f $(SUB_LOBJS)
|
1999-04-06 23:26:00 +00:00
|
|
|
|
@for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
|
1999-03-25 21:01:59 +00:00
|
|
|
|
endif
|
1999-08-29 18:10:23 +00:00
|
|
|
|
$(AR) $(AR_FLAGS) $(OBJS) $(LOBJS) $(SUB_LOBJS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
$(RANLIB) $@
|
1999-03-25 21:01:59 +00:00
|
|
|
|
@rm -f foodummyfilefoo $(SUB_LOBJS)
|
1999-10-08 05:18:46 +00:00
|
|
|
|
|
1999-10-12 12:36:07 +00:00
|
|
|
|
endif # USE_IMPLICIT_ARCHIVE
|
|
|
|
|
else # OS2
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef OS2_IMPLIB
|
1999-03-27 00:18:41 +00:00
|
|
|
|
$(LIBRARY): $(OBJS) $(DEF_FILE)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -f $@
|
|
|
|
|
$(IMPLIB) $@ $(DEF_FILE)
|
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
else
|
1999-03-27 00:18:41 +00:00
|
|
|
|
$(LIBRARY): $(OBJS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -f $@
|
1999-08-29 18:10:23 +00:00
|
|
|
|
$(AR) $(AR_FLAGS) $(LIBOBJS),,
|
1998-03-28 02:44:41 +00:00
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifneq ($(OS_ARCH),OS2)
|
1999-08-17 14:04:54 +00:00
|
|
|
|
$(SHARED_LIBRARY): $(OBJS) $(LOBJS) Makefile Makefile.in
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -f $@
|
1999-08-03 02:08:12 +00:00
|
|
|
|
ifneq ($(OS_ARCH),OpenVMS)
|
|
|
|
|
ifeq ($(NO_LD_ARCHIVE_FLAGS),1)
|
|
|
|
|
ifdef SHARED_LIBRARY_LIBS
|
|
|
|
|
@rm -f $(SUB_LOBJS)
|
|
|
|
|
@for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
|
1999-08-03 02:52:24 +00:00
|
|
|
|
$(MKSHLIB) -o $@ $(OBJS) $(LOBJS) $(SUB_LOBJS) $(EXTRA_DSO_LDOPTS)
|
|
|
|
|
else
|
|
|
|
|
$(MKSHLIB) -o $@ $(OBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS)
|
1999-08-03 02:08:12 +00:00
|
|
|
|
endif
|
1999-08-03 02:52:24 +00:00
|
|
|
|
else
|
|
|
|
|
$(MKSHLIB) -o $@ $(OBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS)
|
1999-08-03 02:08:12 +00:00
|
|
|
|
endif
|
|
|
|
|
@rm -f foodummyfilefoo $(SUB_LOBJS)
|
1999-07-22 03:33:24 +00:00
|
|
|
|
else
|
|
|
|
|
@touch no-such-file.vms; rm -f no-such-file.vms $(SUB_LOBJS)
|
1999-09-13 12:21:26 +00:00
|
|
|
|
ifndef IS_COMPONENT
|
1999-08-20 06:52:59 +00:00
|
|
|
|
@if test ! -f VMSuni.opt; then \
|
|
|
|
|
echo "Creating universal symbol option file VMSuni.opt"; \
|
1999-07-22 03:33:24 +00:00
|
|
|
|
for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done; \
|
|
|
|
|
create_opt_uni $(OBJS) $(SUB_LOBJS); \
|
|
|
|
|
fi
|
|
|
|
|
@touch no-such-file.vms; rm -f no-such-file.vms $(SUB_LOBJS)
|
1999-09-13 12:21:26 +00:00
|
|
|
|
endif
|
1999-08-20 06:52:59 +00:00
|
|
|
|
$(MKSHLIB) -o $@ $(OBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS) VMSuni.opt;
|
1999-07-22 03:33:24 +00:00
|
|
|
|
@echo "`translate $@`" > $(@:.$(DLL_SUFFIX)=.vms)
|
1999-07-07 09:02:21 +00:00
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
chmod +x $@
|
1999-06-10 15:18:02 +00:00
|
|
|
|
$(MOZ_POST_DSO_LIB_COMMAND) $@
|
1998-03-28 02:44:41 +00:00
|
|
|
|
else
|
1999-08-17 14:04:54 +00:00
|
|
|
|
$(SHARED_LIBRARY): $(OBJS) $(DEF_FILE) Makefile Makefile.in
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -f $@
|
|
|
|
|
$(LINK_DLL) $(OBJS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE)
|
|
|
|
|
chmod +x $@
|
1999-06-10 15:18:02 +00:00
|
|
|
|
$(MOZ_POST_DSO_LIB_COMMAND) $@
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
1999-03-27 00:18:41 +00:00
|
|
|
|
$(DLL): $(OBJS) $(EXTRA_LIBS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -f $@
|
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
|
$(LINK_DLL) $(OBJS) $(EXTRA_LIBS) $(OS_LIBS)
|
|
|
|
|
else
|
|
|
|
|
$(LINK_DLL) $(OBJS) $(OS_LIBS) $(EXTRA_LIBS)
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
1999-08-20 06:52:59 +00:00
|
|
|
|
%: %.c
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
1998-08-19 20:42:14 +00:00
|
|
|
|
$(CC) -Fo$@ -c $(CFLAGS) $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
else
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1999-09-12 15:15:52 +00:00
|
|
|
|
%.o: %.c Makefile.in
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
1998-08-19 20:42:14 +00:00
|
|
|
|
$(CC) -Fo$@ -c $(CFLAGS) $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
else
|
1998-08-19 20:42:14 +00:00
|
|
|
|
$(CC) -o $@ -c $(CFLAGS) $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1999-08-20 06:52:59 +00:00
|
|
|
|
moc_%.cpp: %.h
|
1999-08-09 14:55:56 +00:00
|
|
|
|
$(MOC) $< -o $@
|
|
|
|
|
|
1999-03-08 15:01:13 +00:00
|
|
|
|
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
|
|
|
|
|
# a '-c' flag.
|
1999-08-20 06:52:59 +00:00
|
|
|
|
%.o: %.s
|
1999-03-08 15:01:13 +00:00
|
|
|
|
$(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-08-20 06:52:59 +00:00
|
|
|
|
%.o: %.S
|
1998-08-19 20:42:14 +00:00
|
|
|
|
$(AS) -o $@ $(ASFLAGS) -c $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-08-20 06:52:59 +00:00
|
|
|
|
%: %.cpp
|
1999-03-07 05:18:45 +00:00
|
|
|
|
$(CCC) -o $@ $(CXXFLAGS) $< $(LDFLAGS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Please keep the next two rules in sync.
|
|
|
|
|
#
|
1999-08-20 06:52:59 +00:00
|
|
|
|
%.o: %.cc
|
1999-03-07 05:18:45 +00:00
|
|
|
|
$(CCC) -o $@ -c $(CXXFLAGS) $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-08-20 06:52:59 +00:00
|
|
|
|
%.o: %.cpp
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef STRICT_CPLUSPLUS_SUFFIX
|
1999-08-20 06:52:59 +00:00
|
|
|
|
echo "#line 1 \"$*.cpp\"" | cat - $*.cpp > t_$*.cc
|
|
|
|
|
$(CCC) -o $@ -c $(CXXFLAGS) t_$*.cc
|
|
|
|
|
rm -f t_$*.cc
|
1998-03-28 02:44:41 +00:00
|
|
|
|
else
|
|
|
|
|
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
1999-03-07 05:18:45 +00:00
|
|
|
|
$(CCC) -Fo$@ -c $(CXXFLAGS) $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
else
|
1999-03-07 05:18:45 +00:00
|
|
|
|
$(CCC) -o $@ -c $(CXXFLAGS) $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
endif #STRICT_CPLUSPLUS_SUFFIX
|
|
|
|
|
|
|
|
|
|
%.i: %.cpp
|
1999-03-07 05:18:45 +00:00
|
|
|
|
$(CCC) -C -E $(CXXFLAGS) $< > $*.i
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
%.i: %.c
|
|
|
|
|
$(CC) -C -E $(CFLAGS) $< > $*.i
|
|
|
|
|
|
|
|
|
|
%: %.pl
|
1998-08-19 20:42:14 +00:00
|
|
|
|
rm -f $@; cp $< $@; chmod +x $@
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
%: %.sh
|
1998-08-19 20:42:14 +00:00
|
|
|
|
rm -f $@; cp $< $@; chmod +x $@
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-03-22 20:43:05 +00:00
|
|
|
|
# Cancel these implicit rules
|
|
|
|
|
#
|
|
|
|
|
%: %,v
|
|
|
|
|
|
|
|
|
|
%: RCS/%,v
|
|
|
|
|
|
|
|
|
|
%: s.%
|
|
|
|
|
|
|
|
|
|
%: SCCS/s.%
|
|
|
|
|
|
1999-01-29 20:00:50 +00:00
|
|
|
|
###############################################################################
|
|
|
|
|
# Update Makefiles
|
|
|
|
|
###############################################################################
|
1999-08-25 22:09:50 +00:00
|
|
|
|
# Note: Passing depth to make-makefile is optional.
|
|
|
|
|
# It saves the script some work, though.
|
1999-08-20 06:52:59 +00:00
|
|
|
|
Makefile: Makefile.in
|
1999-08-27 22:57:21 +00:00
|
|
|
|
@$(PERL) $(topsrcdir)/build/autoconf/make-makefile -d $(DEPTH)
|
1999-08-24 21:45:06 +00:00
|
|
|
|
|
1999-09-14 23:09:37 +00:00
|
|
|
|
ifdef SUBMAKEFILES
|
1999-09-03 22:18:30 +00:00
|
|
|
|
# VPATH does not work on some machines in this case, so add $(srcdir)
|
|
|
|
|
$(SUBMAKEFILES): % : $(srcdir)/%.in
|
1999-08-25 22:09:50 +00:00
|
|
|
|
@$(PERL) $(topsrcdir)/build/autoconf/make-makefile -d $(DEPTH) $@
|
1999-09-14 23:09:37 +00:00
|
|
|
|
endif
|
1999-01-29 20:00:50 +00:00
|
|
|
|
|
|
|
|
|
###############################################################################
|
1998-03-28 02:44:41 +00:00
|
|
|
|
# Bunch of things that extend the 'export' rule (in order):
|
1999-01-29 20:00:50 +00:00
|
|
|
|
###############################################################################
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
$(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) $(JMCSRCDIR)::
|
|
|
|
|
@if test ! -d $@; then \
|
|
|
|
|
echo Creating $@; \
|
|
|
|
|
rm -rf $@; \
|
|
|
|
|
$(NSINSTALL) -D $@; \
|
1998-10-23 04:41:26 +00:00
|
|
|
|
else \
|
|
|
|
|
true; \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
### JSRCS -- for compiling java files
|
|
|
|
|
|
|
|
|
|
ifneq ($(JSRCS),)
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE)
|
1998-08-19 20:42:14 +00:00
|
|
|
|
list=`$(PERL) $(topsrcdir)/config/outofdate.pl $(PERLARG) \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
-d $(JAVA_DESTPATH)/$(PACKAGE) $(JSRCS)`; \
|
|
|
|
|
if test "$$list"x != "x"; then \
|
|
|
|
|
echo $(JAVAC) $$list; \
|
|
|
|
|
$(JAVAC) $$list; \
|
1999-03-30 22:21:54 +00:00
|
|
|
|
else \
|
|
|
|
|
true; \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
all:: export
|
|
|
|
|
|
1999-07-20 02:10:47 +00:00
|
|
|
|
clean clobber::
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -f $(XPDIST)/classes/$(PACKAGE)/*.class
|
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# JDIRS -- like JSRCS, except you can give a list of directories and it will
|
|
|
|
|
# compile all the out-of-date java files in those directories.
|
|
|
|
|
#
|
|
|
|
|
# NOTE: recursing through these can speed things up, but they also cause
|
|
|
|
|
# some builds to run out of memory
|
|
|
|
|
#
|
|
|
|
|
ifdef JDIRS
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE)
|
|
|
|
|
@for d in $(JDIRS); do \
|
|
|
|
|
if test -d $$d; then \
|
|
|
|
|
set $(EXIT_ON_ERROR); \
|
|
|
|
|
files=`echo $$d/*.java`; \
|
1998-08-19 20:42:14 +00:00
|
|
|
|
list=`$(PERL) $(topsrcdir)/config/outofdate.pl $(PERLARG) \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
-d $(JAVA_DESTPATH)/$(PACKAGE) $$files`; \
|
|
|
|
|
if test "$${list}x" != "x"; then \
|
|
|
|
|
echo Building all java files in $$d; \
|
|
|
|
|
echo $(JAVAC) $$list; \
|
|
|
|
|
$(JAVAC) $$list; \
|
1999-03-30 22:21:54 +00:00
|
|
|
|
else \
|
|
|
|
|
true; \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
fi; \
|
|
|
|
|
set +e; \
|
|
|
|
|
else \
|
|
|
|
|
echo "Skipping non-directory $$d..."; \
|
|
|
|
|
fi; \
|
|
|
|
|
$(CLICK_STOPWATCH); \
|
|
|
|
|
done
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# JDK_GEN -- for generating "old style" native methods
|
|
|
|
|
#
|
|
|
|
|
# Generate JDK Headers and Stubs into the '_gen' and '_stubs' directory
|
|
|
|
|
#
|
|
|
|
|
ifneq ($(JDK_GEN),)
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
INCLUDES += -I$(JDK_GEN_DIR)
|
|
|
|
|
JDK_PACKAGE_CLASSES = $(JDK_GEN)
|
|
|
|
|
JDK_PATH_CLASSES = $(subst .,/,$(JDK_PACKAGE_CLASSES))
|
|
|
|
|
JDK_HEADER_CLASSFILES = $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES))
|
|
|
|
|
JDK_STUB_CLASSFILES = $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES))
|
|
|
|
|
JDK_HEADER_CFILES = $(patsubst %,$(JDK_GEN_DIR)/%.h,$(JDK_GEN))
|
|
|
|
|
JDK_STUB_CFILES = $(patsubst %,$(JDK_STUB_DIR)/%.c,$(JDK_GEN))
|
|
|
|
|
|
|
|
|
|
$(JDK_HEADER_CFILES): $(JDK_HEADER_CLASSFILES)
|
|
|
|
|
$(JDK_STUB_CFILES): $(JDK_STUB_CLASSFILES)
|
|
|
|
|
|
|
|
|
|
export::
|
|
|
|
|
@echo Generating/Updating JDK headers
|
|
|
|
|
$(JAVAH) -d $(JDK_GEN_DIR) $(JDK_PACKAGE_CLASSES)
|
|
|
|
|
@echo Generating/Updating JDK stubs
|
|
|
|
|
$(JAVAH) -stubs -d $(JDK_STUB_DIR) $(JDK_PACKAGE_CLASSES)
|
|
|
|
|
ifdef MOZ_GENMAC
|
|
|
|
|
@if test ! -d $(DEPTH)/lib/mac/Java/; then \
|
|
|
|
|
echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \
|
|
|
|
|
echo "!!! This allows us to automatically update generated files for the mac."; \
|
|
|
|
|
echo "!!! If you see any modified files there, please check them in."; \
|
1999-03-30 22:21:54 +00:00
|
|
|
|
else \
|
|
|
|
|
true; \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
fi
|
|
|
|
|
@echo Generating/Updating JDK headers for the Mac
|
|
|
|
|
$(JAVAH) -mac -d $(DEPTH)/lib/mac/Java/_gen $(JDK_PACKAGE_CLASSES)
|
|
|
|
|
@echo Generating/Updating JDK stubs for the Mac
|
|
|
|
|
$(JAVAH) -mac -stubs -d $(DEPTH)/lib/mac/Java/_stubs $(JDK_PACKAGE_CLASSES)
|
|
|
|
|
endif
|
1998-07-31 20:19:50 +00:00
|
|
|
|
endif # JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# JRI_GEN -- for generating JRI native methods
|
|
|
|
|
#
|
|
|
|
|
# Generate JRI Headers and Stubs into the 'jri' directory
|
|
|
|
|
#
|
|
|
|
|
ifneq ($(JRI_GEN),)
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
INCLUDES += -I$(JRI_GEN_DIR)
|
|
|
|
|
JRI_PACKAGE_CLASSES = $(JRI_GEN)
|
|
|
|
|
JRI_PATH_CLASSES = $(subst .,/,$(JRI_PACKAGE_CLASSES))
|
|
|
|
|
JRI_HEADER_CLASSFILES = $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES))
|
|
|
|
|
JRI_STUB_CLASSFILES = $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES))
|
|
|
|
|
JRI_HEADER_CFILES = $(patsubst %,$(JRI_GEN_DIR)/%.h,$(JRI_GEN))
|
|
|
|
|
JRI_STUB_CFILES = $(patsubst %,$(JRI_GEN_DIR)/%.c,$(JRI_GEN))
|
|
|
|
|
|
|
|
|
|
$(JRI_HEADER_CFILES): $(JRI_HEADER_CLASSFILES)
|
|
|
|
|
$(JRI_STUB_CFILES): $(JRI_STUB_CLASSFILES)
|
|
|
|
|
|
|
|
|
|
export::
|
|
|
|
|
@echo Generating/Updating JRI headers
|
|
|
|
|
$(JAVAH) -jri -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES)
|
|
|
|
|
@echo Generating/Updating JRI stubs
|
|
|
|
|
$(JAVAH) -jri -stubs -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES)
|
|
|
|
|
ifdef MOZ_GENMAC
|
|
|
|
|
@if test ! -d $(DEPTH)/lib/mac/Java/; then \
|
|
|
|
|
echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \
|
|
|
|
|
echo "!!! This allows us to automatically update generated files for the mac."; \
|
|
|
|
|
echo "!!! If you see any modified files there, please check them in."; \
|
1999-03-30 22:21:54 +00:00
|
|
|
|
else \
|
|
|
|
|
true; \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
fi
|
|
|
|
|
@echo Generating/Updating JRI headers for the Mac
|
|
|
|
|
$(JAVAH) -jri -mac -d $(DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
|
|
|
|
|
@echo Generating/Updating JRI stubs for the Mac
|
|
|
|
|
$(JAVAH) -jri -mac -stubs -d $(DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
|
|
|
|
|
endif
|
1998-07-31 20:19:50 +00:00
|
|
|
|
endif # JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1998-07-31 20:19:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# JNI_GEN -- for generating JNI native methods
|
|
|
|
|
#
|
|
|
|
|
# Generate JNI Headers and Stubs into the 'jni' directory
|
|
|
|
|
#
|
|
|
|
|
ifneq ($(JNI_GEN),)
|
|
|
|
|
ifdef JAVA_OR_NSJVM
|
|
|
|
|
INCLUDES += -I$(JNI_GEN_DIR)
|
|
|
|
|
JNI_PACKAGE_CLASSES = $(JNI_GEN)
|
|
|
|
|
JNI_PATH_CLASSES = $(subst .,/,$(JNI_PACKAGE_CLASSES))
|
|
|
|
|
JNI_HEADER_CLASSFILES = $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JNI_PATH_CLASSES))
|
|
|
|
|
JNI_HEADER_CFILES = $(patsubst %,$(JNI_GEN_DIR)/%.h,$(JNI_GEN))
|
|
|
|
|
JNI_STUB_CFILES = $(patsubst %,$(JNI_GEN_DIR)/%.c,$(JNI_GEN))
|
|
|
|
|
|
|
|
|
|
$(JNI_HEADER_CFILES): $(JNI_HEADER_CLASSFILES)
|
|
|
|
|
|
|
|
|
|
export::
|
|
|
|
|
@echo Generating/Updating JNI headers
|
|
|
|
|
$(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_PACKAGE_CLASSES)
|
|
|
|
|
ifdef MOZ_GENMAC
|
|
|
|
|
@if test ! -d $(DEPTH)/lib/mac/Java/; then \
|
|
|
|
|
echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \
|
|
|
|
|
echo "!!! This allows us to automatically update generated files for the mac."; \
|
|
|
|
|
echo "!!! If you see any modified files there, please check them in."; \
|
1999-03-30 22:21:54 +00:00
|
|
|
|
else \
|
|
|
|
|
true; \
|
1998-07-31 20:19:50 +00:00
|
|
|
|
fi
|
|
|
|
|
@echo Generating/Updating JNI headers for the Mac
|
|
|
|
|
$(JAVAH) -jni -mac -d $(DEPTH)/lib/mac/Java/_jni $(JNI_PACKAGE_CLASSES)
|
|
|
|
|
endif
|
|
|
|
|
endif # JAVA_OR_NSJVM
|
|
|
|
|
endif # JNI_GEN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
#
|
|
|
|
|
# JMC_EXPORT -- for declaring which java classes are to be exported for jmc
|
|
|
|
|
#
|
|
|
|
|
ifneq ($(JMC_EXPORT),)
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
JMC_EXPORT_PATHS = $(subst .,/,$(JMC_EXPORT))
|
|
|
|
|
JMC_EXPORT_FILES = $(patsubst %,$(JAVA_DESTPATH)/$(PACKAGE)/%.class,$(JMC_EXPORT_PATHS))
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# We're doing NSINSTALL -t here (copy mode) because calling INSTALL will pick up
|
|
|
|
|
# your NSDISTMODE and make links relative to the current directory. This is a
|
|
|
|
|
# problem because the source isn't in the current directory:
|
|
|
|
|
#
|
|
|
|
|
export:: $(JMC_EXPORT_FILES) $(JMCSRCDIR)
|
|
|
|
|
$(NSINSTALL) -t -m 444 $(JMC_EXPORT_FILES) $(JMCSRCDIR)
|
1998-07-31 20:19:50 +00:00
|
|
|
|
endif # JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# JMC_GEN -- for generating java modules
|
|
|
|
|
#
|
|
|
|
|
# Provide default export & install rules when using JMC_GEN
|
|
|
|
|
#
|
|
|
|
|
ifneq ($(JMC_GEN),)
|
|
|
|
|
INCLUDES += -I$(JMC_GEN_DIR) -I.
|
1998-07-31 20:19:50 +00:00
|
|
|
|
ifdef JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
JMC_HEADERS = $(patsubst %,$(JMC_GEN_DIR)/%.h,$(JMC_GEN))
|
|
|
|
|
JMC_STUBS = $(patsubst %,$(JMC_GEN_DIR)/%.c,$(JMC_GEN))
|
1999-08-20 06:52:59 +00:00
|
|
|
|
JMC_OBJS = $(patsubst %,%.o,$(JMC_GEN))
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
$(JMC_GEN_DIR)/M%.h: $(JMCSRCDIR)/%.class
|
|
|
|
|
$(JMC) -d $(JMC_GEN_DIR) -interface $(JMC_GEN_FLAGS) $(?F:.class=)
|
|
|
|
|
|
|
|
|
|
$(JMC_GEN_DIR)/M%.c: $(JMCSRCDIR)/%.class
|
|
|
|
|
$(JMC) -d $(JMC_GEN_DIR) -module $(JMC_GEN_FLAGS) $(?F:.class=)
|
|
|
|
|
|
1999-08-20 06:52:59 +00:00
|
|
|
|
M%.o: $(JMC_GEN_DIR)/M%.h $(JMC_GEN_DIR)/M%.c
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
|
$(CC) -Fo$@ -c $(CFLAGS) $(JMC_GEN_DIR)/M$*.c
|
|
|
|
|
else
|
|
|
|
|
$(CC) -o $@ -c $(CFLAGS) $(JMC_GEN_DIR)/M$*.c
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
export:: $(JMC_HEADERS) $(JMC_STUBS)
|
1998-07-31 20:19:50 +00:00
|
|
|
|
endif # JAVA_OR_NSJVM
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1999-03-22 20:43:05 +00:00
|
|
|
|
################################################################################
|
1999-06-23 20:38:09 +00:00
|
|
|
|
# Copy each element of EXPORTS to $(PUBLIC)
|
1999-03-22 20:43:05 +00:00
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifneq ($(EXPORTS),)
|
1999-06-23 20:38:09 +00:00
|
|
|
|
$(PUBLIC)::
|
1999-03-30 22:21:54 +00:00
|
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-06-23 20:38:09 +00:00
|
|
|
|
export:: $(EXPORTS) $(PUBLIC)
|
1998-10-23 04:41:26 +00:00
|
|
|
|
$(INSTALL) -m 444 $^
|
1999-06-03 00:41:11 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
################################################################################
|
1999-09-17 23:28:56 +00:00
|
|
|
|
# Copy each element of PREF_JS_EXPORTS to $(DIST)/bin/defaults/pref
|
1999-06-03 00:41:11 +00:00
|
|
|
|
|
|
|
|
|
ifneq ($(PREF_JS_EXPORTS),)
|
1999-09-17 23:28:56 +00:00
|
|
|
|
$(DIST)/bin/defaults/pref::
|
1999-06-03 00:41:11 +00:00
|
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
|
|
|
|
|
1999-09-17 23:28:56 +00:00
|
|
|
|
export:: $(PREF_JS_EXPORTS) $(DIST)/bin/defaults/pref
|
1999-06-03 00:41:11 +00:00
|
|
|
|
$(INSTALL) -m 444 $^
|
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
################################################################################
|
1999-05-08 02:06:15 +00:00
|
|
|
|
# Export the elements of $(XPIDLSRCS), generating .h and .xpt files and
|
|
|
|
|
# moving them to the appropriate places.
|
|
|
|
|
|
1999-06-20 08:59:31 +00:00
|
|
|
|
ifneq ($(XPIDLSRCS),)
|
|
|
|
|
|
1999-05-26 01:38:36 +00:00
|
|
|
|
ifndef XPIDL_MODULE
|
1999-09-09 09:24:58 +00:00
|
|
|
|
XPIDL_MODULE = $(MODULE)
|
1999-05-26 01:38:36 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifeq ($(XPIDL_MODULE),) # we need $(XPIDL_MODULE) to make $(XPIDL_MODULE).xpt
|
1999-05-08 22:28:49 +00:00
|
|
|
|
export:: FORCE
|
|
|
|
|
@echo
|
1999-05-09 08:16:07 +00:00
|
|
|
|
@echo "*** Error processing XPIDLSRCS:"
|
1999-05-26 01:38:36 +00:00
|
|
|
|
@echo "Please define MODULE or XPIDL_MODULE when defining XPIDLSRCS,"
|
1999-05-08 22:28:49 +00:00
|
|
|
|
@echo "so we have a module name to use when creating MODULE.xpt."
|
|
|
|
|
@echo; sleep 2; false
|
|
|
|
|
else
|
1999-01-22 01:28:13 +00:00
|
|
|
|
|
1999-05-08 02:06:15 +00:00
|
|
|
|
# export .idl files to $(XPDIST)/idl
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(XPDIST)/idl::
|
1999-03-30 22:21:54 +00:00
|
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
1999-01-22 01:28:13 +00:00
|
|
|
|
|
1999-05-08 02:06:15 +00:00
|
|
|
|
export:: $(XPIDLSRCS) $(XPDIST)/idl
|
1999-01-22 01:28:13 +00:00
|
|
|
|
$(INSTALL) -m 444 $^
|
|
|
|
|
|
1999-06-23 20:38:09 +00:00
|
|
|
|
# generate .h files from into $(XPIDL_GEN_DIR), then export to $(PUBLIC);
|
1999-06-20 08:59:31 +00:00
|
|
|
|
# warn against overriding existing .h file. (Added to MAKE_DIRS above.)
|
|
|
|
|
$(XPIDL_GEN_DIR):
|
|
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; mkdir $@; else true; fi
|
1999-05-08 02:06:15 +00:00
|
|
|
|
|
1999-06-20 00:02:37 +00:00
|
|
|
|
# don't depend on $(XPIDL_GEN_DIR), because the modification date changes
|
|
|
|
|
# with any addition to the directory, regenerating all .h files -> everything.
|
1999-06-20 08:59:31 +00:00
|
|
|
|
|
1999-06-20 00:02:37 +00:00
|
|
|
|
$(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_COMPILE)
|
1999-05-12 21:43:03 +00:00
|
|
|
|
$(XPIDL_COMPILE) -m header -w -I $(XPDIST)/idl -I$(srcdir) -o $(XPIDL_GEN_DIR)/$* $<
|
1999-05-09 06:26:05 +00:00
|
|
|
|
@if test -n "$(findstring $*.h, $(EXPORTS))"; \
|
1999-06-03 20:28:34 +00:00
|
|
|
|
then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
|
1999-05-08 02:06:15 +00:00
|
|
|
|
|
1999-06-23 20:38:09 +00:00
|
|
|
|
export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) $(PUBLIC)
|
1999-05-08 02:06:15 +00:00
|
|
|
|
$(INSTALL) -m 444 $^
|
|
|
|
|
|
1999-05-11 23:43:36 +00:00
|
|
|
|
ifndef NO_GEN_XPT
|
1999-05-08 02:06:15 +00:00
|
|
|
|
# generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
|
1999-05-26 01:38:36 +00:00
|
|
|
|
# into $(XPIDL_MODULE).xpt and export it to $(DIST)/bin/components.
|
1999-06-20 00:02:37 +00:00
|
|
|
|
$(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_COMPILE)
|
1999-05-12 21:50:17 +00:00
|
|
|
|
$(XPIDL_COMPILE) -m typelib -w -I $(XPDIST)/idl -I$(srcdir) -o $(XPIDL_GEN_DIR)/$* $<
|
1999-05-08 02:06:15 +00:00
|
|
|
|
|
1999-05-26 01:38:36 +00:00
|
|
|
|
$(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS))
|
|
|
|
|
$(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $^
|
1999-05-08 02:06:15 +00:00
|
|
|
|
|
1999-05-26 01:38:36 +00:00
|
|
|
|
install:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
|
|
|
|
|
$(INSTALL) -m 444 $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DIST)/bin/components
|
1999-05-09 08:16:07 +00:00
|
|
|
|
|
1999-05-11 23:43:36 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1999-09-09 09:24:58 +00:00
|
|
|
|
GARBAGE += $(XPIDL_GEN_DIR)
|
1999-05-08 02:06:15 +00:00
|
|
|
|
endif
|
1999-01-22 01:28:13 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1999-07-27 14:30:34 +00:00
|
|
|
|
################################################################################
|
|
|
|
|
# Generate chrome building rules.
|
|
|
|
|
#
|
|
|
|
|
# You need to set these in your makefile.win to utilize this support:
|
|
|
|
|
# CHROME_DIR - specifies the chrome subdirectory where your chrome files
|
|
|
|
|
# go; e.g., CHROME_DIR=navigator or CHROME_DIR=global
|
|
|
|
|
#
|
|
|
|
|
# Note: All file listed in the next three macros MUST be prefaced with .\ (or ./)!
|
|
|
|
|
#
|
|
|
|
|
# CHROME_CONTENT - list of chrome content files; these can be prefaced with
|
|
|
|
|
# arbitrary paths; e.g., CHROME_CONTENT=./content/default/foobar.xul
|
|
|
|
|
# CHROME_SKIN - list of skin files
|
|
|
|
|
# CHROME_L10N - list of localization files, e.g., CHROME_L10N=./locale/en-US/foobar.dtd
|
|
|
|
|
#
|
|
|
|
|
# These macros are optional, if not specified, each defaults to ".".
|
|
|
|
|
# CHROME_CONTENT_DIR - specifies chrome subdirectory where content files will be
|
|
|
|
|
# installed; this path is inserted between $(CHROME_DIR) and
|
|
|
|
|
# the path you specify in each $(CHROME_CONTENT) entry; i.e.,
|
|
|
|
|
# for CHROME_CONTENT=./content/default/foobar.xul, it will be
|
|
|
|
|
# installed into:
|
|
|
|
|
# $(DIST)\bin\chrome\$(CHROME_DIR)\$(CHROME_CONTENT_DIR)\content\default\foobar.xul.
|
|
|
|
|
# e.g., CHROME_DIR=global
|
|
|
|
|
# CHROME_CONTENT_DIR=content\default
|
|
|
|
|
# CHROME_CONTENT=.\foobar.xul
|
|
|
|
|
# will install foobar.xul into content/default (even though it
|
|
|
|
|
# resides in content/foobar.xul (no default) in the source tree.
|
|
|
|
|
# But note that such usage must be put in a makefile.win that
|
|
|
|
|
# itself resides in the content directory (i.e., it can't reside
|
|
|
|
|
# up a level, since then CHROME_CONTENT=./content/foobar.xul which
|
|
|
|
|
# would install into ...global\content\default\content\foobar.xul.
|
|
|
|
|
# CHROME_SKIN_DIR - Like above, but for skin files
|
|
|
|
|
# CHROME_L10N_DIR - Like above, but for localization files
|
|
|
|
|
ifneq ($(CHROME_DIR),)
|
|
|
|
|
|
|
|
|
|
# Figure out root of chrome dist dir.
|
|
|
|
|
CHROME_DIST=$(DIST)/bin/chrome/$(CHROME_DIR)
|
|
|
|
|
|
|
|
|
|
# Content
|
|
|
|
|
ifneq ($(CHROME_CONTENT),)
|
|
|
|
|
|
|
|
|
|
# Content goes to CHROME_DIR unless specified otherwise.
|
|
|
|
|
ifeq ($(CHROME_CONTENT_DIR),)
|
1999-09-09 09:24:58 +00:00
|
|
|
|
CHROME_CONTENT_DIR = .
|
1999-07-27 14:30:34 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# Export content files by copying to dist.
|
|
|
|
|
install:: $(addprefix "INSTALL-", $(CHROME_CONTENT))
|
|
|
|
|
|
|
|
|
|
# Pseudo-target specifying how to install content files.
|
|
|
|
|
$(addprefix "INSTALL-", $(CHROME_CONTENT)) :
|
1999-08-06 22:41:51 +00:00
|
|
|
|
$(INSTALL) $(subst "INSTALL-",,$(CHROME_SOURCE_DIR)/$@) $(CHROME_DIST)/$(CHROME_CONTENT_DIR)/$(subst "INSTALL-",,$(@D))
|
1999-07-27 14:30:34 +00:00
|
|
|
|
|
|
|
|
|
# Clobber content files.
|
|
|
|
|
clobber:: $(addprefix "CLOBBER-", $(CHROME_CONTENT))
|
|
|
|
|
|
|
|
|
|
# Pseudo-target specifying how to clobber content files.
|
|
|
|
|
$(addprefix "CLOBBER-", $(CHROME_CONTENT)) :
|
|
|
|
|
-$(RM) $(CHROME_DIST)/$(CHROME_CONTENT_DIR)/$(subst "CLOBBER-",,$@)
|
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
# content
|
|
|
|
|
|
|
|
|
|
# Skin
|
|
|
|
|
ifneq ($(CHROME_SKIN),)
|
|
|
|
|
|
|
|
|
|
# Skin goes to CHROME_DIR unless specified otherwise.
|
|
|
|
|
ifeq ($(CHROME_SKIN_DIR),)
|
1999-09-09 09:24:58 +00:00
|
|
|
|
CHROME_SKIN_DIR = .
|
1999-07-27 14:30:34 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# Export content files by copying to dist.
|
|
|
|
|
install:: $(addprefix "INSTALL-", $(CHROME_SKIN))
|
|
|
|
|
|
|
|
|
|
# Pseudo-target specifying how to install chrome files.
|
|
|
|
|
$(addprefix "INSTALL-", $(CHROME_SKIN)) :
|
1999-08-06 22:41:51 +00:00
|
|
|
|
$(INSTALL) $(subst "INSTALL-",,$(CHROME_SOURCE_DIR)/$@) $(CHROME_DIST)/$(CHROME_SKIN_DIR)/$(subst "INSTALL-",,$(@D))
|
1999-07-27 14:30:34 +00:00
|
|
|
|
|
|
|
|
|
# Clobber content files.
|
|
|
|
|
clobber:: $(addprefix "CLOBBER-", $(CHROME_SKIN))
|
|
|
|
|
|
|
|
|
|
# Pseudo-target specifying how to clobber content files.
|
|
|
|
|
$(addprefix "CLOBBER-", $(CHROME_SKIN)) :
|
|
|
|
|
-$(RM) $(CHROME_DIST)/$(CHROME_SKIN_DIR)/$(subst "CLOBBER-",,$@)
|
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
# skin
|
|
|
|
|
|
|
|
|
|
# Localization.
|
|
|
|
|
ifneq ($(CHROME_L10N),)
|
|
|
|
|
|
|
|
|
|
# L10n goes to CHROME_DIR unless specified otherwise.
|
|
|
|
|
ifeq ($(CHROME_L10N_DIR),)
|
1999-09-09 09:24:58 +00:00
|
|
|
|
CHROME_L10N_DIR = .
|
1999-07-27 14:30:34 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# Export l10n files by copying to dist.
|
|
|
|
|
install:: $(addprefix "INSTALL-", $(CHROME_L10N))
|
|
|
|
|
|
|
|
|
|
# Pseudo-target specifying how to install l10n files.
|
|
|
|
|
$(addprefix "INSTALL-", $(CHROME_L10N)) :
|
1999-08-06 22:41:51 +00:00
|
|
|
|
$(INSTALL) $(subst "INSTALL-",,$(CHROME_SOURCE_DIR)/$@) $(CHROME_DIST)/$(CHROME_L10N_DIR)/$(subst "INSTALL-",,$(@D))
|
1999-07-27 14:30:34 +00:00
|
|
|
|
|
|
|
|
|
# Clobber l10n files.
|
|
|
|
|
clobber:: $(addprefix "CLOBBER-", $(CHROME_L10N))
|
|
|
|
|
|
|
|
|
|
# Pseudo-target specifying how to clobber l10n files.
|
|
|
|
|
$(addprefix "CLOBBER-", $(CHROME_L10N)) :
|
|
|
|
|
-$(RM) $(CHROME_DIST)/$(CHROME_L10N_DIR)/$(subst "CLOBBER-",,$@)
|
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
# localization
|
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
# chrome
|
1999-01-22 01:28:13 +00:00
|
|
|
|
##############################################################################
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-01-26 23:54:59 +00:00
|
|
|
|
ifndef NO_MDUPDATE
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
|
1998-11-19 03:09:23 +00:00
|
|
|
|
-include $(DEPENDENCIES)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
# Can't use sed because of its 4000-char line length limit, so resort to perl
|
|
|
|
|
.DEFAULT:
|
|
|
|
|
@$(PERL) -e ' \
|
|
|
|
|
open(MD, "< $(DEPENDENCIES)"); \
|
|
|
|
|
while (<MD>) { \
|
|
|
|
|
if (m@ \.*/*$< @) { \
|
|
|
|
|
$$found = 1; \
|
|
|
|
|
last; \
|
|
|
|
|
} \
|
|
|
|
|
} \
|
|
|
|
|
if ($$found) { \
|
|
|
|
|
print "Removing stale dependency $< from $(DEPENDENCIES)\n"; \
|
|
|
|
|
seek(MD, 0, 0); \
|
1999-08-20 06:52:59 +00:00
|
|
|
|
$$tmpname = "fix.md" . $$$$; \
|
1998-03-28 02:44:41 +00:00
|
|
|
|
open(TMD, "> " . $$tmpname); \
|
|
|
|
|
while (<MD>) { \
|
|
|
|
|
s@ \.*/*$< @ @; \
|
|
|
|
|
if (!print TMD "$$_") { \
|
|
|
|
|
unlink(($$tmpname)); \
|
|
|
|
|
exit(1); \
|
|
|
|
|
} \
|
|
|
|
|
} \
|
|
|
|
|
close(TMD); \
|
|
|
|
|
if (!rename($$tmpname, "$(DEPENDENCIES)")) { \
|
|
|
|
|
unlink(($$tmpname)); \
|
|
|
|
|
} \
|
|
|
|
|
} elsif ("$<" ne "$(DEPENDENCIES)") { \
|
|
|
|
|
print "$(MAKE): *** No rule to make target $<. Stop.\n"; \
|
|
|
|
|
exit(1); \
|
|
|
|
|
}'
|
|
|
|
|
endif
|
1999-01-26 23:54:59 +00:00
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
# X dependency system
|
|
|
|
|
#############################################################################
|
1999-03-22 20:43:05 +00:00
|
|
|
|
ifdef COMPILER_DEPEND
|
|
|
|
|
depend::
|
1999-03-31 19:07:29 +00:00
|
|
|
|
@echo "$(MAKE): No need to run depend target.\
|
|
|
|
|
Using compiler-based depend." 1>&2
|
|
|
|
|
ifeq ($(GNU_CC)$(GNU_CXX),)
|
|
|
|
|
# Non-GNU compilers
|
|
|
|
|
@echo "`echo '$(MAKE):'|sed 's/./ /g'`"\
|
|
|
|
|
'(Compiler-based depend was turned on by "--enable-depend".)' 1>&2
|
|
|
|
|
else
|
|
|
|
|
# GNU compilers
|
|
|
|
|
@space="`echo '$(MAKE): '|sed 's/./ /g'`";\
|
|
|
|
|
echo "$$space"'Since you are using a GNU compiler,\
|
|
|
|
|
it is on by default.' 1>&2; \
|
|
|
|
|
echo "$$space"'To turn it off, pass --disable-md to configure.' 1>&2
|
|
|
|
|
endif
|
1999-03-22 20:43:05 +00:00
|
|
|
|
else
|
1998-03-28 02:44:41 +00:00
|
|
|
|
$(MKDEPENDENCIES)::
|
|
|
|
|
touch $(MKDEPENDENCIES)
|
1999-10-04 10:43:28 +00:00
|
|
|
|
ifneq ($(OS_ARCH),OpenVMS)
|
1999-08-20 06:52:59 +00:00
|
|
|
|
$(MKDEPEND) -o'.o' -f$(MKDEPENDENCIES) $(DEFINES) $(ACDEFINES) $(INCLUDES) $(addprefix $(srcdir)/,$(CSRCS) $(CPPSRCS)) >/dev/null 2>&1
|
1999-09-02 01:14:01 +00:00
|
|
|
|
@mv $(MKDEPENDENCIES) depend.mk.old && cat depend.mk.old | sed "s|^$(srcdir)/||g" > $(MKDEPENDENCIES) && rm -f depend.mk.old
|
1999-10-04 10:43:28 +00:00
|
|
|
|
else
|
|
|
|
|
# OpenVMS can't handle long lines, so make it shorter
|
|
|
|
|
@ln -s $(srcdir) VMSs
|
|
|
|
|
$(MKDEPEND) -o'.o' -f$(MKDEPENDENCIES) $(DEFINES) $(ACDEFINES) $(INCLUDES) $(addprefix VMSs/,$(CSRCS) $(CPPSRCS)) >/dev/null 2>&1
|
|
|
|
|
@mv $(MKDEPENDENCIES) depend.mk.old && cat depend.mk.old | sed "s|^VMSs/||g" | sed "s| VMSs/| $(srcdir)/|g" > $(MKDEPENDENCIES) && rm -f depend.mk.old
|
|
|
|
|
@rm VMSs
|
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1998-12-04 05:07:01 +00:00
|
|
|
|
ifndef MOZ_NATIVE_MAKEDEPEND
|
1999-03-22 20:43:05 +00:00
|
|
|
|
$(MKDEPEND):
|
1999-04-11 14:27:35 +00:00
|
|
|
|
cd $(DEPTH)/config; $(MAKE) nsinstall
|
1998-03-28 02:44:41 +00:00
|
|
|
|
cd $(MKDEPEND_DIR); $(MAKE)
|
1998-12-04 05:07:01 +00:00
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1998-12-04 05:07:01 +00:00
|
|
|
|
ifndef MOZ_NATIVE_MAKEDEPEND
|
1999-09-09 09:24:58 +00:00
|
|
|
|
MKDEPEND_BUILTIN = $(MKDEPEND)
|
1998-12-04 05:07:01 +00:00
|
|
|
|
else
|
1999-09-09 09:24:58 +00:00
|
|
|
|
MKDEPEND_BUILTIN =
|
1998-12-04 05:07:01 +00:00
|
|
|
|
endif
|
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
ifdef OBJS
|
1999-08-24 21:45:06 +00:00
|
|
|
|
depend:: $(SUBMAKEFILES) $(MAKE_DIRS) $(MKDEPEND_BUILTIN) $(MKDEPENDENCIES)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
else
|
1999-08-24 21:45:06 +00:00
|
|
|
|
depend:: $(SUBMAKEFILES)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
endif
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
|
dependclean:: $(SUBMAKEFILES)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
rm -f $(MKDEPENDENCIES)
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
|
1999-08-20 06:52:59 +00:00
|
|
|
|
-include depend.mk
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-03-22 20:43:05 +00:00
|
|
|
|
endif # ! COMPILER_DEPEND
|
|
|
|
|
|
1999-02-17 17:33:07 +00:00
|
|
|
|
#############################################################################
|
1999-08-24 21:45:06 +00:00
|
|
|
|
# Yet another depend system: -MD (configure switch: --enable-md)
|
1999-03-09 01:31:26 +00:00
|
|
|
|
ifdef COMPILER_DEPEND
|
|
|
|
|
ifdef OBJS
|
1999-08-24 21:45:06 +00:00
|
|
|
|
# MDDEPDIR is the subdirectory where all the dependency files are placed.
|
|
|
|
|
# This uses a make rule (instead of a macro) to support parallel
|
|
|
|
|
# builds (-jN). If this were done in the LOOP_OVER_DIRS macro, two
|
|
|
|
|
# processes could simultaneously try to create the same directory.
|
|
|
|
|
#
|
|
|
|
|
$(MDDEPDIR):
|
1999-09-09 09:24:58 +00:00
|
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; mkdir $@; else true; fi
|
|
|
|
|
|
|
|
|
|
MDDEPEND_FILES := $(wildcard $(MDDEPDIR)/*.pp)
|
|
|
|
|
|
1999-03-09 01:31:26 +00:00
|
|
|
|
ifdef MDDEPEND_FILES
|
1999-10-12 12:36:07 +00:00
|
|
|
|
ifdef PERL
|
1999-03-11 01:35:33 +00:00
|
|
|
|
# The script mddepend.pl checks the dependencies and writes to stdout
|
|
|
|
|
# one rule to force out-of-date objects. For example,
|
|
|
|
|
# foo.o boo.o: FORCE
|
|
|
|
|
# The script has an advantage over including the *.pp files directly
|
1999-05-18 00:26:10 +00:00
|
|
|
|
# because it handles the case when header files are removed from the build.
|
|
|
|
|
# 'make' would complain that there is no way to build missing headers.
|
1999-03-29 23:19:57 +00:00
|
|
|
|
$(MDDEPDIR)/.all.pp: FORCE
|
1999-05-18 00:26:10 +00:00
|
|
|
|
@$(PERL) $(topsrcdir)/config/mddepend.pl $@ $(MDDEPEND_FILES)
|
1999-03-22 20:43:05 +00:00
|
|
|
|
-include $(MDDEPDIR)/.all.pp
|
1999-03-11 01:35:33 +00:00
|
|
|
|
else
|
|
|
|
|
include $(MDDEPEND_FILES)
|
|
|
|
|
endif
|
1999-03-09 01:31:26 +00:00
|
|
|
|
endif
|
1999-02-17 17:33:07 +00:00
|
|
|
|
endif
|
1999-03-10 00:03:12 +00:00
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
|
|
-include $(MY_RULES)
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# This speeds up gmake's processing if these files don't exist.
|
|
|
|
|
#
|
|
|
|
|
$(MY_CONFIG) $(MY_RULES):
|
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
|
|
|
|
|
# or in $(MY_RULES)
|
|
|
|
|
#
|
|
|
|
|
ifdef ETAGS
|
1998-04-15 23:56:45 +00:00
|
|
|
|
ifneq ($(CSRCS)$(CPPSRCS)$(HEADERS),)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
all:: TAGS
|
|
|
|
|
TAGS:: $(CSRCS) $(CPPSRCS) $(HEADERS)
|
|
|
|
|
$(ETAGS) $(CSRCS) $(CPPSRCS) $(HEADERS)
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
# Special gmake rules.
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Re-define the list of default suffixes, so gmake won't have to churn through
|
|
|
|
|
# hundreds of built-in suffix rules for stuff we don't need.
|
|
|
|
|
#
|
|
|
|
|
.SUFFIXES:
|
1999-03-22 20:43:05 +00:00
|
|
|
|
.SUFFIXES: .out .a .ln .o .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .pp .mk .in
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Don't delete these files if we get killed.
|
|
|
|
|
#
|
|
|
|
|
.PRECIOUS: .java $(JDK_HEADERS) $(JDK_STUBS) $(JRI_HEADERS) $(JRI_STUBS) $(JMC_HEADERS) $(JMC_STUBS)
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Fake targets. Always run these rules, even if a file/directory with that
|
|
|
|
|
# name already exists.
|
|
|
|
|
#
|
1999-09-03 22:18:30 +00:00
|
|
|
|
.PHONY: all all_platforms alltags boot checkout clean clobber clobber_all export install libs makefiles realclean run_viewer run_apprunner $(DIRS) FORCE
|
1999-03-09 21:56:44 +00:00
|
|
|
|
|
|
|
|
|
# Used as a dependency to force targets to rebuild
|
|
|
|
|
FORCE:
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
1999-05-11 23:43:36 +00:00
|
|
|
|
tags: TAGS
|
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
|
TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
1999-05-11 23:43:36 +00:00
|
|
|
|
-etags $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
|
1998-07-31 20:19:50 +00:00
|
|
|
|
envirocheck::
|
|
|
|
|
@echo -----------------------------------
|
|
|
|
|
@echo "Enviro-Check (tm)"
|
|
|
|
|
@echo -----------------------------------
|
|
|
|
|
@echo "MOZILLA_CLIENT = $(MOZILLA_CLIENT)"
|
|
|
|
|
@echo "NO_MDUPDATE = $(NO_MDUPDATE)"
|
|
|
|
|
@echo "BUILD_OPT = $(BUILD_OPT)"
|
|
|
|
|
@echo "MOZ_LITE = $(MOZ_LITE)"
|
|
|
|
|
@echo "MOZ_MEDIUM = $(MOZ_MEDIUM)"
|
|
|
|
|
@echo -----------------------------------
|
1999-10-21 14:57:38 +00:00
|
|
|
|
|
|
|
|
|
echo-dirs:
|
|
|
|
|
@echo $(DIRS)
|
|
|
|
|
|
|
|
|
|
echo-depth-path:
|
|
|
|
|
@$(topsrcdir)/build/autoconf/print-depth-path.sh
|
|
|
|
|
|
|
|
|
|
echo-module-name:
|
|
|
|
|
@$(topsrcdir)/build/package/rpm/print-module-name.sh
|
|
|
|
|
|
|
|
|
|
echo-module-filelist:
|
|
|
|
|
@$(topsrcdir)/build/package/rpm/print-module-filelist.sh
|
|
|
|
|
|