IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23806


Ignore:
Timestamp:
Apr 9, 2009, 10:57:59 PM (17 years ago)
Author:
Paul Price
Message:

Making version information not dependent upon running configure, but on make.

Location:
trunk/pswarp
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/configure.ac

    r23790 r23806  
    3737echo "PSWARP_LIBS: $PSWARP_LIBS"
    3838
    39 IPP_VERSION(PSWARP)
    40 AC_SUBST(PSWARP_VERSION,[$PSWARP_VERSION])
    41 AC_SUBST(PSWARP_BRANCH,[$PSWARP_BRANCH])
    42 AC_SUBST(PSWARP_SOURCE,[$PSWARP_SOURCE])
     39IPP_VERSION
    4340
    4441AC_SUBST([PSWARP_CFLAGS])
  • trunk/pswarp/src

    • Property svn:ignore
      •  

        old new  
        1313config.h.in
        1414stamp-h1
         15pswarpVersionDefinitions.h
  • trunk/pswarp/src/Makefile.am

    r23790 r23806  
    11bin_PROGRAMS = pswarp
    22
     3if HAVE_SVNVERSION
     4PSWARP_VERSION=`$(SVNVERSION) ../..`
     5else
     6PSWARP_VERSION="UNKNOWN"
     7endif
     8
     9if HAVE_SVN
     10PSWARP_BRANCH=`$(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 }'`
     11PSWARP_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'`
     12else
     13PSWARP_BRANCH="UNKNOWN"
     14PSWARP_SOURCE="UNKNOWN"
     15endif
     16
    317# Force recompilation of pswarpVersion.c, since it gets the version information
    4 pswarpVersion.c: FORCE
    5         touch pswarpVersion.c
     18pswarpVersion.c: pswarpVersionDefinitions.h
     19pswarpVersionDefinitions.h: pswarpVersionDefinitions.h.in FORCE
     20        -$(RM) pswarpVersionDefinitions.h
     21        $(SED) -e "s|@PSWARP_VERSION@|\"$(PSWARP_VERSION)\"|" -e "s|@PSWARP_BRANCH@|\"$(PSWARP_BRANCH)\"|" -e "s|@PSWARP_SOURCE@|\"$(PSWARP_SOURCE)\"|" pswarpVersionDefinitions.h.in > pswarpVersionDefinitions.h
    622FORCE: ;
    723
    8 pswarp_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PSWARP_CFLAGS) -DPSWARP_VERSION=\"$(PSWARP_VERSION)\" -DPSWARP_BRANCH=\"$(PSWARP_BRANCH)\" -DPSWARP_SOURCE=\"$(PSWARP_SOURCE)\"
     24pswarp_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PSWARP_CFLAGS)
    925pswarp_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PPSTATS_LIBS) $(PSPHOT_LIBS) $(PSWARP_LIBS)
    1026
  • trunk/pswarp/src/pswarpVersion.c

    r23595 r23806  
    2020#include <ppStats.h>
    2121
    22 psString pswarpVersion(void)
    23 {
     22#include "pswarp.h"
     23#include "pswarpVersionDefinitions.h"
     24
    2425#ifndef PSWARP_VERSION
    2526#error "PSWARP_VERSION is not set"
     
    2829#error "PSWARP_BRANCH is not set"
    2930#endif
    30     return psStringCopy(PSWARP_BRANCH "@" PSWARP_VERSION);
     31#ifndef PSWARP_SOURCE
     32#error "PSWARP_SOURCE is not set"
     33#endif
     34
     35psString pswarpVersion(void)
     36{
     37    char *value = NULL;
     38    psStringAppend(&value, "%s@%s", PSWARP_BRANCH, PSWARP_VERSION);
     39    return value;
    3140}
    3241
    3342psString pswarpSource(void)
    3443{
    35 #ifndef PSWARP_SOURCE
    36 #error "PSWARP_SOURCE is not set"
    37 #endif
    3844    return psStringCopy(PSWARP_SOURCE);
    3945}
Note: See TracChangeset for help on using the changeset viewer.