/
configure
executable file
·99 lines (86 loc) · 3.18 KB
/
configure
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
#!/bin/bash
#----------------------------------------------------------------------------------------
#
# Copyright (C) 2018-2022 ENVIRON (www.quantum-environ.org)
# Copyright (C) 2001-2016 Quantum ESPRESSO (www.quantum-espresso.org)
#
#----------------------------------------------------------------------------------------
#
# This file is part of Environ version 3.0
#
# Environ 3.0 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# Environ 3.0 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more detail, either the file
# `License' in the root directory of the present distribution, or
# online at <http://www.gnu.org/licenses/>.
#
#----------------------------------------------------------------------------------------
#
# Authors: Courtesy of A. Ferretti and G. Bussi
# Modified by F. Spiga and P. Giannozzi
#
#----------------------------------------------------------------------------------------
#
# This script is a simple wrapper calling the autoconf
# configuration script (configure) in install/
#
# Dependencies may be also directly generated
#
#----------------------------------------------------------------------------------------
MANUAL=" Usage
configure [-h, --help] [--save] [<conf_flags>]
-h, --help print this manual
--save do not make clean
<conf_flags> these flags will be passed to
the autoconf configure
After configuration, the make.inc file will be created in the
QE home (current) directory
NOTE: CUDA Fortran code available only as a separate package
---------------------------------------------------------------
Manual from autoconf configure :
---------------------------------------------------------------
"
#
#================================================================
#
# run from directory where this script is
auxdir=$(echo "$0" | sed 's/\(.*\)\/.*/\1/') # extract pathname
if [ "$auxdir" != "configure" ]; then cd "$auxdir" || exit; fi
#
# detect the simplest cases
#
case $1 in
"-h" | "--help")
echo "$MANUAL"
./install/configure --help
exit 0
;;
esac
# run the autoconf configure with the given cong_flags
#
test -e ./install/make.inc && rm ./install/make.inc
test -e ./install/configure.msg && rm ./install/configure.msg
# SAFEGUARD: if you run configure without clean everything first there
# are chances that something goes wrong. Forcing veryclean then.
make depend
if [[ ($1 =~ "--save") ]]; then
shift
elif [[ (-e make.inc) && (-e Makefile) ]]; then
make -f Makefile veryclean
echo
fi
./install/configure "$@"
echo
# copy make.inc in the home dir and final clean up
#
test -e ./install/make.inc && mv ./install/make.inc .
test -e config.log && mv config.log ./install/
test -e config.status && mv config.status ./install/
test -e configure.msg && mv configure.msg ./install/
exit 0