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: Gregory
Subject: Re: [gpsd-dev] gpsd_config.h in release tarballs can break rebuild
Date: Mon, 16 Jan 2017 23:09:22 -0600
User-agent: Mutt/1.5.24 (2015-08-30)

On Sun, Jan 15, 2017 at 06:18:33PM -0800, Fred Wright wrote:
> On Fri, 13 Jan 2017, Gregory Fong wrote:
> > 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.

Let's look at each other item in generated_sources:

    generated_sources = ['packet_names.h', 'timebase.h', 'gpsd.h', "ais_json.i",
                         'gps_maskdump.c', 'revision.h', 'gpsd.php',
                         'gpsd_config.h']


- packet_names.h: created from packet_states.h using sed
- timebase.h: uses AlwaysBuild
- gpsd.h: created from gpsd.h-head, gpsd_config.h, and gpsd.h-tail
- ais_json.i: created using `python jsongen.py`
- gps_maskdump.c: created using `python maskgen.py`
- revision.h: for releases, use `git describe --tags`
- gpsd.php: created uses substituter (defined in SConstruct)

Of these, revision.h seems to be the only one that makes sense in the
release tarball, it's safe to assume that the tools required to make all
of the other files are available.

Considering that, how about the following change?

------------------------------8<------------------------------
diff --git a/SConstruct b/SConstruct
index b6606f5..09fbdd3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2280,9 +2280,8 @@ if os.path.exists("gpsd.c") and
os.path.exists(".gitignore"):
     distfiles = _getoutput(r"git ls-files | grep -v '^www/'").split()
     if ".gitignore" in distfiles:
         distfiles.remove(".gitignore")
-    distfiles += generated_sources
+    distfiles += ['revision.h']
     distfiles += base_manpages.keys() + python_manpages.keys()
-    distfiles.remove("gpsd.h")
     if "packaging/rpm/gpsd.spec" not in distfiles:
         distfiles.append("packaging/rpm/gpsd.spec")
 
------------------------------>8------------------------------

Thanks,
Gregory



reply via email to

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