X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=include.mk;h=20ffdd48aad6b4eafb5569fcf50e56a8fc0110f4;hp=a1d7430edb961b56ec34c34e7b485965817691c6;hb=fa14ca93d2b60f722d55c24214fde7ac84581ad0;hpb=7108c61bec71c0d87497046740c0b107eed8ecc1 diff --git a/include.mk b/include.mk index a1d7430..20ffdd4 100644 --- a/include.mk +++ b/include.mk @@ -95,7 +95,7 @@ SPLINTFLAGS = \ -abstract \ -statictrans \ -castfcnptr - + #always the right rule default: all @@ -107,3 +107,14 @@ uninstall: rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqcc.1 rm -f $(DESTDIR)$(MANDIR)/man1/doc/qcvm.1 rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqpak.1 + +STYLE_MATCH = \( -name '*.[ch]' -or -name '*.def' -or -name '*.qc' \) + +whitespace: + find . -type f $(STYLE_MATCH) -exec sed -i 's/ *$$//' '{}' ';' +newline: + find . -type f $(STYLE_MATCH) -exec sed -i -e '$$a\' '{}' ';' +indent: + find . -type f $(STYLE_MATCH) -exec sed -i 's/\t/ /g' '{}' ';' + +style: whitespace newline indent