xref: /trunk/main/sal/qa/helper/gcov/build_coverage (revision b31e36b3)
1*b31e36b3SAndrew Rist# *************************************************************
2*b31e36b3SAndrew Rist#
3*b31e36b3SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*b31e36b3SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*b31e36b3SAndrew Rist#  distributed with this work for additional information
6*b31e36b3SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*b31e36b3SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*b31e36b3SAndrew Rist#  "License"); you may not use this file except in compliance
9*b31e36b3SAndrew Rist#  with the License.  You may obtain a copy of the License at
10*b31e36b3SAndrew Rist#
11*b31e36b3SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*b31e36b3SAndrew Rist#
13*b31e36b3SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*b31e36b3SAndrew Rist#  software distributed under the License is distributed on an
15*b31e36b3SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b31e36b3SAndrew Rist#  KIND, either express or implied.  See the License for the
17*b31e36b3SAndrew Rist#  specific language governing permissions and limitations
18*b31e36b3SAndrew Rist#  under the License.
19*b31e36b3SAndrew Rist#
20*b31e36b3SAndrew Rist# *************************************************************
21cdf0e10cSrcweir
22cdf0e10cSrcweir# this is a helper, to build sal with the right compiler parameters
23cdf0e10cSrcweir# IMPORTANT, this works only within Linux
24cdf0e10cSrcweir
25cdf0e10cSrcweirif ( `uname` == "Linux" ) then
26cdf0e10cSrcweir	echo "running on Linux Intel, ok."
27cdf0e10cSrcweir
28cdf0e10cSrcweir    build killobj
29cdf0e10cSrcweir
30cdf0e10cSrcweir    # setenv OLDCFLAGS $ENVCFLAGS
31cdf0e10cSrcweir
32cdf0e10cSrcweir    setenv ENVCFLAGS "-fprofile-arcs -ftest-coverage"
33cdf0e10cSrcweir
34cdf0e10cSrcweir    build
35cdf0e10cSrcweir
36cdf0e10cSrcweir    # setenv ENVCFLAGS $OLDCFLAGS
37cdf0e10cSrcweir
38cdf0e10cSrcweirelse
39cdf0e10cSrcweir
40cdf0e10cSrcweir    echo "Sorry, gcov works only within Linux environment."
41cdf0e10cSrcweir
42cdf0e10cSrcweirendif
43cdf0e10cSrcweir
44