- Timestamp:
- May 26, 2009, 1:59:32 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 13 edited
- 1 copied
-
. (modified) (1 prop)
-
psModules (modified) (1 prop)
-
psModules/src/config (modified) (1 prop)
-
psModules/src/config/Makefile.am (modified) (2 diffs)
-
psModules/src/config/pmConfig.c (modified) (2 diffs)
-
psModules/src/config/pmConfigDump.c (modified) (1 diff)
-
psModules/src/config/pmConfigDump.h (modified) (1 diff)
-
psModules/src/config/pmConfigRecipes.c (modified) (7 diffs)
-
psModules/src/config/pmConfigRun.c (modified) (6 diffs)
-
psModules/src/config/pmConfigRun.h (modified) (1 diff)
-
psModules/src/config/pmErrorCodes.dat (modified) (1 diff)
-
psModules/src/config/pmErrorCodes.h.in (modified) (1 diff)
-
psModules/src/config/pmVersion.c (modified) (3 diffs)
-
psModules/src/config/pmVersionDefinitions.h.in (copied) (copied from trunk/psModules/src/config/pmVersionDefinitions.h.in )
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/psModules
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/psModules/src/config
- Property svn:ignore
-
old new 7 7 pmErrorCodes.c 8 8 pmErrorCodes.h 9 pmVersionDefinitions.h
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/Makefile.am
r23351 r24244 1 1 noinst_LTLIBRARIES = libpsmodulesconfig.la 2 2 3 # PSMODULES_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 # PSMODULES_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 # PSMODULES_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 3 if HAVE_SVNVERSION 4 PSMODULES_VERSION=`$(SVNVERSION) ../..` 5 else 6 PSMODULES_VERSION="UNKNOWN" 7 endif 8 9 if HAVE_SVN 10 PSMODULES_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 }'` 11 PSMODULES_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'` 12 else 13 PSMODULES_BRANCH="UNKNOWN" 14 PSMODULES_SOURCE="UNKNOWN" 15 endif 6 16 7 17 # Force recompilation of pmVersion.c, since it gets the version information 8 # pmVersion.c: FORCE 9 # touch pmVersion.c 10 # FORCE: ; 18 pmVersion.c: pmVersionDefinitions.h 19 pmVersionDefinitions.h: pmVersionDefinitions.h.in FORCE 20 -$(RM) pmVersionDefinitions.h 21 $(SED) -e "s|@PSMODULES_VERSION@|\"$(PSMODULES_VERSION)\"|" -e "s|@PSMODULES_BRANCH@|\"$(PSMODULES_BRANCH)\"|" -e "s|@PSMODULES_SOURCE@|\"$(PSMODULES_SOURCE)\"|" pmVersionDefinitions.h.in > pmVersionDefinitions.h 22 FORCE: ; 11 23 12 libpsmodulesconfig_la_CPPFLAGS = $(SRCINC) $(PSMODULES_CFLAGS) -DPSMODULES_VERSION=$(SVN_VERSION) -DPSMODULES_BRANCH=$(SVN_BRANCH) -DPSMODULES_SOURCE=$(SVN_SOURCE)24 libpsmodulesconfig_la_CPPFLAGS = $(SRCINC) $(PSMODULES_CFLAGS) 13 25 libpsmodulesconfig_la_LDFLAGS = -release $(PACKAGE_VERSION) 14 26 libpsmodulesconfig_la_SOURCES = \ … … 35 47 36 48 # Error codes. 37 BUILT_SOURCES = pmErrorCodes.h pmErrorCodes.c 38 CLEANFILES = *~ pmErrorCodes.h pmErrorCodes.c 49 BUILT_SOURCES = pmErrorCodes.h pmErrorCodes.c pmVersionDefinitions.h 50 CLEANFILES = *~ pmErrorCodes.h pmErrorCodes.c pmVersionDefinitions.h 39 51 40 52 pmErrorCodes.h : pmErrorCodes.dat pmErrorCodes.h.in -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfig.c
r23594 r24244 551 551 psWarning("Unable to resolve log destination: %s --- ignored", logDest); 552 552 } else { 553 pmConfigRunFilenameAddWrite(config, "LOG", logDest); 553 554 config->logFD = psMessageDestination(resolved); 554 555 } … … 609 610 psWarning("Unable to resolve trace destination: %s --- ignored", traceDest); 610 611 } else { 612 pmConfigRunFilenameAddWrite(config, "TRACE", traceDest); 611 613 config->traceFD = psMessageDestination(resolved); 612 614 } -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigDump.c
r23351 r24244 138 138 139 139 140 bool pmConfigDump(const pmConfig *config, const pmFPA *source, constchar *filename)140 bool pmConfigDump(const pmConfig *config, const char *filename) 141 141 { 142 142 PS_ASSERT_PTR_NON_NULL(config, false); -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigDump.h
r19399 r24244 31 31 /// 32 32 bool pmConfigDump(const pmConfig *config, ///< Configuration to dump 33 const pmFPA *source, ///< Source FPA, defines the level for the file rule34 33 const char *filename ///< Output file name 35 34 ); -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigRecipes.c
r23351 r24244 81 81 psTrace ("psModules.config", 3, "read recipes from camera config"); 82 82 } else { 83 ps LogMsg("psModules.config", PS_LOG_DETAIL, "no recipe supplied by camera config");83 psTrace ("psModules.config", PS_LOG_DETAIL, "no recipe supplied by camera config"); 84 84 } 85 85 } … … 97 97 psTrace ("psModules.config", 3, "read recipes from symbolic references"); 98 98 } else { 99 ps LogMsg("psModules.config", PS_LOG_DETAIL, "no recipe supplied by symbolic reference");99 psTrace ("psModules.config", PS_LOG_DETAIL, "no recipe supplied by symbolic reference"); 100 100 } 101 101 … … 105 105 return false; 106 106 } 107 ps LogMsg("psModules.config", PS_LOG_DETAIL, "merged camera recipes with system recipes");107 psTrace ("psModules.config", PS_LOG_DETAIL, "merged camera recipes with system recipes"); 108 108 109 109 // load recipe-files specified on the command line … … 115 115 psTrace ("psModules.config", 3, "read recipes from command-line arguments"); 116 116 } else { 117 ps LogMsg("psModules.config", PS_LOG_DETAIL, "no recipe supplied on command-line arguments");117 psTrace ("psModules.config", PS_LOG_DETAIL, "no recipe supplied on command-line arguments"); 118 118 } 119 119 … … 126 126 psTrace ("psModules.config", 3, "read recipes from symbolic references"); 127 127 } else { 128 ps LogMsg("psModules.config", PS_LOG_DETAIL, "no recipe supplied by symbolic reference");128 psTrace ("psModules.config", PS_LOG_DETAIL, "no recipe supplied by symbolic reference"); 129 129 } 130 130 … … 137 137 psTrace ("psModules.config", 3, "read recipes from command-line arguments"); 138 138 } else { 139 ps LogMsg("psModules.config", PS_LOG_DETAIL, "no recipe supplied on command-line arguments");139 psTrace ("psModules.config", PS_LOG_DETAIL, "no recipe supplied on command-line arguments"); 140 140 } 141 141 } … … 348 348 psFree(recipesIter); 349 349 return false; 350 }350 } 351 351 } 352 352 psFree(recipesIter); -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigRun.c
r23594 r24244 41 41 // Add a file to a nominated metadata in the RUN information 42 42 static bool configRunFileAdd(pmConfig *config, // Configuration 43 const pmFPAfile *file, // File to add 43 const char *description, // Description of file 44 const char *name, // Name of file 44 45 const char *target // Name of metadata to which to add 45 46 ) 46 47 { 47 48 PS_ASSERT_PTR_NON_NULL(config, false); 48 PS_ASSERT_PTR_NON_NULL(file, false); 49 PS_ASSERT_STRING_NON_EMPTY(description, false); 50 PS_ASSERT_STRING_NON_EMPTY(name, false); 51 PS_ASSERT_STRING_NON_EMPTY(target, false); 49 52 50 53 psMetadata *run = configRun(config);// RUN information … … 53 56 psAssert(files, "Require list of files"); 54 57 55 const char *name = file->name; // Name of symbolic file56 const char *value = file->origname ? file->origname : file->filename; // The file (system) name57 58 58 psString regex = NULL; // Regular expression for iteration 59 psStringAppend(®ex, "^%s$", name);59 psStringAppend(®ex, "^%s$", description); 60 60 psMetadataIterator *iter = psMetadataIteratorAlloc(files, PS_LIST_HEAD, regex); 61 61 psFree(regex); … … 63 63 while ((item = psMetadataGetAndIncrement(iter))) { 64 64 psAssert(item->type == PS_DATA_STRING, "We only put STRING types here."); 65 if (strcmp(item->data.str, value) == 0) {65 if (strcmp(item->data.str, name) == 0) { 66 66 // It's already present 67 67 psFree(iter); … … 71 71 psFree(iter); 72 72 73 return psMetadataAddStr(files, PS_LIST_TAIL, name, PS_META_DUPLICATE_OK, NULL, value);73 return psMetadataAddStr(files, PS_LIST_TAIL, description, PS_META_DUPLICATE_OK, NULL, name); 74 74 } 75 75 … … 79 79 PS_ASSERT_PTR_NON_NULL(file, false); 80 80 81 return configRunFileAdd(config, file, "FILES.INPUT"); 81 return configRunFileAdd(config, file->name, file->origname ? file->origname : file->filename, 82 "FILES.INPUT"); 83 } 84 85 bool pmConfigRunFilenameAddRead(pmConfig *config, const char *description, const char *name) 86 { 87 PS_ASSERT_PTR_NON_NULL(config, false); 88 PS_ASSERT_STRING_NON_EMPTY(description, false); 89 PS_ASSERT_STRING_NON_EMPTY(name, false); 90 91 return configRunFileAdd(config, description, name, "FILES.INPUT"); 82 92 } 83 93 … … 87 97 PS_ASSERT_PTR_NON_NULL(file, false); 88 98 89 return configRunFileAdd(config, file, "FILES.OUTPUT"); 99 return configRunFileAdd(config, file->name, file->origname ? file->origname : file->filename, 100 "FILES.OUTPUT"); 101 } 102 103 bool pmConfigRunFilenameAddWrite(pmConfig *config, const char *description, const char *name) 104 { 105 PS_ASSERT_PTR_NON_NULL(config, false); 106 PS_ASSERT_STRING_NON_EMPTY(description, false); 107 PS_ASSERT_STRING_NON_EMPTY(name, false); 108 109 return configRunFileAdd(config, description, name, "FILES.OUTPUT"); 90 110 } 91 111 -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigRun.h
r23594 r24244 12 12 ); 13 13 14 /// Add a filename to the list of files read in the run-time information 15 bool pmConfigRunFilenameAddRead( 16 pmConfig *config, ///< Configuration 17 const char *description, ///< Description of file 18 const char *name ///< Name of file 19 ); 20 14 21 /// Add a file to the list of files written in the run-time information 15 22 bool pmConfigRunFileAddWrite( 16 23 pmConfig *config, ///< Configuration 17 24 const pmFPAfile *file ///< File to add 25 ); 26 27 /// Add a filename to the list of files written in the run-time information 28 bool pmConfigRunFilenameAddWrite( 29 pmConfig *config, ///< Configuration 30 const char *description, ///< Description of file 31 const char *name ///< Name of file 18 32 ); 19 33 -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmErrorCodes.dat
r13654 r24244 11 11 OBJECTS Problem in objects 12 12 SKY Problem in sky 13 STAMPS Unable to select stamps for PSF-matching 13 14 # these errors correspond to standard exit conditions 14 15 ARGUMENTS Incorrect arguments -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmErrorCodes.h.in
r11300 r24244 9 9 */ 10 10 typedef enum { 11 PM_ERR_BASE = 1 200,11 PM_ERR_BASE = 1000, 12 12 PM_ERR_${ErrorCode}, 13 13 PM_ERR_NERROR -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmVersion.c
r23351 r24244 7 7 #include <pslib.h> 8 8 #include "pmVersion.h" 9 #include "pmVersionDefinitions.h" 9 10 10 11 #ifndef PSMODULES_VERSION … … 18 19 #endif 19 20 20 #define xstr(s) str(s)21 #define str(s) #s22 23 21 psString psModulesVersion(void) 24 22 { 25 23 char *value = NULL; 26 psStringAppend(&value, "%s@%s", xstr(PSMODULES_BRANCH), xstr(PSMODULES_VERSION));24 psStringAppend(&value, "%s@%s", PSMODULES_BRANCH, PSMODULES_VERSION); 27 25 return value; 28 26 } … … 30 28 psString psModulesSource(void) 31 29 { 32 return psStringCopy( xstr(PSMODULES_SOURCE));30 return psStringCopy(PSMODULES_SOURCE); 33 31 } 34 32
Note:
See TracChangeset
for help on using the changeset viewer.
