gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] gpsd_config.h in release tarballs can break rebuild


From: Fred Wright
Subject: Re: [gpsd-dev] gpsd_config.h in release tarballs can break rebuild
Date: Sun, 15 Jan 2017 18:18:33 -0800 (PST)

On Fri, 13 Jan 2017, Gregory Fong wrote:

> The following commit had a side-effect of adding gpsd_config.h to the
> release tarball by adding gpsd_config.h to generated_sources in
> SConstruct:
>
>   commit eafd2ee908832f18b56f2ba986fde17a378e4791
>   Author: Sanjeev Gupta <address@hidden>
>   Date:   Fri Apr 3 23:26:03 2015 +0800
>
>       Remove generated source file gpsd_config.h when cleaning scons
>
> This leads to a subtle build issue if the following steps are taken on
[...]
> build systems may do the same thing.  What makes this extremely
> misleading is that all of the cached results are printed to the
> console, suggesting that scons happily probed the system configuration
> and generated the config when it did not!

Actually, it *obtained* the correct configuration, it just didn't *use* it
properly. :-)

> A simple solution to this is to do the same thing that's currently
> done for timebase.h and mark it as AlwaysBuild in SConstruct, i.e.
>
>   gpsd_config = env.Textfile(target="gpsd_config.h", source=confdefs)
>   env.AlwaysBuild(gpsd_config)

In general I'd be inclined to us AlwaysBuild sparingly, though admittedly
in this case it wouldn't be very expensive.

> Another would be to remove this from the release tarball, since it has
> to be generated anyway.  Thoughts on what would be better?

This seems to me to be the better approach, but the larger question is why
*anything* in generated_sources is being included in the tarball.  The
commit referenced here seems perfectly reasonable; the more questionable
line is:

2283:    distfiles += generated_sources

Anyone know why it's doing this?

Also note that the following line is doing something similar for the
generated manpages, though that might be intentional as a fallback for
cases where the man-building tools aren't available.

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]