summaryrefslogtreecommitdiff
path: root/SConstruct
Commit message (Collapse)AuthorAgeFilesLines
* Initial creation of os_compat.h.Fred Wright2017-01-221-51/+0
| | | | | | | | | | | | | | | | | This creates a header for os_compat.c, and moves the related prototypes into it from gpsd_config.h (as created by SConstruct), after adding references to it to gpsd.h (via gpsd.h-tail) and a few other sources that need it but don't include gpsd.h. It also removes includes of <time.h> in the places where they were only needed for the code now removed from gpsd_config.h. TESTED: Ran "scons build-all check" on OSX 10.9 (with strlcat/strlcpy but no clock_gettime), OSX 10.12 (with strlcat/strlcpy and clock_gettime), and Ubuntu 14 (with clock_gettime but no strlcat/strlcpy). Also verified that fallback versions were not being included where unnecessary.
* Initial edit and use of new os_compat.c.Fred Wright2017-01-221-5/+5
| | | | | | | | | | | | | | This change: 1) Makes a few comment-only edits to os_compat.c. 2) Updates the build procedure to use os_compat.c in libgps and in the Python extensions. 3) Deletes the now-obsolete clock_gettime.c, daemon.c, and strl.c. TESTED: Ran "scons build-all check" on OSX 10.9 and Ubuntu 14.
* Unreverts "Work around yet another scons fuckup."Fred Wright2017-01-031-2/+49
| | | | | | | | | | Temporarily reinstating the CheckFunc hack, pending further investigation. TESTED: Verified that the only differences in SConstruct across the revert/unrevert are the minor intervening changes. Ran "build-all check" on OSX.
* Typo fix.Eric S. Raymond2017-01-021-1/+1
|
* Time-service build needs to have magic_hat on.Eric S. Raymond2017-01-021-1/+1
| | | | Otherwise we get mysterious failures on Raspberry Pis.
* Decouples Python selection from SCons Python.Fred Wright2016-12-281-1/+1
| | | | | | | | | | | This changes the default value of the target_python option to 'python', i.e. the system default Python. The former blank default based the selection on the SCons Python, which is guaranteed not to be the system default Python if the latter is any Python 3. TESTED: Running xgps now works when the default Python is Python 3, without explicitly specifying target_python.
* Reverts "Work around yet another scons fuckup."Fred Wright2016-12-261-49/+2
| | | | | | | | | | | | Although the exact nature of the original problem is neither fully understood nor easily reproducible, the change that moved the warning setup toward the end of the Configure section makes the "CheckFunc for strict prototypes" hack almost certainly unnecessary. TESTED: Ran "scons build-all check" on four versions of OSX and two versions of Linux, as well as FreeBSD, OpenBSD, and NetBSD.
* Fixes build problem with magic_hat=yes but no KPPS header.Fred Wright2016-12-241-10/+13
| | | | | | | | | | | | | | | | The MAGIC_HAT code was always pointless without KPPS support, but the recent change to skip the "fake PPS" device caused it to reference a function which is not defined without KPPS support. The fix is to disable MAGIC_HAT altogether in this case. Doing this required moving the PPS-related configure checks earlier, so that the magic_hat option can be turned off before it gets exported to the config file. TESTED: Built (on Ubuntu) both with and without sys/timepps.h, and verified correct setup in gpsd_config.h, as well as successful builds. Also ran "scons check" for good measure (in both cases).
* Makes MAGIC_HAT kludge optional.Fred Wright2016-12-221-1/+4
| | | | | | | | | | | | | | This adds a build option called 'magic_hat', and makes the code for MAGIC_HAT_GPS and MAGIC_LINK_GPS conditional on it. It currently defaults to True on Linux and False otherwise. It's meaningless on non-Linux platforms, though at present there are no conditionally-present options, so this one is also present on all platforms. TESTED: Tested on a Beaglebone Black with suitable symlinks added (and running a kernel with PPS_CLIENT_KTIMER turned off. Verified that the kludge behaves as intended when enabled, and is inoperative when disabled.
* Fixes cleaning bug introduced by LIBPATH change.Fred Wright2016-12-201-1/+3
| | | | | | | | | | | | | | Although the LIBPATH override removal wasn't bad per se, it exacerbated a bug where the standard LIBPATH setup was being bypassed in the "cleaning or helping" cases, causing many targets to mismatch for cleanup. That was missed due to not including a "cleanup test" in the testing. The fix is simply to move the LIBPATH setup out of the conditional area. TESTED: Ran scons "build-all check" followed by "scons -c" and then "git clean -dxf", and verified that now only the usual scons-internal files remain after cleanup.
* Removes LIBPATH overrides.Fred Wright2016-12-201-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | Commit 6e1d6bd6 added "LIBPATH='.'" overrides to most build setups, though the purpose was unclear. The SConstruct script already sets up LIBPATH to include the current directory, as well as the sysroot directory when that option is being used. It also includes the directory for the dbus library when applicable, though that is also passed via the dbusflags variable where needed. That change used to break dbus linking on non-Linux platforms. It no longer does so after fixing the dbusflags setup, but cross-linking may still be broken by the sysroot removal. In any case, it seems rather pointless to both set up and then discard a proper LIBPATH value. It's also worth noting that commit 6e1d6bd6 also switched from dynamic linking to static linking, eliminating any long-term effect of the LIBPATH choice. The LIBPATH overrides may have been an unsuccessful attempt to make dynamic linking work without chrpath. TESTED: Tested builds and ran regression tests on all OSX versions from 10.5 through 10.12, as well as Ubuntu 14.04.1, CentOS 7, FreeBSD 10.3, OpenBSD 5.6, and NetBSD 6.1.5.
* Moves compiler warning Configure setup later.Fred Wright2016-12-181-11/+13
| | | | | | | | | | | | | | | | | This change defers the conditional enabling of various compiler warnings until after various other Configure checks are performed, for a couple of reasons: 1) It reduces the noise in config.log, by not having warnings come from the more substantive Configure checks. 2) It *may* avoid the CheckFunc problem with -Wstrict_prototypes without having to rewrite it, though that hasn't been confirmed. TESTED: Ran "scons build-all check" with this change successfully. Also compared before and after versions of config.log, seeing expected improvements and nothing unreasonable.
* Removes two redundant or troublesome compile flags.Fred Wright2016-12-181-6/+0
| | | | | | | | | | | | | | | | | | The two flags -Wmissing-prototypes and -Wmissing-declarations were being both conditionally included after a validity test, and then unconditionally included later. In cases where they were acceptable, that resulted in doubly including them, and in cases where they were unacceptable, that meant breaking the build. The fix is simply to remove the unconditional adds. This is a necessary but not sufficient condition for building with CC=c99 to work. TESTED: Ran "scons build-all check" on OSX, and verified that the two flags were still present in the appropriate commands, but now only once. Also verified that building with CC=c99 no longer fails in a manner related to those flags.
* Increases debug level to 3 in debug build.Fred Wright2016-12-181-1/+1
| | | | | | | | | Debug level 3 makes macro definitions available to the debugger, which can be useful. Given that debug=yes is only used when necessary, there's no reason to be stingy with the debug info when it is. TESTED: Ran a debug build and observed "-g3" in the command lines.
* Fixes gratuitous rebuild in non-git directories.Fred Wright2016-12-181-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code that generates the version string for development versions tries to identify the specific code state in one of two ways. When the build is within a git repo, it uses "git describe" output. When the build is not within a git repo, it uses the date and time. Before this change, the applicable date and time was the current date and time, causing revision.h and everything that depends on it to be rebuilt every time, even if no sources changed. This change causes it to use the latest mtime among the relevant sources instead, thus still having the desired effect without unnecessary changes in the version string. Since git doesn't preserve mtimes, the resulting date/time may reflect the last checkout of the relevant files rather than the last actual change, but this is still a vast improvement. And recent versions of git avoid clobbering the mtimes of files that are not actually altered by the checkout. This change also alters the version format somewhat in this case, both to incorporate the actual version number, and to eliminate some truncation which was probably slightly incorrect, anyway. A sample new format is: "3.17~dev-2016-09-24T19:06:46" TESTED: Tested both git and non-git cases. Did not test the non-"dev" case, but that code path is untouched.
* Fixes some build failures of test_gpsmm.Fred Wright2016-12-181-1/+2
| | | | | | | | | | | | | | The clock_gettime() function was originally a "second-tier" library function in Linux, implemented in librt and requiring "-lrt" when linking. Later versions moved it to libc, with the "-lrt" being unnecessary. The build recipe for test_gpsmm here was failing to account for the optional need for the "-lrt", causing it to fail to build on debian Wheezy. TESTED: Now passes "scons build-all check" on a Beaglebone Black running Debian Wheezy, where test_gpsmm formerly failed to build. Also retested on OSX 10.9 (where librt doesn't exist) for good measure.
* Fix the upload address for thev CGI form.Eric S. Raymond2016-09-021-1/+1
|
* Stop forcing C99 and POSIX 2001.Gary E. Miller2016-08-161-2/+2
| | | | Sigh...
* Enforce POSIX 2001 by default.Gary E. Miller2016-08-151-1/+1
| | | | All regression tests pass.
* Force C99 with -D_ISOC99_SOURCEGary E. Miller2016-08-151-1/+1
| | | | | | | | Wow, that smoked out a ton of deprecated stuff. bcopy(), bzero, usleep(), etc. Better now at leasure than when under the gun later. All regressions pass.
* Prepare to insis on C99 and POSIX 2001.Gary E. Miller2016-08-151-0/+6
| | | | Sadly, gpsd fails when these are enabled.
* Fixes cleaning and manpage building for ppscheck.Fred Wright2016-08-101-4/+5
| | | | | | | | | | | | | | | | For cleaning (and helping) purposes, tiocmiwait can be set unconditionally true, since the (usually nonexistent) program can be cleaned on any platform. This change also avoids building (and installing) the ppscheck manpage when the program isn't being built. TESTED: Ran "scons build-all check", "sudo scons install", "sudo scons uninstall", "scons -h", and "scons -c" on both OSX and Linux, verifying correct behavior. Signed-off-by: Gary E. Miller <gem@rellim.com>
* Make sure tiocmiwait is setGary E. Miller2016-08-091-0/+3
|
* Only build ppscheck when TIOCMIWAIT is available.Gary E. Miller2016-08-091-2/+4
|
* Make ppcheck a full fledged program, with man page.Gary E. Miller2016-07-281-2/+7
| | | | | This tool makes it easy for the newbie to unambiguous verify that his GPS has PPS.
* Include socket_export in timeserice builds...Eric S. Raymond2016-05-231-1/+1
| | | | ...so the GPS can be monitored when ntod is running.
* Better fix for timeservice build.Eric S. Raymond2016-05-181-9/+7
|
* Attempt fix for timservice build bug.Eric S. Raymond2016-05-181-2/+2
|
* Document a known bug in minimal and timeservice builds.Eric S. Raymond2016-05-181-2/+5
|
* Correctly handle 'timeserver=yes' followed by NMEA-dependent driver.Eric S. Raymond2016-05-121-0/+18
|
* Im[p;ement and document /dev/gpsd0 side effect.Eric S. Raymond2016-05-101-1/+3
|
* Cleverer version of the MAGIC_HAT_GPS kluge...Eric S. Raymond2016-05-101-3/+2
| | | | ...will work on BeagleBone and Odroid.
* Make the build a little better about selective installation.Eric S. Raymond2016-05-081-14/+14
|
* Implement 'timeservice' build option. Document it in the Time Sevice HOWTO.Eric S. Raymond2016-05-071-2/+14
|
* Fix build errors by adding a return which went missing.Bernd Zeimetz2016-05-021-0/+1
|
* Buildflags need to be splitted into an array.Bernd Zeimetz2016-05-011-1/+1
|
* Work around yet another scons fuckup.Bernd Zeimetz2016-05-011-2/+48
| | | | | Scons' CheckFunc does not work with recent compiler versions and -Wstrict-prototypes being enabled.
* time.h on linux defines __timespec_defined.Bernd Zeimetz2016-05-011-2/+4
| | | | | Enhance the check for struct timespec as building in Debian unstable fails otherwise.
* Give ODROID C2 users some hope of getting HAT autodetection of pps0 right.Eric S. Raymond2016-04-261-0/+8
|
* Fixes uninstall to remove Python package directory.Fred Wright2016-04-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Uninstall was removing the contents of the Python package directory, but not the directory itself. There's an asymmetry where an unmentioned directory is created automatically when needed, but not removed when it's rendered empty. In Python 2, this is a fairly harmless error, albeit slightly unclean, since directories lacking an __init__.py file are ignored by the import logic. But in Python 3, which allows the init file to be omitted, leaving the empty directory around causes "import gps" to apparently succeed and create an empty "namespace" module. Not only does this confuse programs attempting to detect import failures, but it also prevents a future import from working even after adjusting sys.path, since reimporting an already imported module is a NOP. The fix is simply to include the directory explicitly in the list for python_install. This has no actual effect on the install, but includes the directory in the uninstall. TESTED: Ran install/uninstall and verified that the directory is now removed by the uninstall.
* Adds fallback for target_python handling with older scons.Fred Wright2016-04-141-3/+11
| | | | | | | | | | | | | | The CheckProg function is a relatively recent addition to scons, and is missing from, e.g., scons 2.3.0. It's worth using it to simplify the error case, but fallback code is needed to allow building with a nonempty target_python option and an older scons. This fix makes it work correctly in the non-error case, and also avoids crashing the build in the common error case, albeit without avoiding duplicate error messages. TESTED: Ran "scons -c" with blank, valid, and invalid target_python values both on OSX with scons 2.4.1 and Linux with scons 2.3.0.
* Bump the shared library version to go with the GPSD_API bump.Gary E. Miller2016-04-131-1/+1
|
* Fixes SConstruct clean/help/minimal bugs from commit 1c26179.Fred Wright2016-04-091-21/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because the new Python config setup wasn't being run in the cleaning or helping cases, certain variables that were still being referenced weren't being defined, causing scons to crash. There are two different cases: 1) In the cleaning case, it's actually necessary to run the Python config code, because some of the filenames to be cleaned may be affected by the config values. This reworks things to run that portion of the config section even in the cleaning case, though with a slight tweak to make a couple of the messages less verbose. 2) In the helping case, nothing related to building is actually needed, but providing valid values is easier than fixing all the places that need them. To avoid having to run a possible external target Python, it obtains the values unconditionally from the scons Python in this case. Also, the minimal build was broken due to a couple of lines of code being inappropriately included in the python=no case. That is now fixed as well. TESTED: Ran "scons build-all check", "scons -c" and "scons -h", with and without a target_python specified, and with and without minimal=yes. All cases work, and no "cleaning leaks" were observed. Also ran the broken-build checker up through length 1, seeing only the two long-standing failures, plus two (relatively) new ones that are almost certainly unrelated to this change.
* Adds "target Python" support to SConstruct.Fred Wright2016-04-091-43/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a target_python option to allow building for a specific Python version which may differ from the Python running scons. If blank (currently the default), it uses the scons Python as before, but otherwise it's expected to be a command to launch some version of Python. In the latter case, all Python-related configuration parameters are obtained by running the specified Python as an external program. The primary effect of this is to allow the C extensions to be built appropriately for a given Python version, but it also means that all Python code used for tests is executed with the target Python (which is necessary in some cases, and desirable for consistency in all cases). However, any Python programs executed purely as build helpers are executed with the scons Python for consistency. Note that any "pure Python" programs run from the build directory can be run with any compatible Python version, but programs using the C extensions will only work with Python versions compatible with the target_python used when building. The built C extensions may or may not use versioned naming, depending on how the target Python specifies the configuration. The default value of python_libdir is no longer the libdir for the scons Python, but instead the default blank value specifies that the actual value should be obtained from the target Python. It should rarely be appropriate to modify this value. TESTED: Ran "scons build-all check valgrind-audit" with the default Python (2.7) and with all six available compatible versions (2.6-2.7 and 3.2-3.5). Also ran gegps, gpscat, gpsprof, xgps, and xgpsspeed in the same circumstances. Except for xgps and xgpsspeed with 2.6, which doesn't work due to py-gobject3 unavailability for 2.6, everything worked correctly.
* Add driver_skytraq.c.Gary E. Miller2016-03-291-0/+1
| | | | It grabs packets, but does not decode any yet.
* Add SKYTRAQ_ENABLE to scons. To decode Skytraq proprietary NMEA.Gary E. Miller2016-03-281-0/+1
|
* SConstruct: make spaces around ellipses consistentPaul Fertser2016-03-281-5/+5
| | | | | | | Upstream SCons tests have no space before the ellipses and a space after, bring gpsd tests in line with that for the visual consistency. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
* Adds Python 3 .pyc cache directory to clean list.Fred Wright2016-03-271-1/+2
| | | | | TESTED: Verified that "scons -c" now removes all of gps/__pycache__.
* De-templatize three files that didn't need it.Eric S. Raymond2016-03-261-1/+1
|
* Make website upload less noisy.Eric S. Raymond2016-03-241-2/+2
|