[xsd-users] Make suitable dependency generation
Boris Kolpackov
boris at codesynthesis.com
Mon Apr 8 10:52:08 EDT 2013
Hi Michael,
Michael R. Freedman <mfreedman at ll.mit.edu> writes:
> The only problem that I have is that it does not pre-pend the output
> directory specified by --output-dir to the dependency targets.
That was actually intentional. Normally, make rules specify targets
without the directory parts and if they are residing in directories
other than the current directory, then they are located with the
help of VPATH. See, for example, Paul's Third Rule of Makefiles[1]
and How Not to Use VPATH[2].
But now, thinking about it some more, I believe we should include the
directory part since the makefile that is compiling the schema and that
specifies the output directory is most likely also the same makefile
that includes the generated dependency file. And if that dependency
file doesn't have the output directory part, then the dependency
information will be useless.
So I am going to make the change.
Also note that you can easily change this behavior even now with the
--dep-target option, for example:
xsd --output-dir foo --dep-target "foo/bar.hxx foo/bar.cxx foo/bar.d" bar.xsd
A bit verbose but doable.
[1] http://mad-scientist.net/make/rules.html#rule3
[2] http://mad-scientist.net/make/vpath.html
Boris
More information about the xsd-users
mailing list