Permalink
Browse files

improve dist building keyword replacement

  • Loading branch information...
1 parent 88d6617 commit 736238dbb3cbb7090f33a5670f2486816d69bce4 @oetiker committed Oct 6, 2011
Showing with 13 additions and 5 deletions.
  1. +6 −0 Makefile.am
  2. +1 −1 README
  3. +5 −2 backend/Makefile.am
  4. +1 −2 frontend/Makefile.am
View
@@ -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
+
View
2 README
@@ -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
View
@@ -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)
View
@@ -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

0 comments on commit 736238d

Please sign in to comment.