Improvements to libjs makefile: only reconfigure/rebuild when necessary.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4384 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
79949f2eba
commit
a2790a34da
44
libjs.make
44
libjs.make
@ -1,8 +1,14 @@
|
||||
#
|
||||
# This makefile is used to build the Javascript dependency for Oolite
|
||||
#
|
||||
# It can be used to make both a release Javascript library and a
|
||||
# debug library.
|
||||
# This Makefile is used to download and build the Javascript library
|
||||
# for use by Oolite.
|
||||
# Depending on invocation, a debug or release (default) version of the
|
||||
# library will be built.
|
||||
#
|
||||
# To use:
|
||||
# $ make -f libjs.make debug=(yes|no)
|
||||
|
||||
include config.make
|
||||
|
||||
LIBJS_SRC_DIR = deps/Cross-platform-deps/mozilla/js/src
|
||||
@ -13,7 +19,7 @@ ifeq ($(OO_JAVASCRIPT_TRACE),yes)
|
||||
LIBJS_CONFIG_FLAGS += --enable-trace-jscalls
|
||||
endif
|
||||
ifeq ($(debug),yes)
|
||||
LIBJS_BUILD_DIR=$(LIBJS_SRC_DIR)/build-debug
|
||||
LIBJS_BUILD_DIR = $(LIBJS_SRC_DIR)/build-debug
|
||||
LIBJS_CONFIG_FLAGS += --enable-debug
|
||||
LIBJS_CONFIG_FLAGS += --disable-optimize
|
||||
LIBJS_BUILD_FLAGS =
|
||||
@ -22,20 +28,46 @@ else
|
||||
LIBJS_BUILD_FLAGS =
|
||||
endif
|
||||
LIBJS = $(LIBJS_BUILD_DIR)/libjs_static.a
|
||||
LIBJS_BUILD_STAMP = $(LIBJS_BUILD_DIR)/build_stamp
|
||||
LIBJS_CONFIG = $(LIBJS_BUILD_DIR)/config.status
|
||||
LIBJS_CONFIG_STAMP = $(LIBJS_BUILD_DIR)/config_stamp
|
||||
|
||||
$(LIBJS): LIBJS_SRC
|
||||
|
||||
.PHONY: all
|
||||
all: LIBJS_SRC $(LIBJS)
|
||||
|
||||
$(LIBJS): $(LIBJS_BUILD_STAMP)
|
||||
|
||||
$(LIBJS_BUILD_STAMP): $(LIBJS_CONFIG_STAMP)
|
||||
@echo
|
||||
@echo "Building Javascript library..."
|
||||
@echo
|
||||
cd $(LIBJS_BUILD_DIR) && ../configure $(LIBJS_CONFIG_FLAGS)
|
||||
make -C $(LIBJS_BUILD_DIR) $(LIBJS_BUILD_FLAGS)
|
||||
touch $@
|
||||
|
||||
$(LIBJS_CONFIG_STAMP):
|
||||
@echo
|
||||
@echo "Configuring Javascript library..."
|
||||
@echo
|
||||
cd $(LIBJS_BUILD_DIR) && ../configure $(LIBJS_CONFIG_FLAGS)
|
||||
touch $@
|
||||
|
||||
.PHONY: LIBJS_SRC
|
||||
LIBJS_SRC:
|
||||
echo "Updating Javascript sources..."
|
||||
@echo
|
||||
@echo "Updating Javascript sources..."
|
||||
@echo
|
||||
cd deps/Cocoa-deps/scripts && ./update-mozilla.sh
|
||||
mkdir -p $(LIBJS_BUILD_DIR)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-make -C $(LIBJS_BUILD_DIR) clean
|
||||
-rm -f $(LIBJS_BUILD_STAMP)
|
||||
|
||||
# This target also removes the configuration status, forcing
|
||||
# a reconfiguration. Use this after changing LIBJS_CONFIG_FLAGS
|
||||
.PHONY: distclean
|
||||
distclean:
|
||||
-make -C $(LIBJS_BUILD_DIR) distclean
|
||||
-rm -f $(LIBJS_CONFIG_STAMP)
|
||||
|
Loading…
x
Reference in New Issue
Block a user