changeset 2357:5a0c2bf69e55

Add new command "make cleanup-style"
author Volker Grabsch <vog@notjusthosting.com>
date Thu, 29 Mar 2012 13:00:17 +0200
parents c15638fca657
children 14b3f5ea78ae
files Makefile index.html
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Mar 29 12:27:58 2012 +0200
+++ b/Makefile	Thu Mar 29 13:00:17 2012 +0200
@@ -218,3 +218,16 @@
 	$(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); \
+        )
+
--- a/index.html	Thu Mar 29 12:27:58 2012 +0200
+++ b/index.html	Thu Mar 29 13:00:17 2012 +0200
@@ -862,6 +862,14 @@
         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>