summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d7fe945..2f15b3d 100644
--- a/Makefile
+++ b/Makefile
@@ -6,13 +6,17 @@ BUILD_LANGS="en-US"
SRCDIR :=$(shell pwd)
+PRODUCT_NORMALIZED := $(shell echo $(PRODUCT) | sed -e 's/ /_/g')
+
all: clean
@mkdir builds
@sed -i -r \
-e 's|ENTITY PRODUCT_VERSION "([\.0-9]+)"|ENTITY PRODUCT_VERSION "$(VERSION)"|g' \
-e 's|productnumber>([\.0-9]+)</productnumber|productnumber>$(VERSION)</productnumber|g' \
+ -e 's|ENTITY PRODUCT "([a-zA-Z\.0-9]+)"|ENTITY PRODUCT "$(PRODUCT)"|g' \
+ -e 's|productname>([\.0-9]+)</productname|productame>$(PRODUCT)</productname|g' \
`find -type f -name "Book_Info.xml" -or -name "*.ent"`
- for dir in `find -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort`; do \
+ @for dir in `find -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort`; do \
if [ -f "$$dir/publican.cfg" ]; then \
cd $$dir; \
publican build \
@@ -24,7 +28,7 @@ all: clean
[ "`basename $$build`" == "xml_tmp" ] && continue; \
lang=`echo $$build | awk -F'/' '{print $$2}'`; \
format=`echo $$build | awk -F'/' '{print $$3}'`; \
- cp -a $$build $(SRCDIR)/builds/$(PRODUCT)-$(VERSION)-$$dir-$$lang.$$format; \
+ cp -a $$build $(SRCDIR)/builds/$(PRODUCT_NORMALIZED)-$(VERSION)-$$dir-$$lang.$$format; \
done; \
cd ../; \
fi; \