mirror of https://git.wownero.com/dsc/mxe.git
Improve "make cleanup-style" to touch only files that have to be fixed
This commit is contained in:
parent
c7f62b02ca
commit
9c79bd37ae
9
Makefile
9
Makefile
|
@ -220,14 +220,17 @@ update-checksum-%:
|
|||
|
||||
cleanup-style:
|
||||
@$(foreach FILE,$(wildcard $(addprefix $(TOP_DIR)/,Makefile index.html CNAME src/*.mk src/*test.* tools/*)),\
|
||||
echo '[cleanup] $(FILE)'; \
|
||||
$(SED) -i ' \
|
||||
$(SED) ' \
|
||||
s/\r//g; \
|
||||
s/[ \t]\+$$//; \
|
||||
s,^#!/bin/bash$$,#!/usr/bin/env bash,; \
|
||||
$(if $(filter %Makefile,$(FILE)),,\
|
||||
s/\t/ /g; \
|
||||
) \
|
||||
' $(FILE); \
|
||||
' < $(FILE) > $(TOP_DIR)/tmp-cleanup-style; \
|
||||
diff -u $(FILE) $(TOP_DIR)/tmp-cleanup-style >/dev/null \
|
||||
|| { echo '[cleanup] $(FILE)'; \
|
||||
cp $(TOP_DIR)/tmp-cleanup-style $(FILE); }; \
|
||||
rm -f $(TOP_DIR)/tmp-cleanup-style; \
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue