aboutsummaryrefslogtreecommitdiff
path: root/odb/tracer/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'odb/tracer/makefile')
-rw-r--r--odb/tracer/makefile26
1 files changed, 24 insertions, 2 deletions
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.
#