From a4d81bc76de5972d8cbdd14cc17e5baa6fe23ad6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Sep 2010 14:21:24 +0200 Subject: Generate config.h --- odb/tracer/details/config.hxx | 11 ++++------- odb/tracer/makefile | 26 ++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/odb/tracer/details/config.hxx b/odb/tracer/details/config.hxx index d8e15b6..52fdffc 100644 --- a/odb/tracer/details/config.hxx +++ b/odb/tracer/details/config.hxx @@ -8,16 +8,13 @@ // no pre -#ifdef HAVE_CONFIG_H +#ifdef _MSC_VER +#elif defined(ODB_COMPILER) +# error libodb-tracer header included in odb-compiled header +#else # include #endif -#ifndef LIBODB_TRACER_INCLUDE_SHORT - #ifdef _WIN32 - #define LIBODB_TRACER_INCLUDE_SHORT 1 - #endif -#endif - // no post #endif // ODB_TRACER_DETAILS_CONFIG_HXX diff --git a/odb/tracer/makefile b/odb/tracer/makefile index 3402451..bf03eb5 100644 --- a/odb/tracer/makefile +++ b/odb/tracer/makefile @@ -27,13 +27,23 @@ $(call import,\ # Build. # $(odb_tracer.l): $(cxx_obj) $(odb.l) -$(odb_tracer.l.cpp-options): value := -I$(src_root) +$(odb_tracer.l.cpp-options): value := -I$(out_root) -I$(src_root) $(odb_tracer.l.cpp-options): $(odb.l.cpp-options) -$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) +$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) $(out_base)/details/config.h $(call include-dep,$(cxx_od)) +$(out_base)/details/config.h: + @echo '// file : odb/tracer/details/config.h' >$@ + @echo '// author : automatically generated' >>$@ + @echo '' >>$@ + @echo '#ifndef ODB_TRACER_DETAILS_CONFIG_H' >>$@ + @echo '#define ODB_TRACER_DETAILS_CONFIG_H' >>$@ + @echo '' >>$@ + @echo '' >>$@ + @echo '#endif // ODB_TRACER_DETAILS_CONFIG_H' >>$@ + # Convenience alias for default target. # $(out_base)/: $(odb_tracer.l) @@ -60,6 +70,18 @@ $(clean): $(odb_tracer.l).o.clean \ $(odb_tracer.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_tracer.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