IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2009, 3:41:26 PM (17 years ago)
Author:
beaumont
Message:

sync with trunk

Location:
branches/cnb_branches/cnb_branch_20090215
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090215

  • branches/cnb_branches/cnb_branch_20090215/psastro/src/Makefile.am

    r23199 r23239  
    11lib_LTLIBRARIES = libpsastro.la
    22
    3 PSASTRO_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi`
    4 PSASTRO_BRANCH=`if [ -e ../../BRANCH ]; then cat ../../BRANCH; else svn info | sed -n -e '/URL:/ h' -e '/Repository Root:/ { x; H; x; s|Repository Root: \(.*\)\nURL: \1\(.*\)|\2| ; s|^/|| ; s|/[a-zA-Z]*/src.*|| ; p }'; fi`
    5 PSASTRO_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi`
     3libpsastro_la_CFLAGS = $(PSASTRO_CFLAGS) $(PPSTATS_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS) -DPSASTRO_VERSION=$(SVN_VERSION) -DPSASTRO_BRANCH=$(SVN_BRANCH) -DPSASTRO_SOURCE=$(SVN_SOURCE)
     4libpsastro_la_LDFLAGS = $(PSASTRO_LIBS) $(PPSTATS_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS)
    65
    76# Force recompilation of psastroVersion.c, since it gets the version information
    8 psastroVersion.c: FORCE
    9         touch psastroVersion.c
    10 FORCE: ;
    11 
    12 libpsastro_la_CFLAGS = $(PSASTRO_CFLAGS) $(PPSTATS_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS) -DPSASTRO_VERSION=\"$(PSASTRO_VERSION)\" -DPSASTRO_BRANCH=\"$(PSASTRO_BRANCH)\" -DPSASTRO_SOURCE=\"$(PSASTRO_SOURCE)\"
    13 libpsastro_la_LDFLAGS = $(PSASTRO_LIBS) $(PPSTATS_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS)
     7# can we do this with dependency info?
     8# psastroVersion.c: FORCE
     9# touch psastroVersion.c
     10# FORCE: ;
    1411
    1512bin_PROGRAMS = psastro psastroModel psastroModelFit gpcModel
  • branches/cnb_branches/cnb_branch_20090215/psastro/src/psastroVersion.c

    r23199 r23239  
    1010#include "psastroInternal.h"
    1111
    12 psString psastroVersion(void)
    13 {
    1412#ifndef PSASTRO_VERSION
    1513#error "PSASTRO_VERSION is not set"
     
    1816#error "PSASTRO_BRANCH is not set"
    1917#endif
    20     return psStringCopy(PSASTRO_BRANCH "@" PSASTRO_VERSION);
     18#ifndef PSASTRO_SOURCE
     19#error "PSASTRO_SOURCE is not set"
     20#endif
     21
     22#define xstr(s) str(s)
     23#define str(s) #s
     24
     25psString psastroVersion(void)
     26{
     27    char *value = NULL;
     28    psStringAppend(&value, "%s@%s", xstr(PSASTRO_BRANCH), xstr(PSASTRO_VERSION));
     29    return value;
    2130}
    2231
    2332psString psastroSource(void)
    2433{
    25 #ifndef PSASTRO_SOURCE
    26 #error "PSASTRO_SOURCE is not set"
    27 #endif
    28     return psStringCopy(PSASTRO_SOURCE);
     34  return psStringCopy(xstr(PSASTRO_SOURCE));
    2935}
    3036
Note: See TracChangeset for help on using the changeset viewer.