diff options
Diffstat (limited to 'examples/cxx/tree/custom/double/makefile')
-rw-r--r-- | examples/cxx/tree/custom/double/makefile | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/examples/cxx/tree/custom/double/makefile b/examples/cxx/tree/custom/double/makefile index 249ed01..e8bec43 100644 --- a/examples/cxx/tree/custom/double/makefile +++ b/examples/cxx/tree/custom/double/makefile @@ -35,18 +35,15 @@ $(out_root)/xsd/xsd cxx-tree --output-dir $(out_base) --generate-xml-schema \ --generate-serialization --custom-type double=double \ --hxx-epilogue '\#include "double-custom.hxx"' xml-schema.xsd) -$(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 := \ +$(gen): xsd := $(out_root)/xsd/xsd + +$(gen): xsd_options := \ --generate-serialization --extern-xml-schema xml-schema.xsd -$(out_base)/$(xsd:.xsd=.hxx) \ -$(out_base)/$(xsd:.xsd=.ixx) \ -$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd +$(gen): $(out_root)/xsd/xsd $(call include-dep,$(dep)) @@ -66,6 +63,17 @@ $(clean): $(driver).o.clean \ $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean)) $(call message,rm $$1,rm -f $$1,$(out_base)/xml-schema.hxx) +# Generated .gitignore. +# +ifeq ($(out_base),$(src_base)) +$(gen): | $(out_base)/.gitignore +$(driver): | $(out_base)/.gitignore + +$(out_base)/.gitignore: files := driver xml-schema.hxx $(genf) +$(clean): $(out_base)/.gitignore.clean + +$(call include,$(bld_root)/git/gitignore.make) +endif # How to. # |