Package: tau / 2.17.3.1.dfsg-4

0008-Replace-echo-e-bashism-with-printf.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
From c201d18e6ac7b42bb7a449d8eb2d0e2de5e3f6b4 Mon Sep 17 00:00:00 2001
From: Yann Dirson <ydirson@free.fr>
Date: Tue, 9 Dec 2014 21:46:22 +0100
Subject: [PATCH] Replace 'echo -e' bashism with 'printf'

---
 tools/src/perfexplorer/bin/Makefile.skel |   2 +-
 tools/src/tau_cc.sh                      |  20 +++---
 tools/src/tau_compiler.sh                | 106 +++++++++++++++----------------
 tools/src/tau_cxx.sh                     |  20 +++---
 tools/src/tau_f90.sh                     |  20 +++---
 5 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/tools/src/perfexplorer/bin/Makefile.skel b/tools/src/perfexplorer/bin/Makefile.skel
index bba866e..85fa073 100644
--- a/tools/src/perfexplorer/bin/Makefile.skel
+++ b/tools/src/perfexplorer/bin/Makefile.skel
@@ -161,7 +161,7 @@ perfexplorer.jar: ${CONSTANT_CLASSES} ${CLIENT_CLASSES} ${CQOS_CLASSES} ${COMMON
 	cp perfexplorer.jar ${TAUROOT}/${CONFIG_ARCH}/lib/.
 
 classifier.jar: clean ${CQOS_CLASSES}
-	@ echo -e "\n***** Make sure you build classifier.jar with Java 1.4! *****\n"
+	@ printf "\n***** Make sure you build classifier.jar with Java 1.4! *****\n"
 	echo "Main-Class: cqos.WekaClassifierWrapper" > Manifest.txt
 	jar -cvf classifier.jar Manifest.txt -C classes .
 	rm -f Manifest.txt
diff --git a/tools/src/tau_cc.sh b/tools/src/tau_cc.sh
index 849547b..086fa49 100755
--- a/tools/src/tau_cc.sh
+++ b/tools/src/tau_cc.sh
@@ -30,16 +30,16 @@ if [ $# = 0 ] ; then
     echo ""
     echo "TAU_OPTIONS:"
     echo ""
-    echo -e "  -optVerbose\t\t\tTurn on verbose debugging message"
-    echo -e "  -optDetectMemoryLeaks\t\tTrack mallocs/frees using TAU's memory wrapper"
-    echo -e "  -optPdtGnuFortranParser\tSpecify the GNU gfortran PDT parser gfparse instead of f95parse"
-    echo -e "  -optPdtCleanscapeParser\tSpecify the Cleanscape Fortran parser"
-    echo -e "  -optTauSelectFile=\"\"\t\tSpecify selective instrumentation file for tau_instrumentor"
-    echo -e "  -optPreProcess\t\tPreprocess the source code before parsing. Uses /usr/bin/cpp -P by default."
-    echo -e "  -optKeepFiles\t\t\tDoes not remove intermediate .pdb and .inst.* files" 
-    echo -e "  -optShared\t\t\tUse shared library version of TAU."
-    echo -e "  -optCompInst\t\t\tUse compiler-based instrumentation."
-    echo -e "  -optPDTInst\t\t\tUse PDT-based instrumentation."
+    printf "  -optVerbose\t\t\tTurn on verbose debugging message"
+    printf "  -optDetectMemoryLeaks\t\tTrack mallocs/frees using TAU's memory wrapper"
+    printf "  -optPdtGnuFortranParser\tSpecify the GNU gfortran PDT parser gfparse instead of f95parse"
+    printf "  -optPdtCleanscapeParser\tSpecify the Cleanscape Fortran parser"
+    printf "  -optTauSelectFile=\"\"\t\tSpecify selective instrumentation file for tau_instrumentor"
+    printf "  -optPreProcess\t\tPreprocess the source code before parsing. Uses /usr/bin/cpp -P by default."
+    printf "  -optKeepFiles\t\t\tDoes not remove intermediate .pdb and .inst.* files" 
+    printf "  -optShared\t\t\tUse shared library version of TAU."
+    printf "  -optCompInst\t\t\tUse compiler-based instrumentation."
+    printf "  -optPDTInst\t\t\tUse PDT-based instrumentation."
     echo ""
     exit 1
 fi
diff --git a/tools/src/tau_compiler.sh b/tools/src/tau_compiler.sh
index 037c7e4..ef7271a 100755
--- a/tools/src/tau_compiler.sh
+++ b/tools/src/tau_compiler.sh
@@ -51,52 +51,52 @@ declare -i optCompInst=$FALSE
 preprocessorOpts="-P  -traditional-cpp"
 
 printUsage () {
-    echo -e "Usage: tau_compiler.sh"
-    echo -e "  -optVerbose\t\t\tTurn on verbose debugging message"
-    echo -e "  -optDetectMemoryLeaks\t\tTrack mallocs/frees using TAU's memory wrapper"
-    echo -e "  -optPdtDir=\"\"\t\t\tPDT architecture directory. Typically \$(PDTDIR)/\$(PDTARCHDIR)"
-    echo -e "  -optPdtF95Opts=\"\"\t\tOptions for Fortran parser in PDT (f95parse)"
-    echo -e "  -optPdtF95Reset=\"\"\t\tReset options to the Fortran parser to the given list"
-    echo -e "  -optPdtCOpts=\"\"\t\tOptions for C parser in PDT (cparse). Typically \$(TAU_MPI_INCLUDE) \$(TAU_INCLUDE) \$(TAU_DEFS)"
-    echo -e "  -optPdtCReset=\"\"\t\tReset options to the C parser to the given list"
-    echo -e "  -optPdtCxxOpts=\"\"\t\tOptions for C++ parser in PDT (cxxparse). Typically \$(TAU_MPI_INCLUDE) \$(TAU_INCLUDE) \$(TAU_DEFS)"
-    echo -e "  -optPdtCxxReset=\"\"\t\tReset options to the C++ parser to the given list"
-    echo -e "  -optPdtF90Parser=\"\"\t\tSpecify a different Fortran parser. For e.g., f90parse instead of f95parse"
-    echo -e "  -optPdtGnuFortranParser\tSpecify the GNU gfortran PDT parser gfparse instead of f95parse"
-    echo -e "  -optPdtCleanscapeParser\tSpecify the Cleanscape Fortran parser"
-    echo -e "  -optPdtUser=\"\"\t\tOptional arguments for parsing source code"
-    echo -e "  -optTauInstr=\"\"\t\tSpecify location of tau_instrumentor. Typically \$(TAUROOT)/\$(CONFIG_ARCH)/bin/tau_instrumentor"
-    echo -e "  -optPreProcess\t\tPreprocess the source code before parsing. Uses /usr/bin/cpp -P by default."
-    echo -e "  -optCPP=\"\"\t\t\tSpecify an alternative preprocessor and pre-process the sources."
-    echo -e "  -optCPPOpts=\"\"\t\tSpecify additional options to the C pre-processor."
-    echo -e "  -optCPPReset=\"\"\t\tReset C preprocessor options to the specified list."
-    echo -e "  -optTauSelectFile=\"\"\t\tSpecify selective instrumentation file for tau_instrumentor"
-    echo -e "  -optPDBFile=\"\"\t\tSpecify PDB file for tau_instrumentor. Skips parsing stage."
-    echo -e "  -optTau=\"\"\t\t\tSpecify options for tau_instrumentor"
-    echo -e "  -optCompile=\"\"\t\tOptions passed to the compiler by the user."
-    echo -e "  -optTauDefs=\"\"\t\tOptions passed to the compiler by TAU. Typically \$(TAU_DEFS)"
-    echo -e "  -optTauIncludes=\"\"\t\tOptions passed to the compiler by TAU. Typically \$(TAU_MPI_INCLUDE) \$(TAU_INCLUDE)"
-    echo -e "  -optIncludeMemory=\"\"\t\tFlags for replacement of malloc/free. Typically -I\$(TAU_DIR)/include/Memory"
-    echo -e "  -optReset=\"\"\t\t\tReset options to the compiler to the given list"
-    echo -e "  -optLinking=\"\"\t\tOptions passed to the linker. Typically \$(TAU_MPI_FLIBS) \$(TAU_LIBS) \$(TAU_CXXLIBS)"
-    echo -e "  -optLinkReset=\"\"\t\tReset options to the linker to the given list"
-    echo -e "  -optTauCC=\"<cc>\"\t\tSpecifies the C compiler used by TAU"
-    echo -e "  -optTauUseCXXForC\t\tSpecifies the use of a C++ compiler for compiling C code"
-    echo -e "  -optOpariTool=\"<path/opari>\"\tSpecifies the location of the Opari tool"
-    echo -e "  -optOpariDir=\"<path>\"\t\tSpecifies the location of the Opari directory"
-    echo -e "  -optOpariOpts=\"\"\t\tSpecifies optional arguments to the Opari tool"
-    echo -e "  -optOpariReset=\"\"\t\tResets options passed to the Opari tool"
-    echo -e "  -optNoMpi\t\t\tRemoves -l*mpi* libraries during linking (default)"
-    echo -e "  -optMpi\t\t\tDoes not remove -l*mpi* libraries during linking"
-    echo -e "  -optNoRevert\t\t\tExit on error. Does not revert to the original compilation rule on error."
-    echo -e "  -optRevert\t\t\tRevert to the original compilation rule on error (default)."
-    echo -e "  -optKeepFiles\t\t\tDoes not remove intermediate .pdb and .inst.* files" 
-    echo -e "  -optAppCC=\"<cc>\"\t\tSpecifies the fallback C compiler."
-    echo -e "  -optAppCXX=\"<cxx>\"\t\tSpecifies the fallback C++ compiler."
-    echo -e "  -optAppF90=\"<f90>\"\t\tSpecifies the fallback F90 compiler."
-    echo -e "  -optShared\t\t\tUse shared library version of TAU."
-    echo -e "  -optCompInst\t\t\tUse compiler-based instrumentation."
-    echo -e "  -optPDTInst\t\t\tUse PDT-based instrumentation."
+    printf "Usage: tau_compiler.sh"
+    printf "  -optVerbose\t\t\tTurn on verbose debugging message"
+    printf "  -optDetectMemoryLeaks\t\tTrack mallocs/frees using TAU's memory wrapper"
+    printf "  -optPdtDir=\"\"\t\t\tPDT architecture directory. Typically \$(PDTDIR)/\$(PDTARCHDIR)"
+    printf "  -optPdtF95Opts=\"\"\t\tOptions for Fortran parser in PDT (f95parse)"
+    printf "  -optPdtF95Reset=\"\"\t\tReset options to the Fortran parser to the given list"
+    printf "  -optPdtCOpts=\"\"\t\tOptions for C parser in PDT (cparse). Typically \$(TAU_MPI_INCLUDE) \$(TAU_INCLUDE) \$(TAU_DEFS)"
+    printf "  -optPdtCReset=\"\"\t\tReset options to the C parser to the given list"
+    printf "  -optPdtCxxOpts=\"\"\t\tOptions for C++ parser in PDT (cxxparse). Typically \$(TAU_MPI_INCLUDE) \$(TAU_INCLUDE) \$(TAU_DEFS)"
+    printf "  -optPdtCxxReset=\"\"\t\tReset options to the C++ parser to the given list"
+    printf "  -optPdtF90Parser=\"\"\t\tSpecify a different Fortran parser. For e.g., f90parse instead of f95parse"
+    printf "  -optPdtGnuFortranParser\tSpecify the GNU gfortran PDT parser gfparse instead of f95parse"
+    printf "  -optPdtCleanscapeParser\tSpecify the Cleanscape Fortran parser"
+    printf "  -optPdtUser=\"\"\t\tOptional arguments for parsing source code"
+    printf "  -optTauInstr=\"\"\t\tSpecify location of tau_instrumentor. Typically \$(TAUROOT)/\$(CONFIG_ARCH)/bin/tau_instrumentor"
+    printf "  -optPreProcess\t\tPreprocess the source code before parsing. Uses /usr/bin/cpp -P by default."
+    printf "  -optCPP=\"\"\t\t\tSpecify an alternative preprocessor and pre-process the sources."
+    printf "  -optCPPOpts=\"\"\t\tSpecify additional options to the C pre-processor."
+    printf "  -optCPPReset=\"\"\t\tReset C preprocessor options to the specified list."
+    printf "  -optTauSelectFile=\"\"\t\tSpecify selective instrumentation file for tau_instrumentor"
+    printf "  -optPDBFile=\"\"\t\tSpecify PDB file for tau_instrumentor. Skips parsing stage."
+    printf "  -optTau=\"\"\t\t\tSpecify options for tau_instrumentor"
+    printf "  -optCompile=\"\"\t\tOptions passed to the compiler by the user."
+    printf "  -optTauDefs=\"\"\t\tOptions passed to the compiler by TAU. Typically \$(TAU_DEFS)"
+    printf "  -optTauIncludes=\"\"\t\tOptions passed to the compiler by TAU. Typically \$(TAU_MPI_INCLUDE) \$(TAU_INCLUDE)"
+    printf "  -optIncludeMemory=\"\"\t\tFlags for replacement of malloc/free. Typically -I\$(TAU_DIR)/include/Memory"
+    printf "  -optReset=\"\"\t\t\tReset options to the compiler to the given list"
+    printf "  -optLinking=\"\"\t\tOptions passed to the linker. Typically \$(TAU_MPI_FLIBS) \$(TAU_LIBS) \$(TAU_CXXLIBS)"
+    printf "  -optLinkReset=\"\"\t\tReset options to the linker to the given list"
+    printf "  -optTauCC=\"<cc>\"\t\tSpecifies the C compiler used by TAU"
+    printf "  -optTauUseCXXForC\t\tSpecifies the use of a C++ compiler for compiling C code"
+    printf "  -optOpariTool=\"<path/opari>\"\tSpecifies the location of the Opari tool"
+    printf "  -optOpariDir=\"<path>\"\t\tSpecifies the location of the Opari directory"
+    printf "  -optOpariOpts=\"\"\t\tSpecifies optional arguments to the Opari tool"
+    printf "  -optOpariReset=\"\"\t\tResets options passed to the Opari tool"
+    printf "  -optNoMpi\t\t\tRemoves -l*mpi* libraries during linking (default)"
+    printf "  -optMpi\t\t\tDoes not remove -l*mpi* libraries during linking"
+    printf "  -optNoRevert\t\t\tExit on error. Does not revert to the original compilation rule on error."
+    printf "  -optRevert\t\t\tRevert to the original compilation rule on error (default)."
+    printf "  -optKeepFiles\t\t\tDoes not remove intermediate .pdb and .inst.* files" 
+    printf "  -optAppCC=\"<cc>\"\t\tSpecifies the fallback C compiler."
+    printf "  -optAppCXX=\"<cxx>\"\t\tSpecifies the fallback C++ compiler."
+    printf "  -optAppF90=\"<f90>\"\t\tSpecifies the fallback F90 compiler."
+    printf "  -optShared\t\t\tUse shared library version of TAU."
+    printf "  -optCompInst\t\t\tUse compiler-based instrumentation."
+    printf "  -optPDTInst\t\t\tUse PDT-based instrumentation."
     
     if [ $1 == 0 ]; then #Means there are no other option passed with the myscript. It is better to exit then.
 	exit
@@ -106,14 +106,14 @@ printUsage () {
 # Assumption: pass only one argument. Concatenate them if there are multiple
 echoIfVerbose () {
     if [ $isDebug == $TRUE ] || [ $isVerbose == $TRUE ]; then
-	echo -e $1
+	printf $1
     fi
 }
 
 #Assumption: pass only one argument. Concatenate them if there are multiple
 echoIfDebug () {
     if [ $isDebug == $TRUE ]; then
-	echo -e $1
+	printf $1
     fi
 }
 
@@ -124,10 +124,10 @@ printError() {
     # This steps ensures that all the intermediate steps are ignored
     gotoNextStep=$FALSE 
 
-    echo -e "Error: Command(Executable) is -- $1"
-    echo -e "Error: Full Command attempted is -- $2"
+    printf "Error: Command(Executable) is -- $1"
+    printf "Error: Full Command attempted is -- $2"
     if [ $revertOnError == $TRUE ]; then
-	echo -e "Error: Reverting to a Regular Make"
+	printf "Error: Reverting to a Regular Make"
     fi
     echo " "
 }
@@ -865,7 +865,7 @@ if [ $numFiles == 0 ]; then
 	else 
 	    revertOnError=false
 	    printError "$CMD" "$linkCmd"
-	    echo -e ""
+	    printf ""
 	    exit $errorStatus
 	fi
     fi
@@ -1175,5 +1175,5 @@ if [ $errorStatus == $TRUE ] ; then
     
     evalWithDebugMessage "$regularCmd" "Compiling with Non-Instrumented Regular Code"
 fi
-echo -e ""
+printf ""
 exit $errorStatus
diff --git a/tools/src/tau_cxx.sh b/tools/src/tau_cxx.sh
index 5d5dd7e..bbecfea 100755
--- a/tools/src/tau_cxx.sh
+++ b/tools/src/tau_cxx.sh
@@ -30,16 +30,16 @@ if [ $# = 0 ] ; then
     echo ""
     echo "TAU_OPTIONS:"
     echo ""
-    echo -e "  -optVerbose\t\t\tTurn on verbose debugging message"
-    echo -e "  -optDetectMemoryLeaks\t\tTrack mallocs/frees using TAU's memory wrapper"
-    echo -e "  -optPdtGnuFortranParser\tSpecify the GNU gfortran PDT parser gfparse instead of f95parse"
-    echo -e "  -optPdtCleanscapeParser\tSpecify the Cleanscape Fortran parser"
-    echo -e "  -optTauSelectFile=\"\"\t\tSpecify selective instrumentation file for tau_instrumentor"
-    echo -e "  -optPreProcess\t\tPreprocess the source code before parsing. Uses /usr/bin/cpp -P by default."
-    echo -e "  -optKeepFiles\t\t\tDoes not remove intermediate .pdb and .inst.* files" 
-    echo -e "  -optShared\t\t\tUse shared library version of TAU."
-    echo -e "  -optCompInst\t\t\tUse compiler-based instrumentation."
-    echo -e "  -optPDTInst\t\t\tUse PDT-based instrumentation."
+    printf "  -optVerbose\t\t\tTurn on verbose debugging message"
+    printf "  -optDetectMemoryLeaks\t\tTrack mallocs/frees using TAU's memory wrapper"
+    printf "  -optPdtGnuFortranParser\tSpecify the GNU gfortran PDT parser gfparse instead of f95parse"
+    printf "  -optPdtCleanscapeParser\tSpecify the Cleanscape Fortran parser"
+    printf "  -optTauSelectFile=\"\"\t\tSpecify selective instrumentation file for tau_instrumentor"
+    printf "  -optPreProcess\t\tPreprocess the source code before parsing. Uses /usr/bin/cpp -P by default."
+    printf "  -optKeepFiles\t\t\tDoes not remove intermediate .pdb and .inst.* files" 
+    printf "  -optShared\t\t\tUse shared library version of TAU."
+    printf "  -optCompInst\t\t\tUse compiler-based instrumentation."
+    printf "  -optPDTInst\t\t\tUse PDT-based instrumentation."
     echo ""
     exit 1
 fi
diff --git a/tools/src/tau_f90.sh b/tools/src/tau_f90.sh
index df3dc8b..c1d7c4b 100755
--- a/tools/src/tau_f90.sh
+++ b/tools/src/tau_f90.sh
@@ -30,16 +30,16 @@ if [ $# = 0 ] ; then
     echo ""
     echo "TAU_OPTIONS:"
     echo ""
-    echo -e "  -optVerbose\t\t\tTurn on verbose debugging message"
-    echo -e "  -optDetectMemoryLeaks\t\tTrack mallocs/frees using TAU's memory wrapper"
-    echo -e "  -optPdtGnuFortranParser\tSpecify the GNU gfortran PDT parser gfparse instead of f95parse"
-    echo -e "  -optPdtCleanscapeParser\tSpecify the Cleanscape Fortran parser"
-    echo -e "  -optTauSelectFile=\"\"\t\tSpecify selective instrumentation file for tau_instrumentor"
-    echo -e "  -optPreProcess\t\tPreprocess the source code before parsing. Uses /usr/bin/cpp -P by default."
-    echo -e "  -optKeepFiles\t\t\tDoes not remove intermediate .pdb and .inst.* files" 
-    echo -e "  -optShared\t\t\tUse shared library version of TAU."
-    echo -e "  -optCompInst\t\t\tUse compiler-based instrumentation."
-    echo -e "  -optPDTInst\t\t\tUse PDT-based instrumentation."
+    printf "  -optVerbose\t\t\tTurn on verbose debugging message"
+    printf "  -optDetectMemoryLeaks\t\tTrack mallocs/frees using TAU's memory wrapper"
+    printf "  -optPdtGnuFortranParser\tSpecify the GNU gfortran PDT parser gfparse instead of f95parse"
+    printf "  -optPdtCleanscapeParser\tSpecify the Cleanscape Fortran parser"
+    printf "  -optTauSelectFile=\"\"\t\tSpecify selective instrumentation file for tau_instrumentor"
+    printf "  -optPreProcess\t\tPreprocess the source code before parsing. Uses /usr/bin/cpp -P by default."
+    printf "  -optKeepFiles\t\t\tDoes not remove intermediate .pdb and .inst.* files" 
+    printf "  -optShared\t\t\tUse shared library version of TAU."
+    printf "  -optCompInst\t\t\tUse compiler-based instrumentation."
+    printf "  -optPDTInst\t\t\tUse PDT-based instrumentation."
     echo ""
 
     exit 1
-- 
2.1.3