Skip to content

Commit

Permalink
improve dist building keyword replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker committed Oct 6, 2011
1 parent 88d6617 commit 736238d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions Makefile.am
Expand Up @@ -20,3 +20,9 @@ SUBDIRS = frontend backend

EXTRA_DIST = COPYRIGHT LICENSE CHANGES setup/build-perl-modules.sh setup/sdbs.inc

YEAR := $(shell date +%Y)
DATE := $(shell date +%Y-%m-%d)

dist-hook:
$(PERL) -i -p -e 's/#VERSION#/$(PACKAGE_VERSION)/g;s/#YEAR#/$(YEAR)/g;s/#DATE#/$(DATE)/g;' $(distdir)/README $(distdir)/COPYRIGHT

2 changes: 1 addition & 1 deletion README
Expand Up @@ -9,7 +9,7 @@ remOcular - your eyes in the cloud
::::::::::::::::::::::::::::::::::::::::::::::::::::::

Author: Tobi Oetiker <tobi@oetiker.ch>
Version: #VERSION#
Version: #VERSION#, #DATE#

http://www.remocular.org

Expand Down
7 changes: 5 additions & 2 deletions backend/Makefile.am
Expand Up @@ -20,9 +20,12 @@ SUBDIRS = bin etc lib public

EXTRA_DIST = $(wildcard t/*.t)

YEAR := $(shell date +%Y)
DATE := $(shell date +%Y-%m-%d)

dist-hook:
$(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/' $(distdir)/lib/remOcular.pm
$(PERL) -i -p -e "s/#VERSION#/$(PACKAGE_VERSION)/g;" $(distdir)/public/script/remocular.js
$(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(distdir)/lib/remOcular.pm
$(PERL) -i -p -e "s/#VERSION#/$(PACKAGE_VERSION)/g;s/#YEAR#/$(YEAR)/g;" $(distdir)/public/script/remocular.js

install-data-local:
mkdir -p $(DESTDIR)$(HTDOCSDIR)
Expand Down
3 changes: 1 addition & 2 deletions frontend/Makefile.am
Expand Up @@ -16,8 +16,7 @@

AUTOMAKE_OPTIONS = foreign

EXTRA_DIST = config.json generate.sh Manifest.json readme.txt source/index.html $(wildcard source/class/remocular/*.js source/class/remocular/util/*.js source/class/remocular/util/aggregator/*.js source/class/remocular/theme/*.js source/class/remocular/ui/table/*.js source/class/remocular/ui/table/model/*.js source/class/remocular/ui/form/*.js source/class/remocular/ui/form/renderer/*.js source/translation/*.po source/resource/remocular/*.png source/resource/remocular/*.gif)

EXTRA_DIST = config.json Manifest.json readme.txt source/index.html $(shell find source/class/remocular/ -name "*.js") $(wildcard source/translation/*.po source/resource/remocular/*.png source/resource/remocular/*.gif)

if BUILD_QOOXDOO_APP

Expand Down

0 comments on commit 736238d

Please sign in to comment.