diff options
-rw-r--r-- | build/bootstrap.make | 17 | ||||
-rw-r--r-- | odb/tracer/makefile | 8 |
2 files changed, 20 insertions, 5 deletions
diff --git a/build/bootstrap.make b/build/bootstrap.make index 09d2864..12e28db 100644 --- a/build/bootstrap.make +++ b/build/bootstrap.make @@ -46,12 +46,27 @@ $(error dist_prefix is not set) endif endif -# Don't include dependency info for certain targets. +# If we don't have dependency auto-generation then we need to manually +# make sure that generated files are generated before C++ file are +# compiler. To do this we make the object files ($2) depend in order- +# only on generated files ($3). # +ifeq ($(cxx_id),generic) + +define include-dep +$(if $2,$(eval $2: | $3)) +endef + +else + define include-dep $(call -include,$1) endef +endif + +# Don't include dependency info for certain targets. +# ifneq ($(filter $(MAKECMDGOALS),clean disfigure dist),) include-dep = endif diff --git a/odb/tracer/makefile b/odb/tracer/makefile index bf03eb5..3e76532 100644 --- a/odb/tracer/makefile +++ b/odb/tracer/makefile @@ -32,8 +32,6 @@ $(odb_tracer.l.cpp-options): $(odb.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' >>$@ @@ -44,6 +42,8 @@ $(out_base)/details/config.h: @echo '' >>$@ @echo '#endif // ODB_TRACER_DETAILS_CONFIG_H' >>$@ +$(call include-dep,$(cxx_od),$(cxx_obj),$(out_base)/details/config.h) + # Convenience alias for default target. # $(out_base)/: $(odb_tracer.l) @@ -60,8 +60,8 @@ $(dist): export interface_version = $(shell sed -e \ $(dist): $(call dist-data,$(sources) $(headers) details/config.h.in) - $(call meta-vc9proj,$(src_base)/libodb-tracer-vc9.vcproj) - $(call meta-vc10proj,$(src_base)/libodb-tracer-vc10.vcxproj) + $(call meta-vc9proj,libodb-tracer-vc9.vcproj) + $(call meta-vc10proj,libodb-tracer-vc10.vcxproj) $(call meta-automake) # Clean. |