Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

configure 9.85 KB
Newer Older
Mathieu Faverge's avatar
Mathieu Faverge committed
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
#
# This file is part of the ViTE project.
#
# This software is governed by the CeCILL-A license under French law
# and abiding by the rules of distribution of free software. You can
# use, modify and/or redistribute the software under the terms of the
# CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
# URL: "http://www.cecill.info".
# 
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided
# only with a limited warranty and the software's author, the holder of
# the economic rights, and the successive licensors have only limited
# liability.
# 
# In this respect, the user's attention is drawn to the risks associated
# with loading, using, modifying and/or developing or reproducing the
# software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also
# therefore means that it is reserved for developers and experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards
# their requirements in conditions enabling the security of their
# systems and/or data to be ensured and, more generally, to use and
# operate it in the same conditions as regards security.
# 
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL-A license and that you accept its terms.
#
#
31
# ViTE developers are (for version 0.* to 1.0):
Mathieu Faverge's avatar
Mathieu Faverge committed
32 33 34 35 36 37 38 39 40 41 42
#
#        - COULOMB Kevin
#        - FAVERGE Mathieu
#        - JAZEIX Johnny
#        - LAGRASSE Olivier
#        - MARCOUEILLE Jule
#        - NOISETTE Pascal
#        - REDONDY Arthur
#        - VUCHENER Clément 
#
#
43 44
#!/bin/sh

45 46
echo $* >> ./config.log

47 48 49 50 51 52
relpath=`dirname $0`
relpath=`(cd "$relpath"; /bin/pwd)`
WHICH=`which which 2>/dev/null`
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
makefile="Makefile"

53
# Default values 
Johnny Jazeix's avatar
Johnny Jazeix committed
54
with_otf=0
55 56 57 58
otfdir="/usr"
otfincdir="$otfdir/include"
otflibdir="$otfdir/lib"

59
with_tau=0
60 61 62 63
taudir="/usr"
tauincdir="$taudir/include"
taulibdir="$taudir/lib"

64
qtcolordir="../externals/qtcolorpicker"
65 66 67
qtcolorincdir="$qtcolordir/src"
qtcolorsrcdir="$qtcolordir/src"

68
config_specified=0
Johnny Jazeix's avatar
Johnny Jazeix committed
69

70 71
# Project file
project="src.pro"
Johnny Jazeix's avatar
Johnny Jazeix committed
72

73
# For qmake
74
config="\"CONFIG+="
75 76
defines="\"DEFINES+="
libs="\"LIBS+="
77 78
includepath="\"INCLUDEPATH+="
dependpath="\"DEPENDPATH+="
79 80
sources="\"SOURCES+="
headers="\"HEADERS+="
Johnny Jazeix's avatar
Johnny Jazeix committed
81

82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
echo ""
echo "-------------------------------"
echo "-------------------------------"
echo ""
echo "     Visual Trace Explorer"
echo "       - configuration -"
echo ""
echo ""
echo " type './configure -h' for help "
echo ""
echo ""
echo " Default mode is:"
echo "      * RELEASE mode"
echo ""
echo "-------------------------------"
echo "-------------------------------"
echo ""
echo ""

Johnny Jazeix's avatar
Johnny Jazeix committed
101 102 103 104 105 106 107
usage()
{
  echo "ViTE configuration shell-script"
  echo "Usage:"
  echo " ./configure [ options ]"
  echo
  echo "Options:"
108 109 110 111 112 113 114 115 116 117 118 119 120
  echo "  -h, --help"
  echo "        print this page"
  echo ""
  echo "  --release"
  echo "        compiles in release mode (by default)"
  echo ""
  echo "  --debug"
  echo "        compiles in debug mode"
  echo ""
  echo "  --enable_spinning_logo"
  echo "        makes the rabbit to turn when no trace is loaded"
  echo ""
  echo "  --enable_otf"
121
  echo "        enables the otf support (An OTF release is provided in the externals/otf directory)"
122 123 124 125 126 127 128 129 130 131
  echo ""
  echo "  --otf_dir=<path>"
  echo "        path to the OTF library"
  echo ""
  echo "  --otf_incdir=<path>"
  echo "        include path to the OTF headers"
  echo ""
  echo "  --otf_libdir=<path>"
  echo "        library path to the OTF libraries"
  echo ""
132
  echo "  --enable_tau"
133 134 135 136 137 138 139 140 141 142 143
  echo "        enables the tau support"
  echo ""
  echo "  --tau_dir=<path>"
  echo "        path to the TAU library"
  echo ""
  echo "  --tau_incdir=<path>"
  echo "        include path to the TAU headers"
  echo ""
  echo "  --tau_libdir=<path>"
  echo "        library path to the TAU libraries"
  echo ""
Johnny Jazeix's avatar
Johnny Jazeix committed
144 145 146 147 148 149 150 151 152 153 154
  exit 0
}


while [ 0 -lt $# ]; do
    OPT=$1
    shift 1
    case $OPT in
        --help|-h)  # help
            usage
            ;;
155 156
        --enable_spinning_logo) # good openGL spinning rabbit :)
            defines="$defines SPINNING_LOGO"
Johnny Jazeix's avatar
Johnny Jazeix committed
157
            ;;
158 159 160 161 162 163 164 165
        --release)
            config_specified=1;
            config="$config release"
            ;;
        --debug)
            config_specified=1;
            config="$config debug"
            ;;
166 167 168 169 170 171 172
        --enable_otf) # otf support
            with_otf=1;
            ;;
        --otf_dir=*) # otf directory
	    otfdir=`echo $OPT | awk -F"--otf_dir=" '{print $2}'`
	    otfincdir="$otfdir/include"
	    otflibdir="$otfdir/lib"
173
            ;;
174 175 176 177 178
        --otf_incdir=*) # otf include directory
	    otfincdir=`echo $OPT | awk -F"--otf_incdir=" '{print $2}'`
            ;;
        --otf_libdir=*)
            otflibdir=`echo $OPT | awk -F"--otf_libdir=" '{print $2}'`
179 180
            ;;
        --enable_tau) # tau support
181 182 183 184 185 186 187 188 189 190 191 192
            with_tau=1;
            ;;
        --tau_dir=*) # tau directory
	    taudir=`echo $OPT | awk -F"--tau_dir=" '{print $2}'`
	    tauincdir="$taudir/include"
	    taulibdir="$taudir/lib"
            ;;
        --tau_incdir=*) # tau include directory
	    tauincdir=`echo $OPT | awk -F"--tau_incdir=" '{print $2}'`
            ;;
        --tau_libdir=*)
            taulibdir=`echo $OPT | awk -F"--tau_libdir=" '{print $2}'`
193
            ;;
194 195 196 197 198 199 200 201 202 203 204 205
	# Internal options (Don't appear in --help)
        --qtcolor_dir=*) # qtcol directory
	    qtcolordir=`echo $OPT | awk -F"--qtcolor_dir=" '{print $2}'`
	    qtcolorincdir="$qtcolordir/include"
	    qtcolorlibdir="$qtcolordir/lib"
            ;;
        --qtcolor_incdir=*) # qtcolor include directory
	    qtcolorincdir=`echo $OPT | awk -F"--qtcolor_incdir=" '{print $2}'`
            ;;
        --qtcolor_libdir=*)
            qtcolorlibdir=`echo $OPT | awk -F"--qtcolor_libdir=" '{print $2}'`
            ;;
Johnny Jazeix's avatar
Johnny Jazeix committed
206 207 208 209 210 211 212
        *)
            echo "invalid option : $OPT";
            exit 0;
    esac

done

213
#end the qmake options
THIBAULT Samuel's avatar
THIBAULT Samuel committed
214
if [ $config_specified = 1 ]; then 
215 216 217 218
    config="$config\"";
else
    config="$config release\"";
fi
219

220 221 222 223 224
#
# External libraries
#

# OTF
225 226 227 228 229 230
if [ $with_otf = 1 ]; then
    defines="$defines WITH_OTF"
    sources="$sources parser/ParserOTF.cpp parser/ParserEventOTF.cpp parser/ParserDefinitionOTF.cpp"
    headers="$headers parser/ParserOTF.hpp parser/ParserEventOTF.hpp parser/ParserDefinitionOTF.hpp"
    includepath="$includepath $otfincdir"
    libs="$libs -L$otflibdir -lotf"
231 232
fi

233
# TAU
234 235 236 237 238 239 240
if [ $with_tau = 1 ] 
then
    defines="$defines WITH_TAU"
    sources="$sources parser/ParserTau.cpp"
    headers="$headers parser/ParserTau.hpp parser/TauStructs.hpp"
    includepath="$includepath $tauincdir"
    libs="$libs -L$taulibdir -lTAU_tf"
241 242
fi

243 244 245 246 247 248 249 250
# QT Color Picker
dependpath="$dependpath $qtcolorsrcdir"
includepath="$includepath $qtcolorincdir"

#
# End External libraries
#

251 252
defines="$defines\"";
libs="$libs\"";
253 254
includepath="$includepath\"";
dependpath="$dependpath\"";
255 256 257
sources="$sources\"";
headers="$headers\"";

258
options="$defines $config $libs $sources $headers $includepath $dependpath";
Johnny Jazeix's avatar
Johnny Jazeix committed
259

260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
# find a make command
if [ -z "$MAKE" ]; then
    MAKE=
    for mk in gmake make; do
        if "$WHICH" $mk >/dev/null 2>&1; then
            MAKE=`$WHICH $mk`
            break
        fi
    done
    if [ -z "$MAKE" ]; then
        echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
        echo >&2 "Cannot proceed."
        exit 1
    fi
fi


277
makecmd=$MAKE
278
if "$WHICH" qmake-qt4 >/dev/null 2>&1 ; then
279
    qmakecmd="qmake-qt4 -makefile -o Makefile"
Johnny Jazeix's avatar
Johnny Jazeix committed
280
elif "$WHICH" qmake >/dev/null 2>&1 && [ "$UNAME_SYSTEM" = "Darwin" ] ; then # Mac
281 282
    qmakecmd="qmake -spec macx-xcode "
    makecmd="xcodebuild -project vite.xcodeproj -configuration Debug clean build"
283
elif "$WHICH" qmake >/dev/null 2>&1 ; then
284
    qmakecmd="qmake -makefile -o Makefile"
285
elif "$WHICH" qmake-mac >/dev/null 2>&1 ; then # Mac the return
286
    qmakecmd="qmake-mac -makefile -o Makefile"
287 288 289 290 291
else # error
    echo >&2 "Warning: Impossible to find qmake or qmake-qt4."
    echo >&2 "Be sure that you have installed Qt and qmake (if it is not included in the Qt package)"
    rm -f Makefile
    exit
292
fi
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316

# Creates the makefile.in
cat > "Makefile.in" <<EOF
VITEDIR  = $relpath
DOCSDIR  = ./docs
QMAKECMD = $qmakecmd
MAKECMD  = $makecmd
EOF

# Creates the makefile
cat > "$makefile" <<EOF
########################################################################
##                                                                    ##
## This file was autogenerated by configure, all changes will be lost ##
##                                                                    ##
################### It has by done for ViTE project ####################
##                                                                    ##
########################################################################

include Makefile.in

all:
	( cd src && \$(QMAKECMD) $project $options)
	( cd src && \$(MAKECMD)  )
317 318 319 320 321 322
	@echo " "
	@echo "Compilation completed! File created in 'bin' folder."
	@echo " "

doc:
	doxygen Doxyfile
323 324 325
	$MAKE -C \${DOCSDIR}/latex
	$MAKE -C \${DOCSDIR}/user_manual
	$MAKE -C \${DOCSDIR}/technical_manual
326 327
	@echo " "
	@echo "Documentation generated successfully!"
328
	@echo "It could be find in the \${DOCSDIR} folder."
329 330
	@echo " "

331 332 333
plugins: 
	( cd plugins && VITEDIR=\$(VITEDIR) $MAKE )

334
clean:
335 336
	( cd plugins && VITEDIR=\$(VITEDIR) $MAKE clean )
	( cd src     && $MAKE clean )
Johnny Jazeix's avatar
Johnny Jazeix committed
337
	\$(RM) log.txt
338 339 340 341
	@echo " "
	@echo "Cleaned!"
	@echo " "

342
cleanall:	clean
343 344 345 346 347
	( cd plugins && VITEDIR=\$(VITEDIR) $MAKE cleanall )
	$MAKE -C \${DOCSDIR}/user_manual cleanall
	$MAKE -C \${DOCSDIR}/technical_manual cleanall
	@( cd \${DOCSDIR} && rm -rf html/ latex/)
	@( cd bin/ && \$(RM) vite)
Johnny Jazeix's avatar
Johnny Jazeix committed
348 349

distclean:	cleanall
350
	( cd plugins && VITEDIR=\$(VITEDIR) $MAKE distclean )
Johnny Jazeix's avatar
Johnny Jazeix committed
351 352
	\$(RM) Makefile
	\$(RM) src/Makefile
353 354 355 356 357 358
EOF

# basename erase the path of acces of the command 
MAKE=`basename $MAKE`

echo ViTE is now configured for building. Just run \'$MAKE\'.