- Timestamp:
- Dec 23, 2011, 5:47:15 PM (12 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r598 r599 1 2011-12-23 <rybkin@lal.in2p3.fr> 476 2 3 * source/cmt_commands.cxx: In class ArgParser function do_create, check if 4 at least 2 arguments specified and set error otherwise 5 * source/cmt_symbol.cxx: In class SymbolValueList function print, add 6 comments only if Verbose level (of diagnostic messages) is activated so as 7 to make Requirements mode setup output shorter 8 * source/cmt_system.h: In class CmtSystem, make functions file_separator, 9 path_separator, command_separator inline, remove function cwd_variable 10 * source/cmt_system.cxx: Introduce and make use of cwd_env_var preprocessor 11 macro, on Windows, use _unlink, _chmod, _putenv instead of deprecated - 12 beginning in Visual C++ 2005 - POSIX names functions 13 * source/cmt_generators.cxx: In class PackagesMakefileGenerator function 14 build, add template PACKAGEPREFIX for package_fragment 15 * source/cmt_parser.cxx: In class Cmt function do_build_broadcast_config, 16 add <package>_offset, <PACKAGE>VERSION macros to broadcast tags file 17 * mgr/fragments/packages_header: Include broadcast tags file 18 * mgr/fragments/nmake/packages_header: idem 19 * mgr/fragments/nmake/package: Add package info (name, version, offset) to 20 diagnostic messages, making use of added macros in tags file 21 * mgr/fragments/package: idem, use redirection operator (rather than touch) 22 to create empty or truncate existing package log file 23 * mgr/fragments/nmake/library: For clean target, remove constituent 24 directory and manifest file 25 * mgr/fragments/nmake/library_no_static: idem 26 * mgr/fragments/nmake/library_no_share: For clean target, remove 27 constituent directory 28 * mgr/fragments/nmake/cleanup_application: For clean target, remove 29 manifest file 30 1 31 2011-12-11 <rybkin@lal.in2p3.fr> 475 2 32 -
CMT/HEAD/mgr/fragments/nmake/cleanup_application
r11 r599 1 1 -$(cleanup_echo) ${CONSTITUENT}$(application_suffix) 2 2 -$(cleanup_silent) if exist $(bin)${CONSTITUENT}$(application_suffix) del $(bin)${CONSTITUENT}$(application_suffix) 3 -$(cleanup_silent) if exist $(bin)${CONSTITUENT}$(application_suffix).manifest del $(bin)${CONSTITUENT}$(application_suffix).manifest -
CMT/HEAD/mgr/fragments/nmake/library
r492 r599 19 19 $(cleanup_echo) #objects 20 20 $(cleanup_silent) for %f in (${OBJS}) do $(cleanup_silent)if exist %f del %f 21 $(cleanup_silent) if exist $(bin)${CONSTITUENT} rmdir /S /Q $(bin)${CONSTITUENT} 21 22 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.arc del $(bin)${CONSTITUENT}.arc 22 23 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.lib del $(bin)${CONSTITUENT}.lib … … 24 25 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.exp del $(bin)${CONSTITUENT}.exp 25 26 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.dll del $(bin)${CONSTITUENT}.dll 27 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.dll.manifest del $(bin)${CONSTITUENT}.dll.manifest 26 28 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.pdb del $(bin)${CONSTITUENT}.pdb 27 29 -
CMT/HEAD/mgr/fragments/nmake/library_no_share
r492 r599 14 14 $(cleanup_echo) #objects 15 15 $(cleanup_silent) for %f in (${OBJS}) do $(cleanup_silent)if exist %f del %f 16 $(cleanup_silent) if exist $(bin)${CONSTITUENT} rmdir /S /Q $(bin)${CONSTITUENT} 16 17 $(cleanup_silent) if exist $(${CONSTITUENT}lib) del $(${CONSTITUENT}lib) 17 18 -
CMT/HEAD/mgr/fragments/nmake/library_no_static
r545 r599 38 38 $(cleanup_echo) #objects 39 39 $(cleanup_silent) for %f in (${OBJS}) do $(cleanup_silent)if exist %f del %f 40 $(cleanup_silent) if exist $(bin)${CONSTITUENT} rmdir /S /Q $(bin)${CONSTITUENT} 40 41 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.arc del $(bin)${CONSTITUENT}.arc 41 42 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.lib del $(bin)${CONSTITUENT}.lib … … 43 44 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.exp del $(bin)${CONSTITUENT}.exp 44 45 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.dll del $(bin)${CONSTITUENT}.dll 46 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.dll.manifest del $(bin)${CONSTITUENT}.dll.manifest 45 47 $(cleanup_silent) if exist $(bin)${CONSTITUENT}.pdb del $(bin)${CONSTITUENT}.pdb 46 48 -
CMT/HEAD/mgr/fragments/nmake/package
r595 r599 22 22 !if "$(cmt_${PACKAGE}_is_local)" != "" 23 23 @echo "#--------------------------------------------------------------" \ 24 && echo "# Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \24 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \ 25 25 && echo "#--------------------------------------------------------------" 26 26 !if "$(LOG_LOCATION)" != "" 27 27 $(silent) type nul > $(LOG_LOCATION)\$(${PACKAGE}FullName)$(LOG_SUFFIX) 28 28 @( echo "#--------------------------------------------------------------" \ 29 && echo "# Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \29 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \ 30 30 && echo "#--------------------------------------------------------------" ) $(${PACKAGE}OutErr) 31 31 !endif … … 45 45 !if "$(BCAST_GLOBAL)" != "" 46 46 @echo "#--------------------------------------------------------------" \ 47 && echo "# Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \47 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \ 48 48 && echo "#--------------------------------------------------------------" 49 49 !if "$(LOG_LOCATION)" != "" 50 50 $(silent) type nul > $(LOG_LOCATION)\$(${PACKAGE}FullName)$(LOG_SUFFIX) 51 51 @( echo "#--------------------------------------------------------------" \ 52 && echo "# Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \52 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \ 53 53 && echo "#--------------------------------------------------------------" ) $(${PACKAGE}OutErr) 54 54 !endif … … 94 94 !if "$(cmt_${PACKAGE}_is_local)" != "" 95 95 @echo "#--------------------------------------------------------------" \ 96 && echo "# Now trying [$(BCAST_CMD) clean] in $(${PACKAGE}MgrPath)" \96 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) clean] in $(${PACKAGE}MgrPath)" \ 97 97 && echo "#--------------------------------------------------------------" 98 98 $(silent) cd /d $(${PACKAGE}MgrPath) && $(BCAST_CMD) clean … … 100 100 !if "$(BCAST_GLOBAL)" != "" 101 101 @echo "#--------------------------------------------------------------" \ 102 && echo "# Now trying [$(BCAST_CMD) clean] in $(${PACKAGE}MgrPath)" \102 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) clean] in $(${PACKAGE}MgrPath)" \ 103 103 && echo "#--------------------------------------------------------------" 104 104 $(silent) cd /d $(${PACKAGE}MgrPath) && $(BCAST_CMD) clean … … 111 111 !if "$(cmt_${PACKAGE}_is_local)" != "" 112 112 @echo "#--------------------------------------------------------------" \ 113 && echo "# Now trying [$(BCAST_CMD) binclean] in $(${PACKAGE}MgrPath)" \113 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) binclean] in $(${PACKAGE}MgrPath)" \ 114 114 && echo "#--------------------------------------------------------------" 115 115 $(silent) cd /d $(${PACKAGE}MgrPath) && $(BCAST_CMD) binclean … … 117 117 !if "$(BCAST_GLOBAL)" != "" 118 118 @echo "#--------------------------------------------------------------" \ 119 && echo "# Now trying [$(BCAST_CMD) binclean] in $(${PACKAGE}MgrPath)" \119 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) binclean] in $(${PACKAGE}MgrPath)" \ 120 120 && echo "#--------------------------------------------------------------" 121 121 $(silent) cd /d $(${PACKAGE}MgrPath) && $(BCAST_CMD) binclean … … 128 128 !if "$(cmt_${PACKAGE}_is_local)" != "" 129 129 @echo "#--------------------------------------------------------------" \ 130 && echo "# Now trying [$(BCAST_CMD) uninstall] in $(${PACKAGE}MgrPath)" \130 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) uninstall] in $(${PACKAGE}MgrPath)" \ 131 131 && echo "#--------------------------------------------------------------" 132 132 $(silent) cd /d $(${PACKAGE}MgrPath) && $(BCAST_CMD) uninstall … … 134 134 !if "$(BCAST_GLOBAL)" != "" 135 135 @echo "#--------------------------------------------------------------" \ 136 && echo "# Now trying [$(BCAST_CMD) uninstall] in $(${PACKAGE}MgrPath)" \136 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) uninstall] in $(${PACKAGE}MgrPath)" \ 137 137 && echo "#--------------------------------------------------------------" 138 138 $(silent) cd /d $(${PACKAGE}MgrPath) && $(BCAST_CMD) uninstall … … 145 145 !if "$(cmt_${PACKAGE}_is_local)" != "" 146 146 @echo "#--------------------------------------------------------------" \ 147 && echo "# Now trying [$(BCAST_CMD) check] in $(${PACKAGE}MgrPath)" \147 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) check] in $(${PACKAGE}MgrPath)" \ 148 148 && echo "#--------------------------------------------------------------" 149 149 $(silent) cd /d $(${PACKAGE}MgrPath) && $(BCAST_CMD) check … … 151 151 !if "$(BCAST_GLOBAL)" != "" 152 152 @echo "#--------------------------------------------------------------" \ 153 && echo "# Now trying [$(BCAST_CMD) check] in $(${PACKAGE}MgrPath)" \153 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) check] in $(${PACKAGE}MgrPath)" \ 154 154 && echo "#--------------------------------------------------------------" 155 155 $(silent) cd /d $(${PACKAGE}MgrPath) && $(BCAST_CMD) check -
CMT/HEAD/mgr/fragments/nmake/packages_header
r595 r599 2 2 3 3 #!include $(CMTROOT)\src\NMakefile.core 4 #!include $(cmt_broadcast_tagfile)4 !include $(cmt_broadcast_tagfile) 5 5 6 6 !if "$(BCAST_CMD)" == "" -
CMT/HEAD/mgr/fragments/package
r595 r599 22 22 ifdef cmt_${PACKAGE}_is_local 23 23 @echo "#--------------------------------------------------------------" \ 24 && echo "# Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \24 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \ 25 25 && echo "#--------------------------------------------------------------" 26 26 ifdef LOG_LOCATION 27 $(silent) touch$(LOG_LOCATION)/$(${PACKAGE}FullName)$(LOG_SUFFIX)27 $(silent) > $(LOG_LOCATION)/$(${PACKAGE}FullName)$(LOG_SUFFIX) 28 28 @{ echo "#--------------------------------------------------------------" \ 29 && echo "# Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \29 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \ 30 30 && echo "#--------------------------------------------------------------"; } $(${PACKAGE}OutErr) 31 31 endif … … 43 43 ifdef BCAST_GLOBAL 44 44 @echo "#--------------------------------------------------------------" \ 45 && echo "# Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \45 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \ 46 46 && echo "#--------------------------------------------------------------" 47 47 ifdef LOG_LOCATION 48 $(silent) touch$(LOG_LOCATION)/$(${PACKAGE}FullName)$(LOG_SUFFIX)48 $(silent) > $(LOG_LOCATION)/$(${PACKAGE}FullName)$(LOG_SUFFIX) 49 49 @{ echo "#--------------------------------------------------------------" \ 50 && echo "# Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \50 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD)] in $(${PACKAGE}MgrPath)" \ 51 51 && echo "#--------------------------------------------------------------"; } $(${PACKAGE}OutErr) 52 52 endif … … 90 90 ifdef cmt_${PACKAGE}_is_local 91 91 @echo "#--------------------------------------------------------------" \ 92 && echo "# Now trying [$(BCAST_CMD) $(patsubst ${PACKAGE}%,%,$@)] in $(${PACKAGE}MgrPath)" \92 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) $(patsubst ${PACKAGE}%,%,$@)] in $(${PACKAGE}MgrPath)" \ 93 93 && echo "#--------------------------------------------------------------" 94 94 +$(silent) cd $(${PACKAGE}MgrPath) && $(BCAST_CMD) $(patsubst ${PACKAGE}%,%,$@) … … 96 96 ifdef BCAST_GLOBAL 97 97 @echo "#--------------------------------------------------------------" \ 98 && echo "# Now trying [$(BCAST_CMD) $(patsubst ${PACKAGE}%,%,$@)] in $(${PACKAGE}MgrPath)" \98 && echo "# ${PACKAGE} $(${PACKAGEPREFIX}VERSION) $(${PACKAGE}_offset): Now trying [$(BCAST_CMD) $(patsubst ${PACKAGE}%,%,$@)] in $(${PACKAGE}MgrPath)" \ 99 99 && echo "#--------------------------------------------------------------" 100 100 +$(silent) cd $(${PACKAGE}MgrPath) && $(BCAST_CMD) $(patsubst ${PACKAGE}%,%,$@) -
CMT/HEAD/mgr/fragments/packages_header
r595 r599 2 2 3 3 include ${CMTROOT}/src/Makefile.core 4 5 # 6 # Basic tag management 7 # 8 ifdef tag 9 CMTEXTRATAGS = $(tag) 10 else 11 tag = $(CMTCONFIG) 12 endif 13 14 tags = $(tag),$(CMTEXTRATAGS) 15 16 #cmt_local_tagfile = $(bin)$(tag).make 17 cmt_broadcast_tagfile = $(bin)$(tag)_broadcast.make 18 19 include $(cmt_broadcast_tagfile) 4 20 5 21 ifndef BCAST_CMD … … 54 70 #-------------------------------------------------------- 55 71 72 ${CMTROOT}/src/Makefile.core : ; 73 $(cmt_broadcast_tagfile) : ; 74 ifdef use_requirements 75 $(use_requirements) : ; 76 endif 77 56 78 ifndef PEDANTIC 57 79 .DEFAULT : 58 $(echo) "( uses.make) $@: No rule for such target" >&280 $(echo) "(packages) $@: No rule for such target" >&2 59 81 endif 60 82 -
CMT/HEAD/source/cmt_commands.cxx
r590 r599 1014 1014 void ArgParser::do_create () 1015 1015 { 1016 if (argc > 0) 1016 if (argc >= 2) 1017 //if (argc > 0) 1017 1018 { 1018 1019 fill_arguments (); … … 1021 1022 else 1022 1023 { 1023 Cmt Message::error ("syntax: createarguments missing");1024 // if (!cmt.m_quiet) cerr << "#CMT> syntax error : create arguments missing" << endl;1024 CmtError::set (CmtError::syntax_error, "arguments missing"); 1025 //CmtMessage::error ("syntax: create arguments missing"); 1025 1026 help_action = action_help; 1026 1027 cmt.m_action = action_create; -
CMT/HEAD/source/cmt_generators.cxx
r595 r599 2913 2913 2914 2914 m_PACKAGE = use->get_package_name (); 2915 m_PACKAGEPREFIX = use->prefix; 2915 2916 2916 2917 Use::UsePtrVector subuses; … … 2944 2945 } 2945 2946 2946 if (!package_fragment.copy (m_output_file, 5, 2947 &m_PACKAGE, &m_DEPENDENCIES, 2947 if (!package_fragment.copy (m_output_file, 6, 2948 &m_PACKAGE, &m_PACKAGEPREFIX, 2949 &m_DEPENDENCIES, 2948 2950 &m_PACKAGEMGRPATH, &m_PACKAGEFULLNAME, 2949 2951 &m_ISLOCAL)) return; -
CMT/HEAD/source/cmt_parser.cxx
r598 r599 2554 2554 // symbol->show_macro (Make, t); 2555 2555 // const cmt_string pattern = "^use_requirements$|.*_root$|.*_cmtpath$|.*_offset$"; 2556 const cmt_string pattern = "^use_requirements$|.*_root$"; 2556 // const cmt_string pattern = "^use_requirements$|.*_root$"; 2557 const cmt_string pattern = "^use_requirements$|.*_root$|.*_offset$|.*VERSION$"; 2557 2558 print_macros (Make, pattern, t); 2558 2559 t.close (); // ios_base::failbit -
CMT/HEAD/source/cmt_symbol.cxx
r588 r599 3134 3134 else define_text = "overrides"; 3135 3135 3136 cout << "# Package "; 3136 if (CmtMessage::active (Verbose)) 3137 cout << "# Package " << (use != 0 ? use->get_package_name () + " " + use->version : ""); 3138 /* 3137 3139 if (use != 0) 3138 3140 { 3139 3141 cout << use->get_package_name () << " " << use->version; 3140 3142 } 3143 */ 3141 3144 3142 3145 switch (command_type) 3143 3146 { 3144 3147 case CommandSet : 3145 cout << " " << define_text << " set " << symbol.name << " as " << endl; 3148 if (CmtMessage::active (Verbose)) 3149 cout << " " << define_text << " set " << symbol.name << " as " << endl; 3146 3150 // cout << " " << define_text << " set " << symbol.name << " as "; 3147 3151 cout << "set " << symbol.name; … … 3150 3154 break; 3151 3155 case CommandSetAppend : 3152 cout << " appends to set " << symbol.name << " : " << endl;; 3156 if (CmtMessage::active (Verbose)) 3157 cout << " appends to set " << symbol.name << " : " << endl; 3153 3158 // cout << " appends to set " << symbol.name << " : "; 3154 3159 cout << "set_append " << symbol.name; … … 3156 3161 break; 3157 3162 case CommandSetPrepend : 3158 cout << " prepends to set " << symbol.name << " : " << endl; 3163 if (CmtMessage::active (Verbose)) 3164 cout << " prepends to set " << symbol.name << " : " << endl; 3159 3165 // cout << " prepends to set " << symbol.name << " : "; 3160 3166 cout << "set_prepend " << symbol.name; … … 3162 3168 break; 3163 3169 case CommandSetRemove : 3164 cout << " removes from set " << symbol.name << " : " << endl; 3170 if (CmtMessage::active (Verbose)) 3171 cout << " removes from set " << symbol.name << " : " << endl; 3165 3172 // cout << " removes from set " << symbol.name << " : "; 3166 3173 cout << "set_remove " << symbol.name; … … 3168 3175 break; 3169 3176 case CommandSetRemoveRegexp : 3170 cout << " removes RE from set " << symbol.name << " : " << endl; 3177 if (CmtMessage::active (Verbose)) 3178 cout << " removes RE from set " << symbol.name << " : " << endl; 3171 3179 // cout << " removes RE from set " << symbol.name << " : "; 3172 3180 cout << "set_remove_regexp " << symbol.name; … … 3174 3182 break; 3175 3183 case CommandAlias : 3176 cout << " " << define_text << " alias " << symbol.name << endl; 3184 if (CmtMessage::active (Verbose)) 3185 cout << " " << define_text << " alias " << symbol.name << endl; 3177 3186 // cout << " " << define_text << " alias " << symbol.name << " as "; 3178 3187 cout << "alias " << symbol.name; … … 3181 3190 break; 3182 3191 case CommandPath : 3183 cout << " " << define_text << " path " << symbol.name << endl; 3192 if (CmtMessage::active (Verbose)) 3193 cout << " " << define_text << " path " << symbol.name << endl; 3184 3194 // cout << " " << define_text << " path " << symbol.name << " as "; 3185 3195 cout << "path " << symbol.name; … … 3188 3198 break; 3189 3199 case CommandPathAppend : 3190 cout << " appends to path " << symbol.name << endl; 3200 if (CmtMessage::active (Verbose)) 3201 cout << " appends to path " << symbol.name << endl; 3191 3202 // cout << " appends to path " << symbol.name << " : "; 3192 3203 cout << "path_append " << symbol.name; … … 3194 3205 break; 3195 3206 case CommandPathPrepend : 3196 cout << " prepends to path " << symbol.name << " : " << endl; 3207 if (CmtMessage::active (Verbose)) 3208 cout << " prepends to path " << symbol.name << " : " << endl; 3197 3209 // cout << " prepends to path " << symbol.name << " : "; 3198 3210 cout << "path_prepend " << symbol.name; … … 3200 3212 break; 3201 3213 case CommandPathRemove : 3202 cout << " removes from path " << symbol.name << " : " << endl; 3214 if (CmtMessage::active (Verbose)) 3215 cout << " removes from path " << symbol.name << " : " << endl; 3203 3216 // cout << " removes from path " << symbol.name << " : "; 3204 3217 cout << "path_remove " << symbol.name; … … 3206 3219 break; 3207 3220 case CommandPathRemoveRegexp : 3208 cout << " removes RE from path " << symbol.name << " : " << endl; 3221 if (CmtMessage::active (Verbose)) 3222 cout << " removes RE from path " << symbol.name << " : " << endl; 3209 3223 // cout << " removes RE from path " << symbol.name << " : "; 3210 3224 cout << "path_remove_regexp " << symbol.name; … … 3212 3226 break; 3213 3227 case CommandMacro : 3214 cout << " " << define_text << " macro " << symbol.name << " as " << endl; 3228 if (CmtMessage::active (Verbose)) 3229 cout << " " << define_text << " macro " << symbol.name << " as " << endl; 3215 3230 // cout << " " << define_text << " macro " << symbol.name << " as "; 3216 3231 cout << "macro " << symbol.name; … … 3218 3233 break; 3219 3234 case CommandMacroPrepend : 3220 cout << " prepends to macro " << symbol.name << " : " << endl; 3235 if (CmtMessage::active (Verbose)) 3236 cout << " prepends to macro " << symbol.name << " : " << endl; 3221 3237 // cout << " prepends to macro " << symbol.name << " : "; 3222 3238 cout << "macro_prepend " << symbol.name; … … 3224 3240 break; 3225 3241 case CommandMacroAppend : 3226 cout << " appends to macro " << symbol.name << " : " << endl; 3242 if (CmtMessage::active (Verbose)) 3243 cout << " appends to macro " << symbol.name << " : " << endl; 3227 3244 // cout << " appends to macro " << symbol.name << " : "; 3228 3245 cout << "macro_append " << symbol.name; … … 3230 3247 break; 3231 3248 case CommandMacroRemove : 3232 cout << " remove from macro " << symbol.name << " : " << endl; 3249 if (CmtMessage::active (Verbose)) 3250 cout << " remove from macro " << symbol.name << " : " << endl; 3233 3251 // cout << " remove from macro " << symbol.name << " : "; 3234 3252 cout << "macro_remove " << symbol.name; … … 3236 3254 break; 3237 3255 case CommandMacroRemoveRegexp : 3238 cout << " remove RE from macro " << symbol.name << " : " << endl; 3256 if (CmtMessage::active (Verbose)) 3257 cout << " remove RE from macro " << symbol.name << " : " << endl; 3239 3258 // cout << " remove RE from macro " << symbol.name << " : "; 3240 3259 cout << "macro_remove_regexp " << symbol.name; … … 3242 3261 break; 3243 3262 case CommandMacroRemoveAll : 3244 cout << " remove all from macro " << symbol.name << " : " << endl; 3263 if (CmtMessage::active (Verbose)) 3264 cout << " remove all from macro " << symbol.name << " : " << endl; 3245 3265 // cout << " remove all from macro " << symbol.name << " : "; 3246 3266 cout << "macro_remove_all " << symbol.name; … … 3248 3268 break; 3249 3269 case CommandMacroRemoveAllRegexp : 3250 cout << " remove all RE from macro " << symbol.name << " : " << endl; 3270 if (CmtMessage::active (Verbose)) 3271 cout << " remove all RE from macro " << symbol.name << " : " << endl; 3251 3272 // cout << " remove all RE from macro " << symbol.name << " : "; 3252 3273 cout << "macro_remove_all_regexp " << symbol.name; … … 3254 3275 break; 3255 3276 case CommandSetupScript : 3256 cout << " " << define_text << " setup script " << symbol.name << endl; 3277 if (CmtMessage::active (Verbose)) 3278 cout << " " << define_text << " setup script " << symbol.name << endl; 3257 3279 // cout << " " << define_text << " action " << symbol.name << " as "; 3258 3280 cout << "setup_script" /* << symbol.name */; -
CMT/HEAD/source/cmt_system.cxx
r597 r599 20 20 #define S_IFDIR _S_IFDIR 21 21 #define USE_GETCWD 1 22 22 #define cwd_env_var "CD" 23 23 #include <sys/types.h> 24 24 #include <sys/stat.h> … … 28 28 29 29 #define stat _stat 30 #define unlink _unlink 31 #define chmod _chmod 32 //#define putenv _putenv 30 33 #define WEXITSTATUS(w) (w) 31 #include <stdlib.h>32 34 #define PATH_MAX _MAX_PATH 33 35 … … 40 42 #include <sys/utsname.h> 41 43 #include <limits.h> // define PATH_MAX 44 #define cwd_env_var "PWD" 42 45 #endif 43 46 … … 79 82 char* pwd_env = 0; 80 83 81 pwd_env = ::getenv (cwd_ variable ());84 pwd_env = ::getenv (cwd_env_var); 82 85 // pwd_env = ::getenv ("PWD"); 83 86 … … 157 160 { 158 161 #ifndef WIN32 159 if (putenv (cwd_ variable (), s_dir))162 if (putenv (cwd_env_var, s_dir)) 160 163 // if (putenv ("PWD", s_dir)) 161 164 return (true); … … 739 742 740 743 //-------------------------------------------------- 744 /* 741 745 char CmtSystem::file_separator () 742 746 { … … 747 751 #endif 748 752 } 749 753 */ 750 754 /** 751 755 * Transform all / or \ characters in the text into the current file_separator … … 773 777 774 778 //-------------------------------------------------- 779 /* 775 780 char CmtSystem::path_separator () 776 781 { … … 781 786 #endif 782 787 } 783 788 */ 784 789 //-------------------------------------------------- 790 /* 785 791 char CmtSystem::command_separator () 786 792 { … … 791 797 #endif 792 798 } 793 799 */ 800 /* 794 801 //-------------------------------------------------- 795 802 const char * CmtSystem::cwd_variable () … … 801 808 #endif 802 809 } 803 810 */ 804 811 //-------------------------------------------------- 805 812 const cmt_string& CmtSystem::ev_open () … … 1550 1557 //cerr << "#CmtSystem::putenv> name=" << name << " &v=" << &v << endl; 1551 1558 1559 #ifdef WIN32 1560 int status = ::_putenv ((char*) v.c_str ()); 1561 #else 1552 1562 int status = ::putenv ((char*) v.c_str ()); 1563 #endif 1553 1564 1554 1565 if (status == 0) return (true); -
CMT/HEAD/source/cmt_system.h
r595 r599 80 80 const cmt_string& name2); 81 81 static int file_size (const cmt_string& name); 82 static char file_separator (); 82 inline static char file_separator () 83 { 84 #ifdef WIN32 85 return ('\\'); 86 #else 87 return ('/'); 88 #endif 89 } 83 90 static void reduce_file_separators (cmt_string& text); 84 static char path_separator (); 85 static char command_separator (); 86 static const char* cwd_variable (); 91 inline static char path_separator () 92 { 93 #ifdef WIN32 94 return (';'); 95 #else 96 return (':'); 97 #endif 98 } 99 inline static char command_separator () 100 { 101 #ifdef WIN32 102 return ('&'); 103 #else 104 return (';'); 105 #endif 106 } 107 //static const char* cwd_variable (); 87 108 static const cmt_string& ev_open (); 88 109 static const cmt_string& ev_close ();
Note: See TracChangeset
for help on using the changeset viewer.