IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 6, 2009, 10:26:32 AM (17 years ago)
Author:
eugene
Message:

passing version info from env vars defined by psbuild

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/eam_branch_20090303/ppSub/src/ppSubVersion.c

    r23144 r23202  
    2222#include "ppSub.h"
    2323
    24 psString ppSubVersion(void)
    25 {
    2624#ifndef PPSUB_VERSION
    2725#error "PPSUB_VERSION is not set"
     
    3028#error "PPSUB_BRANCH is not set"
    3129#endif
    32     return psStringCopy(PPSUB_BRANCH "@" PPSUB_VERSION);
     30#ifndef PPSUB_SOURCE
     31#error "PPSUB_SOURCE is not set"
     32#endif
     33
     34#define xstr(s) str(s)
     35#define str(s) #s
     36
     37psString ppSubVersion(void)
     38{
     39    char *value = NULL;
     40    psStringAppend(&value, "%s@%s", xstr(PPSUB_BRANCH), xstr(PPSUB_VERSION));
     41    return value;
    3342}
    3443
    3544psString ppSubSource(void)
    3645{
    37 #ifndef PPSUB_SOURCE
    38 #error "PPSUB_SOURCE is not set"
    39 #endif
    40     return psStringCopy(PPSUB_SOURCE);
     46    return psStringCopy(xstr(PPSUB_SOURCE));
    4147}
    4248
Note: See TracChangeset for help on using the changeset viewer.