From 15cd227d73b492b4992d9cea6d26015449f59c93 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Sep 2010 14:20:19 +0200 Subject: Generate config.h --- odb/makefile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'odb/makefile') diff --git a/odb/makefile b/odb/makefile index 0fb038d..6f459a6 100644 --- a/odb/makefile +++ b/odb/makefile @@ -51,11 +51,21 @@ clean := $(out_base)/.clean # $(odb.l): $(cxx_obj) -lpthread -$(cxx_obj) $(cxx_od): $(odb.l.cpp-options) +$(cxx_obj) $(cxx_od): $(odb.l.cpp-options) $(out_base)/details/config.h $(odb.l.cpp-options): value := -I$(out_root) -I$(src_root) $(call include-dep,$(cxx_od)) +$(out_base)/details/config.h: + @echo '// file : odb/details/config.h' >$@ + @echo '// author : automatically generated' >>$@ + @echo '' >>$@ + @echo '#ifndef ODB_DETAILS_CONFIG_H' >>$@ + @echo '#define ODB_DETAILS_CONFIG_H' >>$@ + @echo '' >>$@ + @echo '#define ODB_THREADS_POSIX 1' >>$@ + @echo '' >>$@ + @echo '#endif // ODB_DETAILS_CONFIG_H' >>$@ # Convenience alias for default target. # @@ -97,7 +107,18 @@ $(clean): $(odb.l).o.clean \ $(odb.l.cpp-options).clean \ $(addsuffix .cxx.clean,$(cxx_obj)) \ $(addsuffix .cxx.clean,$(cxx_od)) + $(call message,rm $$1,rm -f $$1,$(out_base)/details/config.h) +# Generated .gitignore. +# +ifeq ($(out_base),$(src_base)) +$(odb.l): | $(out_base)/.gitignore + +$(out_base)/.gitignore: files := details/config.h +$(clean): $(out_base)/.gitignore.clean + +$(call include,$(bld_root)/git/gitignore.make) +endif # How to. # -- cgit v1.1