. auto-generate per-directory .gitignore files based on $(CLEANFILES)

. gitignore .gitignore files except for the root one.
This commit is contained in:
Ben Gras 2010-11-17 14:28:23 +00:00
parent f3e1b1c226
commit 371624e0ec
2 changed files with 6 additions and 0 deletions

2
.gitignore vendored
View file

@ -24,6 +24,8 @@ GSYMS
GTAGS GTAGS
\#*# \#*#
CVS CVS
!/.gitignore
.gitignore
.svn .svn
boot/boot boot/boot

View file

@ -15,6 +15,7 @@
##### "all" and "depend" targets ##### "all" and "depend" targets
realinstall: realall realinstall: realall
realall: depend realall: depend
depend: .gitignore
##### Basic targets ##### Basic targets
realinstall: proginstall scriptsinstall realinstall: proginstall scriptsinstall
@ -382,4 +383,7 @@ memalloc: realall
${INSTALL} ${INSTALLFLAGS} ${PROG} ${INSTALL} ${INSTALLFLAGS} ${PROG}
.endif .endif
.gitignore: Makefile
echo $(CLEANFILES) $(PROGS) | tr ' ' '\n' >.gitignore
.endif # HOSTPROG .endif # HOSTPROG