comparison libinterp/corefcn/toplev.cc @ 21597:fe1447ae68cf

Add more info to version.m and store build info in the binary (bug #45659) * build-info.in.cc, build-info.h: New files. * mk-build-info-h.in.sh: New script. * configure.ac, Makefile.am: Update. * module.mk (update_hg_id, libinterp/build-info.cc): New rules. * version.m: Also return release date. Add input argument. * toplev.cc (F__octave_config_info__): New fields, builddate, buildtime, hgid, releasedate.
author mmuetzel <markus.muetzel@gmx.de>
date Fri, 08 Apr 2016 21:41:18 +0200
parents be1c9f1e31ab
children cf552443c104
comparison
equal deleted inserted replaced
21596:07d30e6fcfde 21597:fe1447ae68cf
49 #include "quit.h" 49 #include "quit.h"
50 #include "singleton-cleanup.h" 50 #include "singleton-cleanup.h"
51 #include "str-vec.h" 51 #include "str-vec.h"
52 52
53 #include "build-env.h" 53 #include "build-env.h"
54 #include "build-info.h"
54 #include "defaults.h" 55 #include "defaults.h"
55 #include "defun.h" 56 #include "defun.h"
56 #include "error.h" 57 #include "error.h"
57 #include "file-io.h" 58 #include "file-io.h"
58 #include "graphics.h" 59 #include "graphics.h"
1420 #endif 1421 #endif
1421 1422
1422 { "api_version", OCTAVE_API_VERSION }, 1423 { "api_version", OCTAVE_API_VERSION },
1423 { "archlibdir", subst_octave_home (OCTAVE_ARCHLIBDIR) }, 1424 { "archlibdir", subst_octave_home (OCTAVE_ARCHLIBDIR) },
1424 { "bindir", subst_octave_home (OCTAVE_BINDIR) }, 1425 { "bindir", subst_octave_home (OCTAVE_BINDIR) },
1426 { "builddate", oct_build_date () },
1427 { "buildtime", oct_build_time () },
1425 { "canonical_host_type", OCTAVE_CANONICAL_HOST_TYPE }, 1428 { "canonical_host_type", OCTAVE_CANONICAL_HOST_TYPE },
1426 { "datadir", subst_octave_home (OCTAVE_DATADIR) }, 1429 { "datadir", subst_octave_home (OCTAVE_DATADIR) },
1427 { "datarootdir", subst_octave_home (OCTAVE_DATAROOTDIR) }, 1430 { "datarootdir", subst_octave_home (OCTAVE_DATAROOTDIR) },
1428 { "exec_prefix", subst_octave_home (OCTAVE_EXEC_PREFIX) }, 1431 { "exec_prefix", subst_octave_home (OCTAVE_EXEC_PREFIX) },
1429 { "fcnfiledir", subst_octave_home (OCTAVE_FCNFILEDIR) }, 1432 { "fcnfiledir", subst_octave_home (OCTAVE_FCNFILEDIR) },
1433 { "hgid", oct_hg_id () },
1430 { "imagedir", subst_octave_home (OCTAVE_IMAGEDIR) }, 1434 { "imagedir", subst_octave_home (OCTAVE_IMAGEDIR) },
1431 { "includedir", subst_octave_home (OCTAVE_INCLUDEDIR) }, 1435 { "includedir", subst_octave_home (OCTAVE_INCLUDEDIR) },
1432 { "infodir", subst_octave_home (OCTAVE_INFODIR) }, 1436 { "infodir", subst_octave_home (OCTAVE_INFODIR) },
1433 { "infofile", subst_octave_home (OCTAVE_INFOFILE) }, 1437 { "infofile", subst_octave_home (OCTAVE_INFOFILE) },
1434 { "libdir", subst_octave_home (OCTAVE_LIBDIR) }, 1438 { "libdir", subst_octave_home (OCTAVE_LIBDIR) },
1451 { "octetcdir", subst_octave_home (OCTAVE_OCTETCDIR) }, 1455 { "octetcdir", subst_octave_home (OCTAVE_OCTETCDIR) },
1452 { "octincludedir", subst_octave_home (OCTAVE_OCTINCLUDEDIR) }, 1456 { "octincludedir", subst_octave_home (OCTAVE_OCTINCLUDEDIR) },
1453 { "octlibdir", subst_octave_home (OCTAVE_OCTLIBDIR) }, 1457 { "octlibdir", subst_octave_home (OCTAVE_OCTLIBDIR) },
1454 { "octtestsdir", subst_octave_home (OCTAVE_OCTTESTSDIR) }, 1458 { "octtestsdir", subst_octave_home (OCTAVE_OCTTESTSDIR) },
1455 { "prefix", subst_octave_home (OCTAVE_PREFIX) }, 1459 { "prefix", subst_octave_home (OCTAVE_PREFIX) },
1460 { "releasedate", OCTAVE_RELEASE_DATE },
1456 { "startupfiledir", subst_octave_home (OCTAVE_STARTUPFILEDIR) }, 1461 { "startupfiledir", subst_octave_home (OCTAVE_STARTUPFILEDIR) },
1457 { "version", OCTAVE_VERSION }, 1462 { "version", OCTAVE_VERSION },
1458 { 0, octave_value () } 1463 { 0, octave_value () }
1459 }; 1464 };
1460 1465