diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-06 14:20:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-06 14:20:19 +0200 |
commit | 15cd227d73b492b4992d9cea6d26015449f59c93 (patch) | |
tree | 4665257339f76af8aaa3f617b2622ca2df2264aa | |
parent | 0e2ae18a97fd507bac872031888d34c3a7d8b17b (diff) |
Generate config.h
-rw-r--r-- | odb/details/config.hxx | 9 | ||||
-rw-r--r-- | odb/makefile | 23 |
2 files changed, 26 insertions, 6 deletions
diff --git a/odb/details/config.hxx b/odb/details/config.hxx index c5b97df..8237d88 100644 --- a/odb/details/config.hxx +++ b/odb/details/config.hxx @@ -10,12 +10,11 @@ #ifdef _MSC_VER # include <odb/details/config-vc.h> +#elif defined(ODB_COMPILER) +# define ODB_THREADS_NONE +# define LIBODB_STATIC_LIB #else -# ifdef HAVE_CONFIG_H -# include <odb/details/config.h> -# else -# define ODB_THREADS_POSIX -# endif +# include <odb/details/config.h> #endif // no post 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. # |