Generator for .gitignore
authorDan White <dan@whiteaudio.com>
Sat, 21 Jan 2012 22:06:24 +0000 (16:06 -0600)
committerDan White <dan@whiteaudio.com>
Sat, 21 Jan 2012 22:06:24 +0000 (16:06 -0600)
Makefile

index f985c686769a5099979791cf4499d7d86c600111..1687e4e0139ddbad8bcda61ce17e98fb2bf86a36 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,17 @@
 
 
-DJSYMS=$(shell find . -name '*.dwboxsym')
+DJ_SRC=$(wildcard */*.dwboxsym)
+DJ_SYM=$(DJ_SRC:.dwboxsym=.sym)
 
-syms: $(DJSYMS:.dwboxsym=.sym)
+SYMS=$(DJ_SYM)
 
 
+default: syms .gitignore
+
+syms: $(SYMS)
+
+.gitignore: $(SYMS)
+       cat .gitignore.base > .gitignore && for f in $(SYMS); do echo $$f >> .gitignore; done
+
 %.sym: %.dwboxsym
        ./dwboxsym $< > $@