Commit 7c544105 authored by JC Brand's avatar JC Brand

Update help of Makefile and clean up a bit.

parent 74aa6021
...@@ -13,57 +13,60 @@ HTTPSERVE ?= ./node_modules/.bin/http-server ...@@ -13,57 +13,60 @@ HTTPSERVE ?= ./node_modules/.bin/http-server
# Internal variables. # Internal variables.
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./docs/source ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./docs/source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./docs/source
.PHONY: all help clean html epub changes linkcheck gettext po pot po2json merge release css minjs build
.PHONY: help
help: help:
@echo "Please use \`make <target>' where <target> is one of the following:" @echo "Please use \`make <target>' where <target> is one of the following:"
@echo "" @echo ""
@echo " all A synonym for 'make dev'." @echo " all A synonym for 'make dev'."
@echo " build Create minified builds of converse.js and all its dependencies." @echo " build Create minified builds of converse.js and all its dependencies."
@echo " changes Make an overview of all changed/added/deprecated items added to the documentation." @echo " changes Make an overview of all changed/added/deprecated items added to the documentation."
@echo " clean Remove downloaded Node.js, bower and Ruby files." @echo " clean Remove downloaded the stamp-* guard files as well as all NPM, bower and Ruby packages."
@echo " css Generate CSS from the Sass files." @echo " css Generate CSS from the Sass files."
@echo " cssmin Minify the CSS files." @echo " cssmin Minify the CSS files."
@echo " dev Set up the development environment. To force a fresh start, run 'make clean' first." @echo " dev Set up the development environment. To force a fresh start, run 'make clean' first."
@echo " epub Export the documentation to epub." @echo " epub Export the documentation to epub."
@echo " gettext Make PO message catalogs of the documentation."
@echo " html Make standalone HTML files of the documentation." @echo " html Make standalone HTML files of the documentation."
@echo " linkcheck Check all documentation external links for integrity." @echo " linkcheck Check all documentation external links for integrity."
@echo " po Generate gettext PO files for each i18n language." @echo " po Generate gettext PO files for each i18n language."
@echo " po2json Generate JSON files from the language PO files." @echo " po2json Generate JSON files from the language PO files."
@echo " pot Generate a gettext POT file to be used for translations." @echo " pot Generate a gettext POT file to be used for translations."
@echo " release Make a new minified release." @echo " release Prepare a new release of converse.js. E.g. make release VERSION=0.9.5"
@echo " serve Serve this directory via a webserver on port 8000." @echo " serve Serve this directory via a webserver on port 8000."
@echo " stamp-bower Install bower dependencies and create the guard file stamp-bower which will prevent those dependencies from being installed again."
@echo " stamp-npm Install NPM dependencies and create the guard file stamp-npm which will prevent those dependencies from being installed again."
@echo " stamp-bundler Install Bundler (Ruby) dependencies and create the guard file stamp-bundler which will prevent those dependencies from being installed again."
@echo " watch Tells Sass to watch the .scss files for changes and then automatically update the CSS files." @echo " watch Tells Sass to watch the .scss files for changes and then automatically update the CSS files."
.PHONY: all
all: dev all: dev
######################################################################## ########################################################################
## Miscellaneous ## Miscellaneous
.PHONY: serve
serve: stamp-npm serve: stamp-npm
$(HTTPSERVE) -p 8000 $(HTTPSERVE) -p 8000
######################################################################## ########################################################################
## Translation machinery ## Translation machinery
.PHONY: pot
pot: pot:
xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot converse.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=0.7.0 -c --language="python"; xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot converse.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=0.7.0 -c --language="python";
.PHONY: po
po: po:
find ./locale -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./locale/converse.pot -U \; find ./locale -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./locale/converse.pot -U \;
merge: po .PHONY: po2json
po2json: po2json:
find ./locale -maxdepth 1 -mindepth 1 -type d -exec $(PO2JSON) -p -f jed -d converse {}/LC_MESSAGES/converse.po {}/LC_MESSAGES/converse.json \; find ./locale -maxdepth 1 -mindepth 1 -type d -exec $(PO2JSON) -p -f jed -d converse {}/LC_MESSAGES/converse.po {}/LC_MESSAGES/converse.json \;
######################################################################## ########################################################################
## Release management ## Release management
.PHONY: release
release: release:
sed -i s/Project-Id-Version:\ Converse\.js\ [0-9]\.[0-9]\.[0-9]/Project-Id-Version:\ Converse.js\ $(VERSION)/ locale/converse.pot sed -i s/Project-Id-Version:\ Converse\.js\ [0-9]\.[0-9]\.[0-9]/Project-Id-Version:\ Converse.js\ $(VERSION)/ locale/converse.pot
sed -i s/\"version\":\ \"[0-9]\.[0-9]\.[0-9]\"/\"version\":\ \"$(VERSION)\"/ bower.json sed -i s/\"version\":\ \"[0-9]\.[0-9]\.[0-9]\"/\"version\":\ \"$(VERSION)\"/ bower.json
...@@ -95,29 +98,36 @@ stamp-bundler: ...@@ -95,29 +98,36 @@ stamp-bundler:
$(BUNDLE) install --path .bundle --binstubs .bundle/bin $(BUNDLE) install --path .bundle --binstubs .bundle/bin
touch stamp-bundler touch stamp-bundler
.PHONY: clean
clean:: clean::
rm -f stamp-npm stamp-bower stamp-bundler rm -f stamp-npm stamp-bower stamp-bundler
rm -rf node_modules components .bundle rm -rf node_modules components .bundle
.PHONY: dev
dev: stamp-bower stamp-bundler dev: stamp-bower stamp-bundler
######################################################################## ########################################################################
## Builds ## Builds
sass:: .PHONY: css
$(SASS) -I ./components/bourbon/app/assets/stylesheets/ sass/converse.scss css/converse.css css: converse.css
css:: stamp-bundler sass cssmin converse.css:: stamp-bundler
$(SASS) -I ./components/bourbon/app/assets/stylesheets/ sass/converse.scss css/converse.css
watch:: stamp-bundler .PHONY: watch
watch: stamp-bundler
$(SASS) --watch -I ./components/bourbon/app/assets/stylesheets/ sass/converse.scss:css/converse.css $(SASS) --watch -I ./components/bourbon/app/assets/stylesheets/ sass/converse.scss:css/converse.css
.PHONY: jsmin
jsmin: jsmin:
$(GRUNT) jsmin $(GRUNT) jsmin
.PHONY: watch
cssmin: stamp-npm cssmin: stamp-npm
$(GRUNT) cssmin $(GRUNT) cssmin
.PHONY: build
build:: stamp-npm build:: stamp-npm
$(GRUNT) jst $(GRUNT) jst
$(GRUNT) minify $(GRUNT) minify
...@@ -125,34 +135,34 @@ build:: stamp-npm ...@@ -125,34 +135,34 @@ build:: stamp-npm
######################################################################## ########################################################################
## Tests ## Tests
check:: stamp-npm .PHONY: watch
check: stamp-npm
$(GRUNT) jshint $(GRUNT) jshint
$(PHANTOMJS) node_modules/phantom-jasmine/lib/run_jasmine_test.coffee tests.html $(PHANTOMJS) node_modules/phantom-jasmine/lib/run_jasmine_test.coffee tests.html
######################################################################## ########################################################################
## Documentation ## Documentation
.PHONY: html
html: html:
rm -rf $(BUILDDIR)/html rm -rf $(BUILDDIR)/html
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo @echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: epub
epub: epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo @echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub." @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
gettext: .PHONY: changes
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes: changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo @echo
@echo "The overview file is in $(BUILDDIR)/changes." @echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck: linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo @echo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment