[Pkg-mozext-commits] [requestpolicy] 107/257: [ref] change to `preprocess.py`
David Prévot
taffit at moszumanska.debian.org
Thu Jan 28 03:20:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 6405cc56e6978dc5b059ecaa9039668eddb2bf6d
Author: Martin Kimmerle <dev at 256k.de>
Date: Thu Jul 23 18:06:28 2015 +0200
[ref] 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/
Resolves #693.
---
Makefile | 18 ++++++++++++------
README.md | 5 ++---
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index d837f0f..22e873f 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@ off_amo__extension_id := rpcontinued at non-amo.requestpolicy.org
# 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
@@ -242,6 +243,11 @@ $(dist_path):
signed-xpi: $(signed_xpi_file)
+.PHONY: preprocessor
+preprocessor: $(build_dirname)/preprocess-content-types.txt
+$(build_dirname)/preprocess-content-types.txt:
+ echo 'JavaScript .jsm' > $@
+
# ________________________
# create the "off-AMO" XPI
@@ -366,9 +372,9 @@ $(off_amo__build_path): $(off_amo__all_files) $(off_amo__deleted_files) $(off_am
# enable Secondary Expansion (so that $@ can be used in prerequisites via $$@)
.SECONDEXPANSION:
-$(off_amo__jspp_files): $$(patsubst $$(off_amo__build_path)%,$$(source_path)%,$$@)
+$(off_amo__jspp_files): $$(patsubst $$(off_amo__build_path)%,$$(source_path)%,$$@) preprocessor
@mkdir -p $(@D)
- preprocess $< > $@
+ $(PREPROCESS) $< > $@
$(off_amo__copy_files): $$(patsubst $$(off_amo__build_path)%,$$(source_path)%,$$@)
@mkdir -p $(@D)
@@ -391,9 +397,9 @@ $(off_amo__build_path)/META-INF/: $(off_amo__build_path) $(off_amo__all_files)
$(amo__build_path): $(amo__all_files) $(amo__deleted_files) $(amo__empty_dirs)
-$(amo__jspp_files): $$(patsubst $$(amo__build_path)%,$$(source_path)%,$$@)
+$(amo__jspp_files): $$(patsubst $$(amo__build_path)%,$$(source_path)%,$$@) preprocessor
@mkdir -p $(@D)
- preprocess $< -AMO=true > $@
+ $(PREPROCESS) -D AMO $< > $@
$(amo__copy_files): $$(patsubst $$(amo__build_path)%,$$(source_path)%,$$@)
@mkdir -p $(@D)
@@ -410,9 +416,9 @@ $(amo__copy_files): $$(patsubst $$(amo__build_path)%,$$(source_path)%,$$@)
$(unit_testing__build_path): $(unit_testing__all_files) $(unit_testing__deleted_files) $(unit_testing__empty_dirs)
-$(unit_testing__jspp_files): $$(patsubst $$(unit_testing__build_path)%,$$(source_path)%,$$@)
+$(unit_testing__jspp_files): $$(patsubst $$(unit_testing__build_path)%,$$(source_path)%,$$@) preprocessor
@mkdir -p $(@D)
- preprocess $< -UNIT_TESTING=true > $@
+ $(PREPROCESS) --keep-lines -D UNIT_TESTING $< > $@
$(unit_testing__copy_files): $$(patsubst $$(unit_testing__build_path)%,$$(source_path)%,$$@)
@mkdir -p $(@D)
diff --git a/README.md b/README.md
index e358c40..6922aae 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