IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23795


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

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

Location:
trunk/ppArith
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppArith/configure.ac

    r23790 r23795  
    2626CFLAGS="${CFLAGS} -Wall -Werror"
    2727
    28 IPP_VERSION(PPARITH)
    29 AC_SUBST(PPARITH_VERSION,[$PPARITH_VERSION])
    30 AC_SUBST(PPARITH_BRANCH,[$PPARITH_BRANCH])
    31 AC_SUBST(PPARITH_SOURCE,[$PPARITH_SOURCE])
     28IPP_VERSION
    3229
    3330AC_SUBST([PPARITH_CFLAGS])
  • trunk/ppArith/src

    • Property svn:ignore
      •  

        old new  
        77.libs
        88ppArith
         9ppArithVersionDefinitions.h
  • trunk/ppArith/src/Makefile.am

    r23790 r23795  
    11bin_PROGRAMS = ppArith
    22
     3if HAVE_SVNVERSION
     4PSLIB_VERSION=`$(SVNVERSION) ../..`
     5else
     6PSLIB_VERSION="UNKNOWN"
     7endif
     8
     9if HAVE_SVN
     10PSLIB_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 }'`
     11PSLIB_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'`
     12else
     13PSLIB_BRANCH="UNKNOWN"
     14PSLIB_SOURCE="UNKNOWN"
     15endif
     16
    317# Force recompilation of ppArithVersion.c, since it gets the version information
    4 ppArithVersion.c: FORCE
    5         touch ppArith.c
     18ppArithVersion.c: ppArithVersionDefinitions.h
     19ppArithVersionDefinitions.h: ppArithVersionDefinitions.h.in FORCE
     20        -$(RM) ppArithVersionDefinitions.h
     21        $(SED) -e "s|@PPARITH_VERSION@|\"$(PPARITH_VERSION)\"|" -e "s|@PPARITH_BRANCH@|\"$(PPARITH_BRANCH)\"|" -e "s|@PPARITH_SOURCE@|\"$(PPARITH_SOURCE)\"|" ppArithVersionDefinitions.h.in > ppArithVersionDefinitions.h
    622FORCE: ;
    723
    8 ppArith_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PPARITH_CFLAGS) -DPPARITH_VERSION=$(PPARITH_VERSION) -DPPARITH_BRANCH=$(PPARITH_BRANCH) -DPPARITH_SOURCE=$(PPARITH_SOURCE)
     24BUILT_SOURCES = ppArithVersionDefinitions.h
     25
     26
     27ppArith_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PPARITH_CFLAGS)
    928ppArith_LDFLAGS  = $(PSLIB_LIBS)   $(PSMODULE_LIBS)   $(PPSTATS_LIBS)   $(PSPHOT_LIBS)   $(PPARITH_LIBS)
    1029
  • trunk/ppArith/src/ppArithVersion.c

    r23289 r23795  
    2121
    2222#include "ppArith.h"
     23#include "ppArithVersionDefinitions.h"
    2324
    2425#ifndef PPARITH_VERSION
     
    3233#endif
    3334
    34 #define xstr(s) str(s)
    35 #define str(s) #s
    36 
    3735psString ppArithVersion(void)
    3836{
    3937    char *value = NULL;
    40     psStringAppend(&value, "%s@%s", xstr(PPARITH_BRANCH), xstr(PPARITH_VERSION));
     38    psStringAppend(&value, "%s@%s", PPARITH_BRANCH, PPARITH_VERSION);
    4139    return value;
    4240}
     
    4442psString ppArithSource(void)
    4543{
    46     return psStringCopy(xstr(PPARITH_SOURCE));
     44    return psStringCopy(PPARITH_SOURCE);
    4745}
    4846
Note: See TracChangeset for help on using the changeset viewer.