Re: [Gpsbabel-misc] Tracked files modified by compilation or configuration
GPSBabel converts and transfers data like waypoints, tracks & routes.
Brought to you by:
robertl
|
From: Dr R. W. <rai...@gm...> - 2016-07-14 12:20:46
|
Robert,
On Sunday, 2016-07-10 15:17:12 -0500, you wrote:
> We version control ALL the files we distribute, which does include some
> that are generated.
I dare say "not true":
$ grep exe .gitignore
/gpsbabel.exe
$
At least I hope "gpsbabel.exe" is part of your distributions. But it is
not part of the repository for obvious reasons. And for the same obvi-
ous reasons other files generated in the configuration or compilation
process should not be part of the repository, even though they of course
have to be part of any distribution.
> If you're going to be regularly working directly from
> the repository, you should have the tools to regenerate these or have a
> script that ensures that configure, internal_styles, xcsv_tokens.gperf,
> etc. have a later timestamp than everything else after you do a pull.
What is the purpose of having a rule like
internal_styles.cc: mkstyle.sh $(srcdir)/style/*.style
$(srcdir)/mkstyle.sh > internal_styles.cc || ...
in file "Makefile" when you explicitly ask me to use "touch" to prevent
"internal_styles.cc" from being updated? This way I'm compiling with an
outdated and possibly inconsistent file "internal_styles.cc" and the re-
sults are rather unpredictable (by the way, the first prerequisite in
the above rule should probably read "$(srcdir)/mkstyle.sh").
Script "mkstyle.sh" really _CHANGED_ "internal_styles.cc" (as opposed to
just creating a new but identical file):
$ hg diff -c . internal_styles.cc
diff --git a/internal_styles.cc b/internal_styles.cc
--- a/internal_styles.cc
+++ b/internal_styles.cc
@@ -748,7 +748,7 @@
"# FILE LAYOUT DEFINITIONS:\n"
"#\n"
"FIELD_DELIMITER PIPE\n"
- "RECORD_DELIMITER NEWLINE\n"
+ "RECORD_DELIMITER NEWLINE\n"
"BADCHARS \"|\n"
"ENCODING UTF-16LE\n"
"#\n"
@@ -1489,7 +1489,7 @@
"IFIELD IGNORE, \"\", \"%-.31s\"\n"
"IFIELD DESCRIPTION, \"\", \"%-.78s\"\n"
;
-style_vecs_t style_list[] = {{ "xmapwpt", xmapwpt } , { "xmap2006", xmap2006 } , { "xmap", xmap } , { "tomtom_itn_places", tomtom_itn_places } , { "tomtom_itn", tomtom_itn } , { "tomtom_asc", tomtom_asc } , { "tabsep", tabsep } , { "saplus", saplus } , { "s_and_t", s_and_t } , { "ricoh", ricoh } , { "openoffice", openoffice } , { "nima", nima } , { "navigonwpt", navigonwpt } , { "mxf", mxf } , { "motoactv", motoactv } , { "mapconverter", mapconverter } , { "mainnav", mainnav } , { "land_air_sea", land_air_sea } , { "kompass_wp", kompass_wp } , { "kompass_tk", kompass_tk } , { "igo2008_poi", igo2008_poi } , { "igoprimo_poi", igoprimo_poi } , { "iblue757", iblue757 } , { "iblue747", iblue747 } , { "gpsman", gpsman } , { "gpsdrivetrack", gpsdrivetrack } , { "gpsdrive", gpsdrive } , { "geonet", geonet } , { "garmin_poi", garmin_poi } , { "garmin_g1000", garmin_g1000 } , { "garmin301", garmin301 } , { "fugawi", fugawi } , { "flysight", flysight } , { "dna", dna } , { "custom", custom } , { "cup", cup } , { "csv", csv } , { "cambridge", cambridge } , { "arc", arc } , {0,0}};
+style_vecs_t style_list[] = {{ "xmapwpt", xmapwpt } , { "xmap2006", xmap2006 } , { "xmap", xmap } , { "tomtom_itn_places", tomtom_itn_places } , { "tomtom_itn", tomtom_itn } , { "tomtom_asc", tomtom_asc } , { "tabsep", tabsep } , { "saplus", saplus } , { "s_and_t", s_and_t } , { "ricoh", ricoh } , { "openoffice", openoffice } , { "nima", nima } , { "navigonwpt", navigonwpt } , { "mxf", mxf } , { "motoactv", motoactv } , { "mapconverter", mapconverter } , { "mainnav", mainnav } , { "land_air_sea", land_air_sea } , { "kompass_wp", kompass_wp } , { "kompass_tk", kompass_tk } , { "igoprimo_poi", igoprimo_poi } , { "igo2008_poi", igo2008_poi } , { "iblue757", iblue757 } , { "iblue747", iblue747 } , { "gpsman", gpsman } , { "gpsdrivetrack", gpsdrivetrack } , { "gpsdrive", gpsdrive } , { "geonet", geonet } , { "garmin_poi", garmin_poi } , { "garmin_g1000", garmin_g1000 } , { "garmin301", garmin301 } , { "fugawi", fugawi } , { "flysight", flysight } , { "dna", dna } , { "custom", custom } , { "cup", cup } , { "csv", csv } , { "cambridge", cambridge } , { "arc", arc } , {0,0}};
size_t nstyles = 39;
#else /* CSVFMTS_ENABLED */
style_vecs_t style_list[] = {{0,0}};
The first change refers to a run of blanks being replaced with a tab
character, and the second change refers to at least replacing "igo2008"
with "igoprimo".
Here "---" refers to the state of the repository before calling "make
all gui", and "+++" refers to the state after that. More precisely, the
Git revision id referred to by "---" should be "a187be693531e73cb110447-
805e76043bcdf6e87" featuring the commit message "2016-05-07 15:48:40
-0500 rob...@gp...: Grammar tweak after killing Qt4.".
So again: by telling me to just touch "internal_styles.cc" to pevent it
from being remade, you are in fact telling me to create an outdated (at
the least) or inconsistent (in the worst case) "gpsbabel.exe". This is
not what doing one's own compilations is about.
> Our release process that creates the src tarball does exactly this for
> exactly those reasons. This allows someone to easily build from source
> without needing autoconf and such.
What's in a tarball is quite a different story from what's in a public
source repository.
> If you're working directly from the tree
> instead of from releases, either be prepared to manage the timestamps or
> have the tools to regenerate these things. The first is easier.
As the example above is showing "managing the timestamps" just leads to
old stuff in the compiled code.
Sincerely,
Rainer |