[Pkg-mozext-commits] [firetray] 344/399: add '-debug' to build dirname when applicable
David Prévot
taffit at alioth.debian.org
Tue Oct 29 18:24:11 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch dfsg-clean
in repository firetray.
commit 4b01f24e94eadde602a7e9a18fb6acf02d0cd495
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Sun Mar 10 20:51:26 2013 +0100
add '-debug' to build dirname when applicable
---
src/Makefile | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index f8e8838..b66cdd9 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -40,9 +40,22 @@ profile_id := mozilla-dev
# ("could not be installed because Firefox cannot modify the needed file")
ZIP := zip # --symlinks
+ifdef DEBUG
+build_debug := -debug
+copy_and_strip_maybe = \
+ at mkdir -p $(dir $(1)); \
+cp -f $(2) $(1);
+else
+copy_and_strip_maybe = \
+ at mkdir -p $(dir $(1)); \
+echo "Stripping debug calls from JS file $<"; \
+sed '/log.debug(/d' $(2) > $(1);
+endif
+
# The target location of the build and build files.
-git_rev = $(shell git rev-parse --short HEAD)
-build_dir := ../build-$(git_rev)
+git_rev = -$(shell git rev-parse --short HEAD)
+build_dir := ../build$(git_rev)$(build_debug)
+
# The location of the extension profile. (this extension is intended for Linux only)
profile_locations := \
@@ -137,26 +150,11 @@ build: $(xpi_built)
clean: clean_build
@echo "Cleanup is done."
-# Regex for 'no'
-YES_RE := yes|y|Y|true|on
-
# called via $(build_includes)
$(build_dir)/%: %
@mkdir -p $(dir $@)
@cp -f $< $@ # -d for symlinks
-copy_and_strip_maybe = \
- @mkdir -p $(dir $(1)); \
- case "$(DEBUG)" in \
- $(YES_RE)) \
- cp -f $(2) $(1); \
- ;; \
- *) \
- echo "Stripping debug calls from JS file $<"; \
- sed '/log.debug(/d' $(2) > $(1); \
- ;; \
- esac
-
# Debug calls are removed for performance.
# NOTE: we could also use m4 for filtering source files...
$(build_dir)/$(chrome_source_root)/%.js: $(chrome_source_root)/%.js
@@ -184,8 +182,8 @@ $(profile_locations):
done
clean_build:
- @echo "Removing build dir: $(build_dir)"
- @rm -rf $(build_dir)
+ @echo "Removing build dirs: $(build_dir)*"
+ @rm -rf $(build_dir)*
# Version fetched from install.rdf
const_file := modules/commons.js
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git
More information about the Pkg-mozext-commits
mailing list