[Pkg-mozext-commits] [itsalltext] 197/459: New build system
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit d151edb180e9d8b81714fcc64122fe13419a4f1d
Author: Christian Höltje <docwhat at gerf.org>
Date: Thu Apr 5 21:38:19 2007 -0400
New build system
---
.hgignore | 7 +-
Makefile | 131 ++++++++++++++-------
chrome.manifest => src/chrome.manifest | 0
{chrome => src/chrome}/content/API.js | 0
{chrome => src/chrome}/content/Color.js | 0
{chrome => src/chrome}/content/about.xul | 0
{chrome => src/chrome}/content/badeditor.js | 0
{chrome => src/chrome}/content/badeditor.xul | 0
{chrome => src/chrome}/content/cacheobj.js | 0
{chrome => src/chrome}/content/icon.png | Bin
{chrome => src/chrome}/content/itsalltext.js | 0
{chrome => src/chrome}/content/itsalltext.xul | 0
{chrome => src/chrome}/content/newextension.js | 0
{chrome => src/chrome}/content/newextension.xul | 0
{chrome => src/chrome}/content/preferences.js | 0
{chrome => src/chrome}/content/preferences.xul | 0
{chrome => src/chrome}/locale/en-US/about.dtd | 0
{chrome => src/chrome}/locale/en-US/badeditor.dtd | 0
.../chrome}/locale/en-US/badeditor.properties | 0
{chrome => src/chrome}/locale/en-US/gumdrop.png | Bin
{chrome => src/chrome}/locale/en-US/itsalltext.dtd | 0
.../chrome}/locale/en-US/itsalltext.properties | 0
.../chrome}/locale/en-US/newextension.dtd | 0
.../chrome}/locale/en-US/preferences.dtd | 0
.../chrome}/locale/en-US/preferences.properties | 0
changelog.txt => src/chrome/readme.xhtml | 41 +++++--
.../defaults}/preferences/itsalltext.js | 0
gpl.txt => src/gpl.txt | 0
install.rdf => src/install.rdf | 2 +-
29 files changed, 126 insertions(+), 55 deletions(-)
diff --git a/.hgignore b/.hgignore
index 1e4e5e1..498a667 100644
--- a/.hgignore
+++ b/.hgignore
@@ -1,4 +1,5 @@
syntax:regexp
-^docs/
-\.log$
-\.lint$
+^(docs|lint|build)/
+^\.[^/]+/
+^[^/]+\.xpi/
+
diff --git a/Makefile b/Makefile
index e00095c..6eb571b 100644
--- a/Makefile
+++ b/Makefile
@@ -17,88 +17,135 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
+## Options
+# If you don't have jslint or jsmin, you can replace these with cat...
+# but I strongly suggest you get jslint and jsmin working.
+JSLINT := jslint
+#JSMIN := jsmin
+JSMIN := cat
+PROJNICK := itsalltext
+PROJNAME := "It's All Text!"
+ICONFILE := src/chrome/content/icon.png
+VERSION := 0.6.5
+
# NOTE: do not create files or directories in here that have
# spaces or other special characters in their names!
-SOURCES:=$(shell find . \
- -not -regex '^\(\|.*/\)\(tmpdir\|CVS\|\.hg\|\.DS_Store\|docs\).*\(\|/.*\)$$' \
+SOURCES:=$(shell find src/ -type f\
+ -not -regex '^\(\|.*/\)\(build\|lint\|tmpdir\|.svn\|CVS\|.DS_Store\).*\(\|/.*\)$$' \
-not -name 'Makefile' \
- -not -name '*\.\(log\|orig\|lint\|xpi\)' \
+ -not -name '*-report.txt' \
+ -not -name '*.xpi' \
+ -not -name '*.log' \
+ -not -name '*.lint' \
+ -not -name '*.xcf' \
-not -name '.*' \
-not -name '*~' \
+ -not -name '\#*' \
-print)
-VERSION:=$(shell grep 'em:version=' install.rdf| perl -p -e 's!.*em:version\s*=\s*"([^"]*)".*!$$1!;')
SOURCES_JS:=$(shell echo "$(SOURCES)" | xargs -n 1 echo | grep -E '\.js$$')
-SOURCES_JS_LINT:=$(patsubst %.js, %.js.lint, $(SOURCES_JS))
+SOURCES_JS_LINT:=$(patsubst %.js, lint/%.js.lint, $(SOURCES_JS))
+OUTPUT:=$(patsubst src/%, build/%, $(SOURCES))
-XPI_FILE=../itsalltext-$(VERSION).xpi
+XPI_FILE:=$(PROJNICK)-$(VERSION).xpi
ifeq ($(VERBOSE),1)
- Q =
+ Q :=
+ QMAKE = $(MAKE)
else
- Q = @
+ Q := @
+ QMAKE = $(MAKE) -s
endif
-all: lint version_check narf
- $(Q)echo "Source checks out"
+all: lint
+ $(Q)echo done
+## Release a new xpi
.PHONY: release
-release: lint version_check $(XPI_FILE)
- $(Q)echo "Don't forget to:"
- $(Q)echo " * update changelog.txt"
- $(Q)echo " * commit the tag"
+release: version_check $(XPI_FILE)
+ $(Q)echo "Don't forget to (see the README.txt):"
$(Q)echo " * bump the version number"
+ $(Q)echo " * commit the tag"
+## Show the version
.PHONY: version_check
version_check:
$(Q)echo "Version is $(VERSION)"
-%.xpi: $(SOURCES)
+## build an xpi
+%.xpi: build
$(Q)echo Creating $@ ...
- $(Q)echo "$^" | perl -p -e 's/ /\n/g;' \
- | zip $@ -@
+ $(Q)(cd build && find -type f | zip ../$@ -@)
-.PHONY: docs
-docs: docs/.stamp
-docs/.stamp: $(SOURCES_JS)
- $(Q)echo Creating docs ...
- $(Q)jsdoc --directory docs \
- --project-name "It's All Text - A Firefox Extension" \
- --logo chrome/content/icon.png \
- --package-naming \
- --private \
- $^
- $(Q)touch "$@"
+##
+## Build proccess. Puts the files we want in the extension into build/
+.PHONY: build
+build: narf lint .build-stamp
-.PHONY: showlint
-showlint:
- $(Q)$(MAKE) lint || :
- $(Q)find -name '*.lint' -print0 | xargs -0 cat
+.build-stamp: Makefile $(OUTPUT)
+ $(Q)touch $@
+
+$(filter-out %.rdf %.dtd %.xhtml %.js, $(OUTPUT)): build/%: src/%
+ $(Q)mkdir -p $(dir $@)
+ $(Q)cp $< $@
+
+$(filter %.rdf %.dtd %.xhtml, $(OUTPUT)): build/%: src/%
+ $(Q)mkdir -p $(dir $@)
+ $(Q)cat $< | sed 's/@@VERSION@@/$(VERSION)/g' > $@
+$(filter %.js, $(OUTPUT)): build/%.js: src/%.js
+ $(Q)mkdir -p $(dir $@)
+ $(Q)cat $< | sed 's/@@VERSION@@/$(VERSION)/g' | $(JSMIN) > $@
+
+
+##
+## Lint checks for possible problems.
.PHONY: lint
lint: $(SOURCES_JS_LINT)
-%.js.lint: %.js
- $(Q)jslint -p $< > $@
+$(SOURCES_JS_LINT): lint/%.js.lint: %.js
+ $(Q)mkdir -p $(dir $@)
+ $(Q)$(JSLINT) -p $< > $@
$(Q)if [ `wc -l $@|cut -d' ' -f1` -ne 1 ]; then\
touch --date='1972-01-01' "$@"; echo "lint: $@"; false; fi
-.PHONY: todo
-todo:
- $(Q)echo "ToDo List:"
- $(Q)grep -h '@todo' Makefile $(SOURCES) | grep -v 'grep -h' | perl -p -e 's!^.+\@todo:?\s*! * !i;' | sort
+.PHONY: showlint
+showlint:
+ $(Q)$(QMAKE) lint || find ./lint -type f -print0 | xargs -0 cat | egrep -v '^jslint: No problems found in' || :
+##
+## Narf is a magick keyword that should stop builds from working
+## Useful as a todo marker.
.PHONY: narf
-narf:
+narf: .narf-stamp
+
+.narf-stamp:
$(Q)grep -nri 'narf' [a-z0-9]* ; test $$? = 1
+ $(Q)touch $@
+
+##
+## Documentation
+.PHONY: docs
+docs: docs/.stamp
+docs/.stamp: $(SOURCES_JS)
+ $(Q)echo Creating docs ...
+ $(Q)jsdoc --directory docs \
+ --project-name "$(PROJNAME) - A Firefox Extension" \
+ --logo $(ICONFILE) \
+ --package-naming \
+ --private \
+ $^
+ $(Q)touch "$@"
+
+##
+## Cleanup methods
.PHONY: clean
clean:
- $(Q)find \( -name '*.orig' -o -name '*.lint' \) -print0 | xargs -0 --no-run-if-empty rm
- $(Q)rm -rf $(XPI_FILE) *.log
+ $(Q)rm -rf lint build docs
.PHONY: realclean
realclean: clean
- $(Q)rm -rf ../itsalltext*.xpi docs
+ $(Q)rm -f $(XPI_FILE)
## @todo [5] [make] Do a proper build in another directory.
## @todo [5] [make] Minimize JavaScript.
diff --git a/chrome.manifest b/src/chrome.manifest
similarity index 100%
rename from chrome.manifest
rename to src/chrome.manifest
diff --git a/chrome/content/API.js b/src/chrome/content/API.js
similarity index 100%
rename from chrome/content/API.js
rename to src/chrome/content/API.js
diff --git a/chrome/content/Color.js b/src/chrome/content/Color.js
similarity index 100%
rename from chrome/content/Color.js
rename to src/chrome/content/Color.js
diff --git a/chrome/content/about.xul b/src/chrome/content/about.xul
similarity index 100%
rename from chrome/content/about.xul
rename to src/chrome/content/about.xul
diff --git a/chrome/content/badeditor.js b/src/chrome/content/badeditor.js
similarity index 100%
rename from chrome/content/badeditor.js
rename to src/chrome/content/badeditor.js
diff --git a/chrome/content/badeditor.xul b/src/chrome/content/badeditor.xul
similarity index 100%
rename from chrome/content/badeditor.xul
rename to src/chrome/content/badeditor.xul
diff --git a/chrome/content/cacheobj.js b/src/chrome/content/cacheobj.js
similarity index 100%
rename from chrome/content/cacheobj.js
rename to src/chrome/content/cacheobj.js
diff --git a/chrome/content/icon.png b/src/chrome/content/icon.png
similarity index 100%
rename from chrome/content/icon.png
rename to src/chrome/content/icon.png
diff --git a/chrome/content/itsalltext.js b/src/chrome/content/itsalltext.js
similarity index 100%
rename from chrome/content/itsalltext.js
rename to src/chrome/content/itsalltext.js
diff --git a/chrome/content/itsalltext.xul b/src/chrome/content/itsalltext.xul
similarity index 100%
rename from chrome/content/itsalltext.xul
rename to src/chrome/content/itsalltext.xul
diff --git a/chrome/content/newextension.js b/src/chrome/content/newextension.js
similarity index 100%
rename from chrome/content/newextension.js
rename to src/chrome/content/newextension.js
diff --git a/chrome/content/newextension.xul b/src/chrome/content/newextension.xul
similarity index 100%
rename from chrome/content/newextension.xul
rename to src/chrome/content/newextension.xul
diff --git a/chrome/content/preferences.js b/src/chrome/content/preferences.js
similarity index 100%
rename from chrome/content/preferences.js
rename to src/chrome/content/preferences.js
diff --git a/chrome/content/preferences.xul b/src/chrome/content/preferences.xul
similarity index 100%
rename from chrome/content/preferences.xul
rename to src/chrome/content/preferences.xul
diff --git a/chrome/locale/en-US/about.dtd b/src/chrome/locale/en-US/about.dtd
similarity index 100%
rename from chrome/locale/en-US/about.dtd
rename to src/chrome/locale/en-US/about.dtd
diff --git a/chrome/locale/en-US/badeditor.dtd b/src/chrome/locale/en-US/badeditor.dtd
similarity index 100%
rename from chrome/locale/en-US/badeditor.dtd
rename to src/chrome/locale/en-US/badeditor.dtd
diff --git a/chrome/locale/en-US/badeditor.properties b/src/chrome/locale/en-US/badeditor.properties
similarity index 100%
rename from chrome/locale/en-US/badeditor.properties
rename to src/chrome/locale/en-US/badeditor.properties
diff --git a/chrome/locale/en-US/gumdrop.png b/src/chrome/locale/en-US/gumdrop.png
similarity index 100%
rename from chrome/locale/en-US/gumdrop.png
rename to src/chrome/locale/en-US/gumdrop.png
diff --git a/chrome/locale/en-US/itsalltext.dtd b/src/chrome/locale/en-US/itsalltext.dtd
similarity index 100%
rename from chrome/locale/en-US/itsalltext.dtd
rename to src/chrome/locale/en-US/itsalltext.dtd
diff --git a/chrome/locale/en-US/itsalltext.properties b/src/chrome/locale/en-US/itsalltext.properties
similarity index 100%
rename from chrome/locale/en-US/itsalltext.properties
rename to src/chrome/locale/en-US/itsalltext.properties
diff --git a/chrome/locale/en-US/newextension.dtd b/src/chrome/locale/en-US/newextension.dtd
similarity index 100%
rename from chrome/locale/en-US/newextension.dtd
rename to src/chrome/locale/en-US/newextension.dtd
diff --git a/chrome/locale/en-US/preferences.dtd b/src/chrome/locale/en-US/preferences.dtd
similarity index 100%
rename from chrome/locale/en-US/preferences.dtd
rename to src/chrome/locale/en-US/preferences.dtd
diff --git a/chrome/locale/en-US/preferences.properties b/src/chrome/locale/en-US/preferences.properties
similarity index 100%
rename from chrome/locale/en-US/preferences.properties
rename to src/chrome/locale/en-US/preferences.properties
diff --git a/changelog.txt b/src/chrome/readme.xhtml
similarity index 66%
rename from changelog.txt
rename to src/chrome/readme.xhtml
index 2433da4..ae65d45 100644
--- a/changelog.txt
+++ b/src/chrome/readme.xhtml
@@ -1,15 +1,33 @@
-This version is still beta.
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
+g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+ <head>
+ <title>Welcome to It's All Text! version @@VERSION@@</title>
+ </head>
+ <body>
+ <h1>Welcome to It's All Text! version @@VERSION@@</h1>
+
+ <p> This software is ALMOST version 1.0!</p>
-Upon installation, go to Tools->Addons and select It's All Text and
-set the Preferences. Specifically, you'll have to set the editor's
-full path. A future version will automagically pop up preferences
-when you try to edit without an editor set.
+ <p>
+ This version is still beta.
+ </p>
-Note to Mac OS X users: Most editors come with a component in
-/usr/bin/, use that as your editor. If you want to use something
-strange, then create a shell script to do an "open -a /path/to/editor
-$*".
+ <p>
+ Upon installation, go to Tools->Addons and select It's All Text and
+ set the Preferences. Specifically, you'll have to set the editor's
+ full path. A future version will automagically pop up preferences
+ when you try to edit without an editor set.
+ </p>
+
+ <p>
+ Note to Mac OS X users: Most editors come with a component in
+ /usr/bin/, use that as your editor. If you want to use something
+ strange, then create a shell script to do an "open -a /path/to/editor
+ $*".
+ </p>
+ <pre>
****** 0.6.2 *****
* Default Mac OS X to '/usr/bin/open'
* Fixed problems with detecting editor launch trouble.
@@ -70,3 +88,8 @@ Released to addons.mozilla.org
* Edit button is added to HTML next to text area.
* Cleaned up timing intervals and memory leak in document checks.
* Better hash handling.
+ </pre>
+
+ <p> Ciao! </p>
+ </body>
+</html>
diff --git a/defaults/preferences/itsalltext.js b/src/defaults/preferences/itsalltext.js
similarity index 100%
rename from defaults/preferences/itsalltext.js
rename to src/defaults/preferences/itsalltext.js
diff --git a/gpl.txt b/src/gpl.txt
similarity index 100%
rename from gpl.txt
rename to src/gpl.txt
diff --git a/install.rdf b/src/install.rdf
similarity index 96%
rename from install.rdf
rename to src/install.rdf
index 179080a..be8e187 100644
--- a/install.rdf
+++ b/src/install.rdf
@@ -12,7 +12,7 @@
em:maxVersion="0.8" />
<RDF:Description RDF:about="urn:mozilla:install-manifest"
em:id="itsalltext at docwhat.gerf.org"
- em:version="0.6.4"
+ em:version="@@VERSION@@"
em:type="2"
em:name="It's All Text!"
em:description="Edit text using your favorite editor!"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list