[Pkg-mozext-commits] [requestpolicy] 01/01: change to `preprocess.py`

David Prévot taffit at moszumanska.debian.org
Thu Jan 28 03:20:57 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag v1.0.beta9.3__preprocess.py
in repository requestpolicy.

commit 0defcc634247bf8ac18606604465fef65d8548e6
Author: Martin Kimmerle <dev at 256k.de>
Date:   Thu Jul 23 18:06:28 2015 +0200

    change to `preprocess.py`
    
    Change from `preprocessor.js` [1] to `preprocess.py` [2].
    
    [1] https://www.npmjs.com/package/preprocessor
    [2] https://code.google.com/p/preprocess/
---
 Makefile  | 15 +++++++++++----
 README.md |  5 ++---
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 02e59ef..97bcfe5 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ extension_uuid := requestpolicy at requestpolicy.com
 
 # The zip application to be used.
 ZIP := zip
+PREPROCESS := /usr/bin/preprocess --content-types-path build/preprocess-content-types.txt
 
 source_dirname := src
 build_dirname := build
@@ -181,6 +182,12 @@ $(dist_path):
 
 sign: $(signed_xpi_file)
 
+.PHONY: preprocessor
+preprocessor: $(build_dirname)/preprocess-content-types.txt
+$(build_dirname)/preprocess-content-types.txt:
+	@mkdir $(build_dirname)
+	echo 'JavaScript .jsm' > $@
+
 
 # _______________________
 # create the "normal" XPI
@@ -249,9 +256,9 @@ $(build_path): $(all_files) $(deleted_files) $(empty_dirs)
 # enable Secondary Expansion (so that $@ can be used in prerequisites via $$@)
 .SECONDEXPANSION:
 
-$(javascript_files): $$(patsubst $$(build_path)%,$$(source_path)%,$$@)
+$(javascript_files): $$(patsubst $$(build_path)%,$$(source_path)%,$$@) preprocessor
 	@mkdir -p $(dir $@)
-	preprocess $(patsubst $(build_path)%,$(source_path)%,$@) > $@
+	$(PREPROCESS) $(patsubst $(build_path)%,$(source_path)%,$@) > $@
 
 $(other_files): $$(patsubst $$(build_path)%,$$(source_path)%,$$@)
 	@mkdir -p $(dir $@)
@@ -276,9 +283,9 @@ $(build_path)/META-INF/: $(build_path) $(all_files)
 
 $(unit_testing__build_path): $(unit_testing__all_files) $(unit_testing__deleted_files) $(unit_testing__empty_dirs)
 
-$(unit_testing__javascript_files): $$(patsubst $$(unit_testing__build_path)%,$$(source_path)%,$$@)
+$(unit_testing__javascript_files): $$(patsubst $$(unit_testing__build_path)%,$$(source_path)%,$$@) preprocessor
 	@mkdir -p $(dir $@)
-	preprocess $(patsubst $(unit_testing__build_path)%,$(source_path)%,$@) -UNIT_TESTING=true > $@
+	$(PREPROCESS) --keep-lines -D UNIT_TESTING $(patsubst $(unit_testing__build_path)%,$(source_path)%,$@) > $@
 
 $(unit_testing__other_files): $$(patsubst $$(unit_testing__build_path)%,$$(source_path)%,$$@)
 	@mkdir -p $(dir $@)
diff --git a/README.md b/README.md
index 6c68b79..b60a5c8 100644
--- a/README.md
+++ b/README.md
@@ -21,11 +21,10 @@ git clone https://github.com/RequestPolicyContinued/requestpolicy.git
 
 ## Building the XPI Firefox addon
 
-Before building you need to install [GNU Make](https://www.gnu.org/software/make/) as well as the npm package [`preprocessor`](https://www.npmjs.com/package/preprocessor). On a debian-based system you could run:
+Before building you need to install [GNU Make](https://www.gnu.org/software/make/) as well as [`preprocess.py`](https://code.google.com/p/preprocess/). On a debian-based system you could run:
 
 ```bash
-sudo apt-get install make npm
-sudo npm install -g preprocessor
+sudo apt-get install make preprocess
 ```
 
 After preparation, run `make` from the repository's root directory.  The [XPI](https://developer.mozilla.org/en-US/docs/XPI) file will be created at `dist/requestpolicy.xpi` and can be used for easy installation of RP into your web browser (e.g. Firefox).

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list