summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2012-03-29 11:00:17 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2012-03-29 11:00:17 (GMT)
commit875c74934c231db6ed92cd3363d41a1bc724878e (patch)
tree0604f59238c9e8c1b738befbc40846a72a043b4e
parent1a99fb3de2a33bd3b6693bab406d9d312011bae7 (diff)
downloadmxe-875c74934c231db6ed92cd3363d41a1bc724878e.zip
mxe-875c74934c231db6ed92cd3363d41a1bc724878e.tar.gz
mxe-875c74934c231db6ed92cd3363d41a1bc724878e.tar.bz2
Add new command "make cleanup-style"
-rw-r--r--Makefile13
-rw-r--r--index.html8
2 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ba9a041..ae30517 100644
--- a/Makefile
+++ b/Makefile
@@ -218,3 +218,16 @@ update-checksum-%:
$(call DOWNLOAD_PKG_ARCHIVE,$*)
$(SED) -i 's/^\([^ ]*_CHECKSUM *:=\).*/\1 '"`$(call PKG_CHECKSUM,$*)`"'/' '$(TOP_DIR)/src/$*.mk'
+cleanup-style:
+ @$(foreach FILE,$(wildcard $(addprefix $(TOP_DIR)/,Makefile index.html CNAME src/*.mk src/*test.* tools/*)),\
+ echo '[cleanup] $(FILE)'; \
+ $(SED) -i ' \
+ s/\r//g; \
+ s/[ \t]\+$$//; \
+ s,^#!/bin/bash$$,#!/usr/bin/env bash,; \
+ $(if $(filter %Makefile,$(FILE)),,\
+ s/\t/ /g; \
+ ) \
+ ' $(FILE); \
+ )
+
diff --git a/index.html b/index.html
index a02f3c6..4d60a72 100644
--- a/index.html
+++ b/index.html
@@ -862,6 +862,14 @@ USE_OSGPLUGIN(&lt;plugin2&gt;)
download the new versions and note their checksums
</dd>
+ <dt>make cleanup-style</dt>
+
+ <dd>
+ for internal use only!
+ &ndash;
+ cleanup coding style
+ </dd>
+
</dl>
</div>