On Wed, 2011-06-29 at 13:35 -0400, Sam Hartman wrote:
> OK, I think I understand the problem now and you're right that it's more
> serious than I had originally anticipated.
>
> Failing to dist a .vala file seems like it kind of defeats the purpose
> of make dist. In particular, if I take a tar file resulting from make
> dist it won't build on Windows. so, that really doesn't seem like a
> solution.
I should have mentioned that msrpc-client.vala is just a test program
and only for Windows so I think we are safe to not dist it.
> I think the constraints we need to meet here are:
>
<snip>
>
> 4) If make dist produces a particular vala output that vala output must
> be valid without rerunning vala on all platforms. I'm concerned your
> solution might not meet this constraint. This comes from an expectation
> that the source directory can be read-only and from the expectation that
> making from a make dist tree actually work.
>
> we'd like to have
>
> 5) make dist is sufficient that you don't need vala on the build
> machine.
Given that building from source on Windows requires a set of
dependencies so large that I recommend using an automated tool (jhbuild)
to obtain them, requiring valac to build as well shouldn't be too much
of a problem. The present solution meets constraints 4 and 5 on every
other platform, so I am pretty convinced it's the best way forward.
Furthermore, there are a few other parts in the code where we use #if
OS_WIN32 where the .c files in the diff will therefore
> If not, then we need to cycle again. There is what I think is an
> obvious solution, although it might be kind of unappealing. Isolate the
> platform dependencies into pure C code and provide an abstract interface
> for vala to use, so that all the vala can be built everywhere.
Possible, but the generated C code for the DBus server is 6 times the
size of the Vala source.
> Another potential option would be to disable the dist target entirely
> and have a specific target that generates all the vala output needed by
> Linux.
> If we're going to have a make dist target, it should do what it is
> expected to do.
This would be reasonable if the tarball was inconsistent on more
platforms than just Windows. However, I cannot picture a single person
who would otherwise be capable of building from the tarball on Windows
but could not install valac. Would a message in README.windows alerting
them to the fact not be enough?
One final solution is to put the generated source code for Windows into
a subdirectory and check it into git, which would mean you could
generate a complete 'make dist' on Linux.
I've sent a mail to the vala list to see if anyone else has come up
against this issue.
Sam
|