From 58c32c97cf7799a60a48887b464294d395f9f1c1 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 25 Apr 2015 14:14:12 +0200 Subject: [PATCH] Added cleansrc to makefile (nw) --- makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/makefile b/makefile index 4cbd8a20d6a..5181b510391 100644 --- a/makefile +++ b/makefile @@ -973,4 +973,32 @@ $(GENDIR)/%.lh: $(SRC)/%.lay $(SRC)/build/file2str.py include $(SRC)/regtests/regtests.mak +.PHONY: tests + tests: $(REGTESTS) + +#------------------------------------------------- +# Source cleanup +#------------------------------------------------- + +.PHONY: cleansrc + +cleansrc: + @echo Cleaning up tabs/spaces/end of lines.... +ifeq ($(OS),windows) + $(shell for /r src %%i in (*.c) do srcclean %%i >&2 ) + $(shell for /r src %%i in (*.h) do srcclean %%i >&2 ) + $(shell for /r src %%i in (*.mak) do srcclean %%i >&2 ) + $(shell for /r src %%i in (*.lst) do srcclean %%i >&2 ) + $(shell for /r src %%i in (*.lay) do srcclean %%i >&2 ) + $(shell for /r src %%i in (*.inc) do srcclean %%i >&2 ) + $(shell for /r hash %%i in (*.xml) do srcclean %%i >&2 ) +else + $(shell find src/ -name *.c -exec ./srcclean {} >&2 ;) + $(shell find src/ -name *.h -exec ./srcclean {} >&2 ;) + $(shell find src/ -name *.mak -exec ./srcclean {} >&2 ;) + $(shell find src/ -name *.lst -exec ./srcclean {} >&2 ;) + $(shell find src/ -name *.lay -exec ./srcclean {} >&2 ;) + $(shell find src/ -name *.inc -exec ./srcclean {} >&2 ;) + $(shell find hash/ -name *.xml -exec ./srcclean {} >&2 ;) +endif