summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2012-03-29 09:07:07 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2012-03-29 09:07:07 (GMT)
commit7e6723adb595dd573666c04739d70e528e653a68 (patch)
treee1618a56489509dcb1812e6f164c8cd7b5bc0f86 /Makefile
parent483164575c049cf3c7da6281475ef6235c64c3b6 (diff)
downloadmxe-7e6723adb595dd573666c04739d70e528e653a68.zip
mxe-7e6723adb595dd573666c04739d70e528e653a68.tar.gz
mxe-7e6723adb595dd573666c04739d70e528e653a68.tar.bz2
Move $(PKG)_VERSION and $(PKG)_WEBSITE from src/*.mk into doc/index.html
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 8 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 83e1676..85a76c2 100644
--- a/Makefile
+++ b/Makefile
@@ -104,6 +104,11 @@ $(PREFIX)/installed/check-requirements: $(MAKEFILE)
@[ -d '$(PREFIX)/installed' ] || mkdir -p '$(PREFIX)/installed'
@touch '$@'
+define PKG_DEFINITION
+$(1)_VERSION := $(shell grep ' id="$(1)-version"' '$(TOP_DIR)/doc/index.html' | $(SED) -n 's/^.* id="$(1)-version">\([^<]*\)<.*$$/\1/p')
+endef
+$(foreach PKG,$(PKGS),$(eval $(call PKG_DEFINITION,$(PKG))))
+
include $(TOP_DIR)/src/*.mk
.PHONY: download
@@ -194,9 +199,9 @@ define UPDATE
$(if $(filter $(2),$($(1)_VERSION)),
$(info . $(1) $(2)),
$(info NEW $(1) $($(1)_VERSION) --> $(2))
- $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' '$(TOP_DIR)/src/$(1).mk'
+ $(SED) -i 's/\( id="$(1)-version"\)>[^<]*/\1>$(2)/' '$(TOP_DIR)/doc/index.html'
$(MAKE) -f '$(MAKEFILE)' 'update-checksum-$(1)' \
- || { $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $($(1)_VERSION)/' '$(TOP_DIR)/src/$(1).mk'; \
+ || { $(SED) -i 's/\( id="$(1)-version"\)>[^<]*/\1>$($(1)_VERSION)/' '$(TOP_DIR)/doc/index.html'; \
exit 1; })),
$(error Unable to update version number of package $(1)))
@@ -214,16 +219,7 @@ dist:
mkdir -p '$(DIST_DIR)'
mkdir '$(DIST_DIR)/mxe'
mkdir '$(DIST_DIR)/mxe/doc'
- ( \
- $(SED) -n '1,/<table id="package-list"/ p' '$(TOP_DIR)/doc/index.html' && \
- ($(foreach PKG,$(PKGS), \
- echo ' <tr>'; \
- echo ' <td><a href="$($(PKG)_WEBSITE)">$(PKG)</a></td>'; \
- echo ' <td id="$(PKG)-version">$($(PKG)_VERSION)</td>'; \
- echo ' </tr>';)) && \
- $(SED) '1,/<table id="package-list"/ d' '$(TOP_DIR)/doc/index.html' \
- ) \
- | $(SED) 's,\(<span class="target">\)[^<]*\(</span>\),\1$(TARGET)\2,g' \
+ $(SED) 's,\(<span class="target">\)[^<]*\(</span>\),\1$(TARGET)\2,g' '$(TOP_DIR)/doc/index.html' \
| $(SED) 's,\(<span class="target-underscore">\)[^<]*\(</span>\),\1$(subst -,_,$(TARGET))\2,g' \
>'$(DIST_DIR)/mxe/doc/index.html'
cp -p '$(TOP_DIR)/doc'/screenshot-* '$(DIST_DIR)/mxe/doc/'