]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - include.mk
ast_binary->right_first and an execution order check
[xonotic/gmqcc.git] / include.mk
index d6d1154d8d4923bc2e165248b41b9bb7c4e9329b..30372896beaae36558e9daa169d22f7f7b36e2fe 100644 (file)
@@ -108,6 +108,13 @@ uninstall:
        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 \( -name '*.[ch]' -or -name '*.def' \) -exec sed -i 's/ *$$//' '{}' ';'
+       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