diff options
-rw-r--r-- | odb/tracer/details/config.hxx | 11 | ||||
-rw-r--r-- | 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 <odb/tracer/details/config.h> #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. # |