diff options
-rw-r--r-- | tests/dump/makefile | 10 | ||||
-rw-r--r-- | xsd-frontend/makefile | 15 |
2 files changed, 23 insertions, 2 deletions
diff --git a/tests/dump/makefile b/tests/dump/makefile index c115e9c..ddd8986 100644 --- a/tests/dump/makefile +++ b/tests/dump/makefile @@ -39,6 +39,16 @@ $(clean): $(driver).o.clean \ $(addsuffix .cxx.clean,$(cxx_obj)) \ $(addsuffix .cxx.clean,$(cxx_od)) +# Generated .gitignore. +# +ifeq ($(out_base),$(src_base)) +$(driver): | $(out_base)/.gitignore + +$(out_base)/.gitignore: files := driver +$(clean): $(out_base)/.gitignore.clean + +$(call include,$(bld_root)/git/gitignore.make) +endif # How to. # diff --git a/xsd-frontend/makefile b/xsd-frontend/makefile index f730b64..5e1c45f 100644 --- a/xsd-frontend/makefile +++ b/xsd-frontend/makefile @@ -100,7 +100,7 @@ $(call include-dep,$(cxx_od)) .PHONY: $(out_base)/ $(out_base)/: $(xsd_frontend.l) -# what to clean +# Clean # .PHONY: $(clean) @@ -110,7 +110,18 @@ $(clean): $(xsd_frontend.l).o.clean \ $(addsuffix .cxx.clean,$(cxx_od)) \ $(addsuffix .m4.clean,$(m4_cxx)) -# how to +# Generated .gitignore. +# +ifeq ($(out_base),$(src_base)) +$(xsd_frontend.l): | $(out_base)/.gitignore + +$(out_base)/.gitignore: files := semantic-graph/fundamental.hxx semantic-graph/fundamental.cxx +$(clean): $(out_base)/.gitignore.clean + +$(call include,$(bld_root)/git/gitignore.make) +endif + +# How to. # $(call include,$(bld_root)/cxx/o-l.make) $(call include,$(bld_root)/cxx/cxx-o.make) |