From c34af468acc94691d0a5954eae38a89506bc620e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 17 Sep 2009 18:56:22 +0200 Subject: Generate .gitignore in compiler, test and example makefiles --- examples/cxx/tree/mixed/makefile | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'examples/cxx/tree/mixed/makefile') diff --git a/examples/cxx/tree/mixed/makefile b/examples/cxx/tree/mixed/makefile index cc81bca..b2e6338 100644 --- a/examples/cxx/tree/mixed/makefile +++ b/examples/cxx/tree/mixed/makefile @@ -29,17 +29,12 @@ $(driver): $(obj) $(xerces_c.l) $(obj) $(dep): cpp_options := -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(out_base)/$(xsd:.xsd=.hxx) \ -$(out_base)/$(xsd:.xsd=.ixx) \ -$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd +genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx) +gen := $(addprefix $(out_base)/,$(genf)) -$(out_base)/$(xsd:.xsd=.hxx) \ -$(out_base)/$(xsd:.xsd=.ixx) \ -$(out_base)/$(xsd:.xsd=.cxx): xsd_options := - -$(out_base)/$(xsd:.xsd=.hxx) \ -$(out_base)/$(xsd:.xsd=.ixx) \ -$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd +$(gen): xsd := $(out_root)/xsd/xsd +$(gen): xsd_options := +$(gen): $(out_root)/xsd/xsd $(call include-dep,$(dep)) @@ -59,6 +54,17 @@ $(clean): $(driver).o.clean \ $(addsuffix .cxx.clean,$(dep)) \ $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean)) +# Generated .gitignore. +# +ifeq ($(out_base),$(src_base)) +$(gen): | $(out_base)/.gitignore +$(driver): | $(out_base)/.gitignore + +$(out_base)/.gitignore: files := driver $(genf) +$(clean): $(out_base)/.gitignore.clean + +$(call include,$(bld_root)/git/gitignore.make) +endif # How to. # -- cgit v1.1