~m-grant-prg/acmbuild/jammy-trunk

« back to all changes in this revision

Viewing changes to src/prg/bash/bootstrap.sh.in

  • Committer: Mark Grant
  • Date: 2022-06-07 09:39:02 UTC
  • mfrom: (1.1.52)
  • Revision ID: m.grant.prg@gmail.com-20220607093902-h8a1c5fri06jgsrh
Merge new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#########################################################################
10
10
#                                                                       #
11
11
# Script ID: bootstrap.sh                                               #
12
 
# Author: Copyright (C) 2014-2019, 2021  Mark Grant                     #
 
12
# Author: Copyright (C) 2014-2019, 2021, 2022  Mark Grant               #
13
13
#                                                                       #
14
14
# Released under the GPLv3 only.                                        #
15
15
# SPDX-License-Identifier: GPL-3.0-only                                 #
18
18
# To simplify the AutoTools distribution build.                         #
19
19
#                                                                       #
20
20
# Syntax:       bootstrap.sh    [ -a || --at-only ] ||                  #
 
21
#                               [ -A || --analyzer ] ||                 #
21
22
#                               [ -b || --build ] ||                    #
22
23
#                               [ -c || --config ] ||                   #
23
24
#                               [ -C || --distcheck ] ||                #
154
155
#                               Use a temporary file to get result back #
155
156
#                               from configurable-options.sh            #
156
157
# 21/11/2021    MG      1.4.10  Tighten SPDX tag.                       #
 
158
# 07/06/2022    MG      1.5.1   Add compiler option -A --analyzer.      #
157
159
#                                                                       #
158
160
#########################################################################
159
161
 
162
164
# Init variables #
163
165
##################
164
166
 
165
 
readonly version=1.4.10                 # set version variable
 
167
readonly version=1.5.1                  # set version variable
166
168
readonly packageversion=@pkgversion@    # Version of the complete package
167
169
 
168
170
# Set defaults
169
171
atonly=""
 
172
analyzer=""
170
173
build=false
171
174
check=false
172
175
config=false
204
207
                Java jar in datadir but in AT builds and installations this
205
208
                may expand to /usr/local/share... So a substitution is required
206
209
                for this scenario.
 
210
        -A or --analyzer enable compiler analyzer output
207
211
        -b or --build make the project
208
212
        -c or --config congigure the project
209
213
        -C or --distcheck perform normal distcheck
285
289
        local script_name="acmbuild.sh/bootstrap.sh"
286
290
        local tmp
287
291
 
288
 
        tmp="getopt -o abcCdDghHKmp::stTvV "
289
 
        tmp+="--long at-only,build,check,config,distcheck,debug,dist,gnulib"
290
 
        tmp+=",help,header-check,menu-config,parallel-jobs::,sparse"
 
292
        tmp="getopt -o aAbcCdDghHKmp::stTvV "
 
293
        tmp+="--long at-only,analyzer,build,check,config,distcheck,debug,dist"
 
294
        tmp+=",gnulib,help,header-check,menu-config,parallel-jobs::,sparse"
291
295
        tmp+=",source-tarball,testing-hacks,verbose,version"
292
296
        GETOPTTEMP=$($tmp -n "$script_name" -- "$@")
293
297
        std_cmd_err_handler $?
301
305
                        atonly=" --enable-atonly=yes"
302
306
                        shift
303
307
                        ;;
 
308
                -A|--analyzer)
 
309
                        analyzer=" --enable-analyzer=yes"
 
310
                        shift
 
311
                        ;;
304
312
                -b|--build)
305
313
                        if $distcheck || $dist || $tarball; then
306
314
                                msg="Options b, C, D and T are mutually "
419
427
                esac
420
428
        done
421
429
 
422
 
        if [[ $atonly || $debug || $headercheck || $sparse || $testinghacks ]] \
423
 
                || $verbose ; then
 
430
        if [[ $atonly || $analyzer || $debug || $headercheck || $sparse \
 
431
                || $testinghacks ]] || $verbose ; then
424
432
                if ! $config ; then
425
 
                        msg="Options a, d, H, s, t and v require option c."
 
433
                        msg="Options a, A, d, H, s, t and v require option c."
426
434
                        output "$msg" 1
427
435
                        script_exit 64
428
436
                fi
518
526
        std_cmd_err_handler $status
519
527
 
520
528
        cmdline="$basedir/configure$configcli_extra_args$verboseconfig"
521
 
        cmdline+="$atonly$debug$headercheck$sparse$testinghacks"
 
529
        cmdline+="$atonly$analyzer$debug$headercheck$sparse$testinghacks"
522
530
 
523
531
        eval "$cmdline"
524
532
        status=$?