Mercurial > hg > mxe
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 +++ b/Makefile @@ -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); \ + ) +