Add new command "make cleanup-style"

This commit is contained in:
Volker Grabsch 2012-03-29 13:00:17 +02:00
parent 1a99fb3de2
commit 875c74934c
2 changed files with 21 additions and 0 deletions

View File

@ -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); \
)

View File

@ -862,6 +862,14 @@ USE_OSGPLUGIN(<plugin2>)
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>