1999-11-06 06:43:54 +03: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-11-06 11:39:52 +03:00
|
|
|
#
|
1999-11-06 06:43:54 +03: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-11-06 11:39:52 +03:00
|
|
|
#
|
1999-11-06 06:43:54 +03:00
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape
|
1998-11-06 11:39:52 +03:00
|
|
|
# Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:43:54 +03:00
|
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
# Rights Reserved.
|
|
|
|
#
|
2000-03-14 05:59:43 +03:00
|
|
|
# Contributor(s): Stephen Lamm
|
1998-11-06 11:39:52 +03:00
|
|
|
|
|
|
|
# Build the Mozilla client.
|
|
|
|
#
|
1999-02-17 20:36:29 +03:00
|
|
|
# This needs CVSROOT set to work, e.g.,
|
|
|
|
# setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
|
|
# or
|
|
|
|
# setenv CVSROOT :pserver:username%somedomain.org@cvs.mozilla.org:/cvsroot
|
1998-11-06 12:06:37 +03:00
|
|
|
#
|
1999-04-14 06:34:49 +04:00
|
|
|
# To checkout and build a tree,
|
1999-02-19 22:49:15 +03:00
|
|
|
# 1. cvs co mozilla/client.mk
|
|
|
|
# 2. cd mozilla
|
1999-04-14 06:34:49 +04:00
|
|
|
# 3. gmake -f client.mk
|
1998-11-06 11:39:52 +03:00
|
|
|
#
|
1999-02-19 22:49:15 +03:00
|
|
|
# Other targets (gmake -f client.mk [targets...]),
|
2000-03-14 05:59:43 +03:00
|
|
|
# checkout
|
|
|
|
# build
|
|
|
|
# clean (realclean is now the same as clean)
|
|
|
|
# distclean
|
1998-11-06 12:06:37 +03:00
|
|
|
#
|
1999-02-19 22:49:15 +03:00
|
|
|
# See http://www.mozilla.org/build/unix.html for more information.
|
1998-11-06 12:06:37 +03:00
|
|
|
#
|
1999-02-17 20:36:29 +03:00
|
|
|
# Options:
|
1999-04-13 01:20:59 +04:00
|
|
|
# MOZ_OBJDIR - Destination object directory
|
1999-04-21 05:25:26 +04:00
|
|
|
# MOZ_CO_DATE - Date tag to use for checkout (default: none)
|
1999-10-08 01:24:17 +04:00
|
|
|
# MOZ_CO_MODULE - Module to checkout (default: SeaMonkeyAll)
|
1999-04-13 01:20:59 +04:00
|
|
|
# MOZ_CVS_FLAGS - Flags to pass cvs (default: -q -z3)
|
|
|
|
# MOZ_CO_FLAGS - Flags to pass after 'cvs co' (default: -P)
|
1999-08-20 19:02:00 +04:00
|
|
|
# MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
|
2000-03-17 03:56:58 +03:00
|
|
|
# MOZ_CO_BRANCH - Branch tag (Depricated. Use MOZ_CO_TAG below.)
|
1999-10-09 04:31:17 +04:00
|
|
|
#
|
1999-02-17 20:36:29 +03:00
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
#######################################################################
|
|
|
|
# Checkout Tags
|
|
|
|
#
|
|
|
|
# For branches, uncomment the MOZ_CO_TAG line with the proper tag,
|
|
|
|
# and commit this file on that tag.
|
|
|
|
#MOZ_CO_TAG = <tag>
|
|
|
|
NSPR_CO_TAG = NSPRPUB_CLIENT_BRANCH
|
|
|
|
PSM_CO_TAG = SeaMonkey_M14_BRANCH
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
# Defines
|
|
|
|
#
|
|
|
|
CWD := $(shell pwd)
|
2000-03-01 00:00:21 +03:00
|
|
|
ifneq (, $(wildcard client.mk))
|
2000-03-17 03:56:58 +03:00
|
|
|
# Ran from mozilla directory
|
|
|
|
ROOTDIR := $(shell dirname $(CWD))
|
|
|
|
TOPSRCDIR := $(CWD)
|
1999-02-17 20:36:29 +03:00
|
|
|
else
|
2000-03-17 03:56:58 +03:00
|
|
|
# Ran from mozilla/.. directory (?)
|
|
|
|
ROOTDIR := $(CWD)
|
|
|
|
TOPSRCDIR := $(CWD)/mozilla
|
1999-02-17 20:36:29 +03:00
|
|
|
endif
|
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
AUTOCONF := autoconf
|
|
|
|
MKDIR := mkdir
|
|
|
|
SH := /bin/sh
|
1998-11-13 22:42:43 +03:00
|
|
|
ifndef MAKE
|
2000-03-17 03:56:58 +03:00
|
|
|
MAKE := gmake
|
1999-02-17 20:36:29 +03:00
|
|
|
endif
|
1999-02-20 01:55:50 +03:00
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
CONFIG_GUESS := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
|
1999-04-15 23:35:41 +04:00
|
|
|
ifdef CONFIG_GUESS
|
2000-03-14 08:54:46 +03:00
|
|
|
CONFIG_GUESS := $(shell $(CONFIG_GUESS))
|
1999-04-15 23:35:41 +04:00
|
|
|
else
|
1999-04-14 06:34:49 +04:00
|
|
|
_IS_FIRST_CHECKOUT := 1
|
1998-11-13 22:42:43 +03:00
|
|
|
endif
|
|
|
|
|
1999-03-26 03:03:10 +03:00
|
|
|
####################################
|
|
|
|
# CVS
|
1998-11-13 22:42:43 +03:00
|
|
|
|
1999-04-27 01:47:47 +04:00
|
|
|
# Add the CVS root to CVS_FLAGS if needed
|
2000-03-17 03:56:58 +03:00
|
|
|
CVS_ROOT_IN_TREE := $(shell cat $(TOPSRCDIR)/CVS/Root 2>/dev/null)
|
1999-04-14 06:41:50 +04:00
|
|
|
ifneq ($(CVS_ROOT_IN_TREE),)
|
|
|
|
ifneq ($(CVS_ROOT_IN_TREE),$(CVSROOT))
|
1999-04-27 21:10:48 +04:00
|
|
|
CVS_FLAGS := -d $(CVS_ROOT_IN_TREE)
|
1999-02-19 22:49:15 +03:00
|
|
|
endif
|
1998-11-13 22:42:43 +03:00
|
|
|
endif
|
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
CVSCO = cvs $(CVS_FLAGS) co $(CVS_CO_FLAGS)
|
1999-04-14 06:34:49 +04:00
|
|
|
CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log
|
1999-03-26 03:03:10 +03:00
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
ifdef MOZ_CO_TAG
|
|
|
|
CVS_CO_FLAGS := -r $(MOZ_CO_TAG)
|
|
|
|
endif
|
|
|
|
|
1999-03-26 03:03:10 +03:00
|
|
|
####################################
|
1999-04-14 06:34:49 +04:00
|
|
|
# Load mozconfig Options
|
1999-02-17 20:36:29 +03:00
|
|
|
|
1999-04-14 06:34:49 +04:00
|
|
|
# See build pages, http://www.mozilla.org/build/unix.html,
|
|
|
|
# for how to set up mozconfig.
|
2000-03-14 05:59:43 +03:00
|
|
|
MOZCONFIG_LOADER := mozilla/build/autoconf/mozconfig2client-mk
|
|
|
|
MOZCONFIG_FINDER := mozilla/build/autoconf/mozconfig-find
|
1999-04-14 06:34:49 +04:00
|
|
|
run_for_side_effects := \
|
|
|
|
$(shell cd $(ROOTDIR); \
|
2000-03-14 05:59:43 +03:00
|
|
|
if test "$(_IS_FIRST_CHECKOUT)"; then \
|
|
|
|
$(CVSCO) $(MOZCONFIG_FINDER) $(MOZCONFIG_LOADER); \
|
|
|
|
else true; \
|
|
|
|
fi; \
|
|
|
|
$(MOZCONFIG_LOADER) $(TOPSRCDIR) mozilla/.client-defs.mk)
|
1999-04-14 06:34:49 +04:00
|
|
|
include $(TOPSRCDIR)/.client-defs.mk
|
1999-02-17 20:36:29 +03:00
|
|
|
|
1999-04-14 06:34:49 +04:00
|
|
|
####################################
|
|
|
|
# Options that may come from mozconfig
|
1999-02-17 20:36:29 +03:00
|
|
|
|
2000-02-16 03:37:41 +03:00
|
|
|
# Change CVS flags if anonymous root is requested
|
|
|
|
ifdef MOZ_CO_USE_MIRROR
|
|
|
|
CVS_FLAGS := -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
|
|
endif
|
|
|
|
|
1999-04-27 01:47:47 +04:00
|
|
|
# MOZ_CVS_FLAGS - Basic CVS flags
|
|
|
|
ifeq "$(origin MOZ_CVS_FLAGS)" "undefined"
|
|
|
|
CVS_FLAGS := $(CVS_FLAGS) -q -z 3
|
|
|
|
else
|
|
|
|
CVS_FLAGS := $(MOZ_CVS_FLAGS)
|
|
|
|
endif
|
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
# This option is depricated. The best way to have client.mk pull a tag
|
|
|
|
# is to set MOZ_CO_TAG (see above) and commit that change on the tag.
|
|
|
|
ifdef MOZ_CO_BRANCH
|
|
|
|
CVS_CO_FLAGS := -r $(MOZ_CO_BRANCH)
|
|
|
|
endif
|
|
|
|
|
1999-04-27 01:47:47 +04:00
|
|
|
# MOZ_CO_FLAGS - Anything that we should use on all checkouts
|
|
|
|
ifeq "$(origin MOZ_CO_FLAGS)" "undefined"
|
2000-03-17 03:56:58 +03:00
|
|
|
CVS_CO_FLAGS := $(CVS_CO_FLAGS) -P
|
1999-04-27 01:47:47 +04:00
|
|
|
else
|
2000-03-17 03:56:58 +03:00
|
|
|
CVS_CO_FLAGS := $(CVS_CO_FLAGS) $(MOZ_CO_FLAGS)
|
1998-11-13 22:42:43 +03:00
|
|
|
endif
|
1998-11-06 11:39:52 +03:00
|
|
|
|
1999-04-21 05:25:26 +04:00
|
|
|
ifdef MOZ_CO_DATE
|
1999-11-30 05:00:13 +03:00
|
|
|
CVS_CO_FLAGS := $(CVS_CO_FLAGS) -D "$(MOZ_CO_DATE)"
|
1999-04-21 05:25:26 +04:00
|
|
|
endif
|
|
|
|
|
1999-04-14 06:34:49 +04:00
|
|
|
ifndef MOZ_CO_MODULE
|
1999-10-08 01:24:17 +04:00
|
|
|
MOZ_CO_MODULE := SeaMonkeyAll
|
1998-11-10 00:46:15 +03:00
|
|
|
endif
|
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
ifeq "$(origin MOZ_MAKE_FLAGS)" "undefined"
|
|
|
|
MOZ_MAKE_ENV :=
|
|
|
|
else
|
|
|
|
MOZ_MAKE_ENV := MAKE="$(MAKE) $(MOZ_MAKE_FLAGS)"
|
|
|
|
endif
|
|
|
|
|
1999-04-14 06:34:49 +04:00
|
|
|
ifdef MOZ_OBJDIR
|
|
|
|
OBJDIR := $(MOZ_OBJDIR)
|
2000-03-17 03:56:58 +03:00
|
|
|
MOZ_MAKE := $(MOZ_MAKE_ENV) $(MAKE) -C $(OBJDIR)
|
1999-04-14 06:34:49 +04:00
|
|
|
else
|
|
|
|
OBJDIR := $(TOPSRCDIR)
|
2000-03-17 03:56:58 +03:00
|
|
|
MOZ_MAKE := $(MOZ_MAKE_ENV) $(MAKE)
|
1999-02-17 20:36:29 +03:00
|
|
|
endif
|
1998-12-19 03:10:52 +03:00
|
|
|
|
1998-11-13 22:42:43 +03:00
|
|
|
|
2000-03-11 07:33:39 +03:00
|
|
|
#######################################################################
|
|
|
|
# PSM client libs
|
|
|
|
#
|
|
|
|
|
|
|
|
PSM_CO_MODULE= mozilla/security
|
|
|
|
PSM_CO_FLAGS := -P
|
2000-03-17 03:56:58 +03:00
|
|
|
CVSCO_PSM = cvs $(CVS_FLAGS) co $(PSM_CO_FLAGS) $(PSM_CO_MODULE)
|
2000-03-11 07:33:39 +03:00
|
|
|
ifdef PSM_CO_TAG
|
|
|
|
PSM_CO_FLAGS := $(PSM_CO_FLAGS) -r $(PSM_CO_TAG)
|
|
|
|
endif
|
|
|
|
|
2000-02-06 00:37:55 +03:00
|
|
|
#######################################################################
|
|
|
|
# NSPR
|
|
|
|
#
|
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
NSPR_CO_MODULE = mozilla/nsprpub
|
2000-02-06 00:37:55 +03:00
|
|
|
NSPR_CO_FLAGS := -P
|
2000-03-17 03:56:58 +03:00
|
|
|
CVSCO_NSPR = cvs $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(NSPR_CO_MODULE)
|
2000-02-06 00:37:55 +03:00
|
|
|
ifdef NSPR_CO_TAG
|
|
|
|
NSPR_CO_FLAGS := $(NSPR_CO_FLAGS) -r $(NSPR_CO_TAG)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
1999-03-26 03:03:10 +03:00
|
|
|
#######################################################################
|
1999-02-17 20:36:29 +03:00
|
|
|
# Rules
|
1998-11-13 22:42:43 +03:00
|
|
|
#
|
|
|
|
|
1999-04-14 06:34:49 +04:00
|
|
|
ifdef _IS_FIRST_CHECKOUT
|
1999-02-17 20:36:29 +03:00
|
|
|
all: checkout build
|
1999-03-26 03:03:10 +03:00
|
|
|
else
|
|
|
|
all: checkout depend build
|
|
|
|
endif
|
1998-11-06 11:39:52 +03:00
|
|
|
|
1999-02-17 20:59:06 +03:00
|
|
|
# Windows equivalents
|
2000-03-17 03:56:58 +03:00
|
|
|
pull_all: checkout
|
|
|
|
build_all: build
|
|
|
|
clobber clobber_all: clean
|
2000-02-16 03:37:41 +03:00
|
|
|
pull_and_build_all: checkout depend build
|
1998-11-06 11:39:52 +03:00
|
|
|
|
1999-05-01 06:10:34 +04:00
|
|
|
# Do everything from scratch
|
2000-03-14 05:59:43 +03:00
|
|
|
everything: checkout clean build
|
1999-05-01 06:10:34 +04:00
|
|
|
|
1999-03-26 03:03:10 +03:00
|
|
|
####################################
|
1998-11-13 22:42:43 +03:00
|
|
|
# CVS checkout
|
1999-11-30 05:00:13 +03:00
|
|
|
#
|
1998-11-06 11:39:52 +03:00
|
|
|
checkout:
|
2000-02-26 06:25:57 +03:00
|
|
|
@: Backup the last checkout log.
|
|
|
|
@if test -f $(CVSCO_LOGFILE) ; then \
|
|
|
|
mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
|
|
|
|
else true; \
|
|
|
|
fi
|
2000-02-23 01:25:56 +03:00
|
|
|
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
|
|
|
|
@echo $(CVSCO) mozilla/client.mk; \
|
|
|
|
cd $(ROOTDIR); \
|
|
|
|
$(CVSCO) mozilla/client.mk && \
|
2000-02-23 02:03:00 +03:00
|
|
|
$(MAKE) -f mozilla/client.mk real_checkout
|
2000-02-23 01:25:56 +03:00
|
|
|
|
|
|
|
real_checkout:
|
1999-11-30 05:00:13 +03:00
|
|
|
@: Start the checkout. Pipe the output to the tty and a log file. \
|
|
|
|
: If it fails, touch an error file because the pipe hides the \
|
2000-02-23 01:25:56 +03:00
|
|
|
: error. If the file is created, remove it and return an error.
|
|
|
|
@rm -f cvs-failed.tmp*; \
|
|
|
|
: Checkout NSPR; \
|
2000-03-17 03:56:58 +03:00
|
|
|
echo $(CVSCO_NSPR); \
|
|
|
|
($(CVSCO_NSPR) || touch cvs-failed.tmp) 2>&1 \
|
1999-11-30 05:00:13 +03:00
|
|
|
| tee -a $(CVSCO_LOGFILE); \
|
2000-02-23 01:25:56 +03:00
|
|
|
if test -f cvs-failed.tmp; then exit 1; else true; fi; \
|
2000-03-11 07:33:39 +03:00
|
|
|
: Checkout PSM client libs; \
|
2000-03-17 03:56:58 +03:00
|
|
|
echo $(CVSCO_PSM); \
|
|
|
|
($(CVSCO_PSM) || touch cvs-failed.tmp) 2>&1 \
|
2000-03-11 07:33:39 +03:00
|
|
|
| tee -a $(CVSCO_LOGFILE); \
|
|
|
|
if test -f cvs-failed.tmp; then exit 1; else true; fi; \
|
2000-03-17 03:56:58 +03:00
|
|
|
: Checkout SeaMonkeyAll; \
|
2000-02-23 01:25:56 +03:00
|
|
|
echo $(CVSCO) $(MOZ_CO_MODULE); \
|
|
|
|
($(CVSCO) $(MOZ_CO_MODULE) || touch cvs-failed.tmp) 2>&1 \
|
|
|
|
| tee -a $(CVSCO_LOGFILE)
|
|
|
|
@echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE)
|
|
|
|
@: Check the log for conflicts. ;\
|
1999-11-30 05:00:13 +03:00
|
|
|
conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
|
|
|
|
if test "$$conflicts" ; then \
|
|
|
|
echo "$(MAKE): *** Conflicts during checkout." ;\
|
|
|
|
echo "$$conflicts" ;\
|
|
|
|
echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
|
2000-03-01 00:00:21 +03:00
|
|
|
exit 1; \
|
1999-11-30 05:00:13 +03:00
|
|
|
else true; \
|
2000-02-26 06:25:57 +03:00
|
|
|
fi; \
|
|
|
|
if test -f cvs-failed.tmp ; then \
|
2000-02-23 01:25:56 +03:00
|
|
|
rm cvs-failed.tmp; \
|
|
|
|
false; \
|
|
|
|
else true; \
|
|
|
|
fi
|
1999-02-17 20:36:29 +03:00
|
|
|
|
1999-03-26 03:03:10 +03:00
|
|
|
####################################
|
1999-02-20 01:55:50 +03:00
|
|
|
# Web configure
|
1999-03-26 03:03:10 +03:00
|
|
|
|
2000-02-05 10:23:36 +03:00
|
|
|
WEBCONFIG_URL := http://webtools.mozilla.org/build/config.cgi
|
1999-04-14 06:34:49 +04:00
|
|
|
WEBCONFIG_FILE := $(HOME)/.mozconfig
|
|
|
|
|
2000-03-14 05:59:43 +03:00
|
|
|
MOZCONFIG2URL := build/autoconf/mozconfig2url
|
1999-02-20 01:55:50 +03:00
|
|
|
webconfig:
|
1999-03-26 03:03:10 +03:00
|
|
|
cd $(TOPSRCDIR); \
|
2000-03-14 05:59:43 +03:00
|
|
|
url=$(WEBCONFIG_URL)`$(MOZCONFIG2URL) $(TOPSRCDIR)`; \
|
1999-03-11 00:03:33 +03:00
|
|
|
echo Running netscape with the following url: ;\
|
|
|
|
echo ;\
|
|
|
|
echo $$url ;\
|
|
|
|
netscape -remote "openURL($$url)" || netscape $$url ;\
|
|
|
|
echo ;\
|
1999-03-26 03:03:10 +03:00
|
|
|
echo 1. Fill out the form on the browser. ;\
|
|
|
|
echo 2. Save the results to $(WEBCONFIG_FILE).
|
1999-02-20 01:55:50 +03:00
|
|
|
|
|
|
|
# netscape -remote "saveAs($(WEBCONFIG_FILE))"
|
1999-02-17 20:36:29 +03:00
|
|
|
|
1999-03-26 03:03:10 +03:00
|
|
|
#####################################################
|
|
|
|
# First Checkout
|
|
|
|
|
1999-04-14 06:34:49 +04:00
|
|
|
ifdef _IS_FIRST_CHECKOUT
|
1999-02-19 22:49:15 +03:00
|
|
|
# First time, do build target in a new process to pick up new files.
|
1999-02-17 20:36:29 +03:00
|
|
|
build:
|
1999-02-19 22:49:15 +03:00
|
|
|
$(MAKE) -f $(TOPSRCDIR)/client.mk build
|
1999-02-17 20:36:29 +03:00
|
|
|
else
|
1998-11-06 11:39:52 +03:00
|
|
|
|
1999-03-26 03:03:10 +03:00
|
|
|
#####################################################
|
|
|
|
# After First Checkout
|
|
|
|
|
|
|
|
|
|
|
|
####################################
|
1999-02-17 20:36:29 +03:00
|
|
|
# Configure
|
|
|
|
|
|
|
|
CONFIG_STATUS := $(wildcard $(OBJDIR)/config.status)
|
|
|
|
CONFIG_CACHE := $(wildcard $(OBJDIR)/config.cache)
|
|
|
|
|
|
|
|
ifdef RUN_AUTOCONF_LOCALLY
|
1999-02-19 22:49:15 +03:00
|
|
|
EXTRA_CONFIG_DEPS := \
|
1999-02-17 20:36:29 +03:00
|
|
|
$(TOPSRCDIR)/aclocal.m4 \
|
|
|
|
$(TOPSRCDIR)/build/autoconf/gtk.m4 \
|
|
|
|
$(TOPSRCDIR)/build/autoconf/altoptions.m4 \
|
|
|
|
$(NULL)
|
|
|
|
|
1999-02-19 22:49:15 +03:00
|
|
|
$(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
|
1998-11-13 22:42:43 +03:00
|
|
|
@echo Generating $@ using autoconf
|
1999-02-17 20:36:29 +03:00
|
|
|
cd $(TOPSRCDIR); $(AUTOCONF)
|
|
|
|
endif
|
1998-11-13 22:42:43 +03:00
|
|
|
|
1999-04-28 00:57:13 +04:00
|
|
|
CONFIG_STATUS_DEPS := \
|
|
|
|
$(TOPSRCDIR)/configure \
|
|
|
|
$(TOPSRCDIR)/allmakefiles.sh \
|
|
|
|
$(TOPSRCDIR)/.client-defs.mk \
|
|
|
|
$(wildcard $(TOPSRCDIR)/mailnews/makefiles) \
|
|
|
|
$(NULL)
|
|
|
|
|
2000-03-14 05:59:43 +03:00
|
|
|
# configure uses the program name to determine @srcdir@. Calling it without
|
|
|
|
# $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
|
|
|
|
# path of $(TOPSRCDIR).
|
|
|
|
ifeq ($(TOPSRCDIR),$(OBJDIR))
|
2000-03-14 07:31:49 +03:00
|
|
|
CONFIGURE := ./configure
|
2000-03-14 05:59:43 +03:00
|
|
|
else
|
|
|
|
CONFIGURE := $(TOPSRCDIR)/configure
|
|
|
|
endif
|
|
|
|
|
1999-04-28 00:57:13 +04:00
|
|
|
$(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
|
1999-03-12 05:55:24 +03:00
|
|
|
@if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
|
2000-03-14 05:59:43 +03:00
|
|
|
@echo cd $(OBJDIR);
|
|
|
|
@echo $(CONFIGURE)
|
|
|
|
@cd $(OBJDIR) && $(CONFIGURE) \
|
1999-04-17 03:47:04 +04:00
|
|
|
|| ( echo "*** Fix above errors and then restart with\
|
|
|
|
\"$(MAKE) -f client.mk build\"" && exit 1 )
|
1999-08-20 19:02:00 +04:00
|
|
|
@touch $(OBJDIR)/Makefile
|
1999-02-17 20:36:29 +03:00
|
|
|
|
|
|
|
ifdef CONFIG_STATUS
|
|
|
|
$(OBJDIR)/config/autoconf.mk: $(TOPSRCDIR)/config/autoconf.mk.in
|
|
|
|
cd $(OBJDIR); \
|
|
|
|
CONFIG_FILES=config/autoconf.mk ./config.status
|
|
|
|
endif
|
1998-11-13 22:42:43 +03:00
|
|
|
|
1998-11-10 04:56:13 +03:00
|
|
|
|
1999-03-26 03:03:10 +03:00
|
|
|
####################################
|
|
|
|
# Depend
|
|
|
|
|
1999-04-21 06:02:03 +04:00
|
|
|
depend: $(OBJDIR)/Makefile $(OBJDIR)/config.status
|
2000-03-17 03:56:58 +03:00
|
|
|
$(MOZ_MAKE) $@;
|
1999-03-26 03:03:10 +03:00
|
|
|
|
|
|
|
####################################
|
|
|
|
# Build it
|
|
|
|
|
1999-04-21 06:02:03 +04:00
|
|
|
build: $(OBJDIR)/Makefile $(OBJDIR)/config.status
|
2000-03-17 03:56:58 +03:00
|
|
|
$(MOZ_MAKE) export && $(MOZ_MAKE) install
|
1999-03-26 03:03:10 +03:00
|
|
|
|
|
|
|
####################################
|
|
|
|
# Other targets
|
|
|
|
|
1999-02-17 20:59:06 +03:00
|
|
|
# Pass these target onto the real build system
|
2000-03-17 03:56:58 +03:00
|
|
|
install export clean realclean distclean:
|
|
|
|
$(MOZ_MAKE) $@
|
1999-02-17 20:59:06 +03:00
|
|
|
|
1999-04-24 00:46:22 +04:00
|
|
|
cleansrcdir:
|
|
|
|
@cd $(TOPSRCDIR); \
|
|
|
|
if [ -f Makefile ]; then \
|
|
|
|
$(MAKE) realclean && _skip_find=1; \
|
|
|
|
fi; \
|
1999-09-22 04:40:11 +04:00
|
|
|
if [ -f webshell/embed/gtk/Makefile ]; then \
|
|
|
|
$(MAKE) -C webshell/embed/gtk distclean; \
|
1999-09-22 10:32:45 +04:00
|
|
|
fi; \
|
1999-04-24 00:46:22 +04:00
|
|
|
if [ ! "$$_skip_find" ]; then \
|
|
|
|
echo "Removing object files from srcdir..."; \
|
|
|
|
rm -fr `find . -type d \( -name .deps -print -o -name CVS \
|
|
|
|
-o -exec test ! -d {}/CVS \; \) -prune \
|
|
|
|
-o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \
|
|
|
|
fi; \
|
|
|
|
echo "Removing files generated by configure..."; \
|
|
|
|
build/autoconf/clean-config.sh;
|
|
|
|
|
|
|
|
|
1999-02-17 20:36:29 +03:00
|
|
|
# (! IS_FIRST_CHECKOUT)
|
|
|
|
endif
|
1999-04-14 06:34:49 +04:00
|
|
|
|
2000-03-17 03:56:58 +03:00
|
|
|
.PHONY: checkout real_checkout depend build export install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything
|