diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-01-20 04:38:52 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-01-20 04:38:52 -0500 |
commit | 5d9db7b1685fcb837806b725b83b5dc0d0b3fe75 (patch) | |
tree | c700c6fcf9aed9237799ce7eabd2ec0d0299a6a3 | |
parent | df23f48002aad59890136122c06c040b2d10f12e (diff) | |
download | gpsd-5d9db7b1685fcb837806b725b83b5dc0d0b3fe75.tar.gz |
Rebuilding of timebase constants is now completely automated.
All regression tests pass.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.am | 11 | ||||
-rwxr-xr-x | leapsecond.py | 2 | ||||
-rw-r--r-- | timebase.c (renamed from rollover.c) | 3 | ||||
-rw-r--r-- | timebase.h | 13 | ||||
-rw-r--r-- | www/hacking.html | 19 |
6 files changed, 17 insertions, 33 deletions
@@ -62,7 +62,7 @@ gpsd_config.h.in gpsd_config.h packet_names.h revision.h -leapcheck.h +timebase.h gpsd.spec MANIFEST .kdbgrc.* diff --git a/Makefile.am b/Makefile.am index 91aeed14..ca8cb578 100644 --- a/Makefile.am +++ b/Makefile.am @@ -171,7 +171,7 @@ libgpsd_c_sources = \ gpsd_json.c \ isgps.c \ gpsd_maskdump.c \ - rollover.c \ + timebase.c \ libgpsd_core.c \ net_dgpsip.c \ net_gnss_dispatch.c \ @@ -203,13 +203,12 @@ libgpsd_c_sources = \ libgpsd_h_sources = \ sockaddr.h \ bsd-base64.h \ - timebase.h \ bits.h \ crc24q.h libgpsd_la_LDFLAGS = $(LIBUSB_LIBS) $(BLUEZ_LIBS) -BUILT_SOURCES = packet_names.h gpsd.h revision.h ais_json.i gps_maskdump.c gpsd_maskdump.c leapcheck.h +BUILT_SOURCES = packet_names.h gpsd.h revision.h ais_json.i gps_maskdump.c gpsd_maskdump.c timebase.h packet_names.h: packet_states.h rm -f packet_names.h && \ @@ -244,8 +243,8 @@ gpsd_maskdump.c: gpsd.h maskaudit.py $(PYTHON) maskaudit.py -d >gpsd_maskdump.c && \ chmod a-w gpsd_maskdump.c -leapcheck.h: leapsecond.py #leapseconds.i - $(PYTHON) leapsecond.py -h leapseconds.cache >leapcheck.h +timebase.h: leapsecond.py #leapseconds.i + $(PYTHON) leapsecond.py -h leapseconds.cache >timebase.h # leapseconds.cache is a local cache for information on leapseconds issued # by the U.S. Naval observatory. # It gets kept in the reposiory so we can @@ -256,7 +255,7 @@ leapseconds.cacche: leapsecond.py libgps_la_SOURCES = $(libgps_c_sources) libgpsd_la_SOURCES = $(libgpsd_c_sources) $(libgpsd_h_sources) \ - driver_rtcm2.h packet_states.h leapcheck.h + driver_rtcm2.h packet_states.h timebase.h # Warning: This overrides autoconf's normal link-line generation process if LIBGPSMM_ENABLE diff --git a/leapsecond.py b/leapsecond.py index 9b3b6d56..a4790cff 100755 --- a/leapsecond.py +++ b/leapsecond.py @@ -146,8 +146,10 @@ def make_leapsecond_include(infile): return '?' else: return str(i) + year = time.strftime("%Y", time.localtime(time.time())) for (i, b) in enumerate(leapsecs): sys.stdout.write(" %s, // %s -> %s\n" % (b, unix_to_rfc822(b), label(i))) + sys.stdout.write("#define CENTURY_BASE\t%s00\n" % year[:2]) sys.stdout.write("#define LEAPSECOND_NOW\t%d\n" % (i-1)) sys.stdout.write("#define LEAPSECOND_B\t%s\n" % b) sys.stdout.write("#define LEAPSECOND_C\t%s\n" % c) @@ -78,10 +78,9 @@ their brains trying to come up with a solution that does not punt any cases. *****************************************************************************/ #include "gpsd.h" -#include "timebase.h" static double c_epochs[] = { -#include "leapcheck.h" +#include "timebase.h" }; #define DIM(a) (int)(sizeof(a)/sizeof(a[0])) diff --git a/timebase.h b/timebase.h deleted file mode 100644 index fd8f6e83..00000000 --- a/timebase.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _GPSD_TIMEBASE_H_ -#define _GPSD_TIMEBASE_H_ - -/* timebase.h -- constants that will require patching over time */ - -/* - * Default century. Gets used if the system clock value at startup - * time looks invalid. - */ -#define CENTURY_BASE 2000 - -/* timebase.h ends here */ -#endif /* _GPSD_TIMEBASE_H_ */ diff --git a/www/hacking.html b/www/hacking.html index 1e68ea4c..b14f1ce7 100644 --- a/www/hacking.html +++ b/www/hacking.html @@ -1407,39 +1407,36 @@ will have a day or so to get their urgent fixes in.</dd> <dd>It may need to be modified in configure.ac, and another autogen.sh done. Make sure the 'dev' suffix is gone.</dd> -<dt>5. Check timebase.h.</dt> -<dd>The value for default century may need to be adjusted.</dd> - -<dt>6. Rebuild leapcheck.i.</dt> <dd>Rebuild the leap-second list -used for rollover checks with 'make leapcheck.i' Note: This will +<dt>5. Rebuild leapcheck.cache.</dt> <dd>Rebuild the leap-second list +used for rollover checks with 'make leapcheck.cache' Note: This will require Internet access, and fail (leaving the existing leap-second list in place) if that is not available.</dd> -<dt>5. Update the NEWS file</dt> +<dt>6. Update the NEWS file</dt> <dd>Make sure the topmost entry in the changelog portion of gpsd.spec.in is up-to-date and properly timestamped.</dd> -<dt>6. Run the regression tests and other checks</dt> +<dt>7. Run the regression tests and other checks</dt> <dd>If it doesn't pass regressions, it isn't ready to ship. This is the time to run valgrind-audit, 'make splint', 'make xmllint', and 'make cppcheck' as well and check that those reports are clean. Use flocktest to verify operation on the remote test machines.</dd> -<dt>7. Ship to Berlios</dt> +<dt>8. Ship to Berlios</dt> <dd>Make the tarball (make dist) and upload to berlios.de (make upload-ftp), and do Berlios's <a href="https://developer.berlios.de/project/admin/?group_id=2116">release procedure</a>.</dd> -<dt>8. Tag the release in git</dt> +<dt>9. Tag the release in git</dt> <dd>Doing 'make release-tag' should accomplish this. The tag push will trigger mail to the announce list.</dd> -<dt>9. Bump the release number and push that commit</dt> +<dt>10. Bump the release number and push that commit</dt> <dd>Bump the release number in configure.ac, adding a '~dev' suffix so tarball instances pulled from the repo will be clearly distinguishable from the next public release.</dd> -<dt>10. Announce the release</dt> +<dt>11. Announce the release</dt> <dd>Announce the release, and the resumption of regular commits, on the dev list.</dd> </dl> |