cherry-picked release script changes from fb1c569bc48ecf8d8adc79af59fed680aa12d3dc
[ACE_TAO.git] / ACE / bin / aix_shr
blob489e1b2bb4743fcf05e5e9535b82a272a1b815af
1 #!/bin/sh
2 # Filter out the duplicate symbol warnings from Visual Age C++
5 output=`basename $0`.$$.`/bin/date +%Y%m%d%H%M%S`
6 usrtmp="/tmp"
7 for possible in "$TMPDIR" "$TEMP" "$TMP"; do
8 if [ "$possible" != "" ]; then
9 if [ -w "$possible" ]; then
10 usrtmp="$possible"
11 break
14 done
16 ## Send the output to a temporary file and save the return code.
17 ## This macro is being passed during the to avoid #include errors
18 ## while instantiating templates.
19 $@ -DACE_VACPP_INSTANTIATING_TEMPLATES > "$usrtmp/$output" 2>&1
20 status=$?
22 ## Print the output to stdout, but filter duplicate symbol warnings from
23 ## Visual Age C++-using builds. The first pattern ends up coming from the
24 ## linker in Visual Age C++ 5 builds; the second is from Visual Age C++ 6.
25 /bin/egrep -v '0711-(224|345)|1540-0(424|425|436)' "$usrtmp/$output"
27 ## Clean up the temporary file
28 /bin/rm -f "$usrtmp/$output"
30 ## Exit with the return code from the compiler
31 exit $status