X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=include.mk;h=30372896beaae36558e9daa169d22f7f7b36e2fe;hb=988b4b49606724ef4275a25d8ea95fdc2792ee51;hp=a1d7430edb961b56ec34c34e7b485965817691c6;hpb=7108c61bec71c0d87497046740c0b107eed8ecc1;p=xonotic%2Fgmqcc.git diff --git a/include.mk b/include.mk index a1d7430..3037289 100644 --- a/include.mk +++ b/include.mk @@ -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' \) + +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