aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-06 14:21:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-06 14:21:24 +0200
commita4d81bc76de5972d8cbdd14cc17e5baa6fe23ad6 (patch)
treea00344417cff8ffe827b3a65ef14597bf0e4b7a4
parent852126e1bc9b95529738d3225a141552d72b8e04 (diff)
Generate config.h
-rw-r--r--odb/tracer/details/config.hxx11
-rw-r--r--odb/tracer/makefile26
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.
#