Index: trunk/scconfig/hooks.c =================================================================== --- trunk/scconfig/hooks.c (revision 1337) +++ trunk/scconfig/hooks.c (revision 1338) @@ -15,7 +15,7 @@ #include #include -/*#define version "0.1.0-alpha"*/ +#define version "0.1.0-dev" #define REQ_LIBRND_MAJOR 3 #define REQ_LIBRND_MINOR 1 @@ -135,7 +135,18 @@ int hook_generate() { int generr = 0; + char *tmp, *rev = "non-svn"; + tmp = svn_info(0, "..", "Revision:"); + if (tmp != NULL) { + rev = str_concat("", "svn r", tmp, NULL); + free(tmp); + } + + logprintf(0, "scconfig generate version info: version='%s' rev='%s'\n", version, rev); + put("/local/revision", rev); + put("/local/version", version); + put("/local/pup/sccbox", "../../scconfig/sccbox"); printf("Generating src/libcschem/config.h... %s\n", IS_OK(&generr, tmpasm(NULL, "../src/libcschem/config.h.in", "../src/libcschem/config.h"))); Index: trunk/src/libcschem/config.h =================================================================== --- trunk/src/libcschem/config.h (revision 1337) +++ trunk/src/libcschem/config.h (revision 1338) @@ -22,4 +22,9 @@ #define GENGEO2D_TYPECFG "gengeo2d/typecfg_long_double.h" #define G2D_INLINE csch_inline + +/* Version number of package */ +#define CSCH_VERSION "0.1.0-dev" +#define CSCH_REVISION "svn r1173" + #endif Index: trunk/src/libcschem/config.h.in =================================================================== --- trunk/src/libcschem/config.h.in (revision 1337) +++ trunk/src/libcschem/config.h.in (revision 1338) @@ -34,5 +34,10 @@ @] print [@ + +/* Version number of package */ +#define CSCH_VERSION "@/local/version@" +#define CSCH_REVISION "@/local/revision@" + #endif @] Index: trunk/src/sch-rnd/build_run.c =================================================================== --- trunk/src/sch-rnd/build_run.c (revision 1337) +++ trunk/src/sch-rnd/build_run.c (revision 1338) @@ -60,10 +60,6 @@ rnd_gui->do_exit(rnd_gui); } -TODO("implement these in scconfig") -#define CSCH_VERSION "" -#define CSCH_REVISION "" - char *csch_get_info_program(void) { static gds_t info; Index: trunk/src/sch-rnd/main_act.c =================================================================== --- trunk/src/sch-rnd/main_act.c (revision 1337) +++ trunk/src/sch-rnd/main_act.c (revision 1338) @@ -174,10 +174,6 @@ return 0; } -TODO("implement these in scconfig") -#define CSCH_VERSION "" -#define CSCH_REVISION "" - static const char csch_acts_DumpVersion[] = "DumpVersion()"; static const char csch_acth_DumpVersion[] = "Dump version in script readable format."; fgw_error_t csch_act_DumpVersion(fgw_arg_t *res, int argc, fgw_arg_t *argv)