forked from abinit/abinit-fallbacks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautogen.sh
More file actions
executable file
·75 lines (62 loc) · 2.23 KB
/
autogen.sh
File metadata and controls
executable file
·75 lines (62 loc) · 2.23 KB
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
#!/bin/sh
#
# Copyright (C) 2010-2014 ABINIT group (Yann Pouillon)
#
# This file is part of the Abinit software package. For license information,
# please see the COPYING file in the top-level directory of the source
# distribution.
#
# Stop at first error encountered
set -e
# Check that we are in the right directory
if test ! -s "./configure.ac" -o ! -s "config/specs/fallbacks.conf"; then
echo "[fbkbuild] This is not an Abinit Fallbacks source tree - aborting now" >&2
exit 1
fi
# Create possibly missing directories
mkdir -p config/gnu config/m4
# Generate input files for configure
echo "[fbkbuild] Generating configure inputs"
./config/scripts/make-config-dumper
# Generate M4 macros
echo "[fbkbuild] Generating M4 macros"
./config/scripts/make-macros-environment
./config/scripts/make-macros-fallbacks
./config/scripts/make-macros-info
./config/scripts/make-macros-options
./config/scripts/make-macros-patches
# Generate source files
echo "[fbkbuild] Generating source files"
./config/scripts/make-fallbacks-config-in
./config/scripts/make-install-symlinks-in
# Generate makefiles
echo "[fbkbuild] Generating makefiles"
./config/scripts/make-makefiles-fallbacks
# Generate M4 includes
echo "[fbkbuild] Generating aclocal.m4"
aclocal -I config/m4
# Generate configure auxiliary files
#echo "[fbkbuild] Generating config.h.in"
#autoheader
# Generate configure
echo "[fbkbuild] Generating configure script"
autoconf
# Fix compatibility with automake 1.17 version (by tsaihsiaoyi)
sed -i '/^am__api_version/c\am__api_version=`automake --version 2>/dev/null | sed -nE '\''s/.* ([0-9]+\.[0-9]+)(\.[0-9]+)?$/\1/p'\''`' configure
# Generate libtool scripts
#echo "[fbkbuild] Generating libtool scripts"
#my_libtoolize="libtoolize"
#${my_libtoolize} --version >/dev/null 2>&1
#if test "${?}" != "0"; then
# my_libtoolize="glibtoolize"
#fi
#${my_libtoolize} --version >/dev/null 2>&1
#if test "${?}" != "0"; then
# echo "[fbkbuild] Error: could not find a working version of libtoolize" >&2
# exit 1
#fi
#${my_libtoolize} --automake --copy --force
# Generate makefile inputs
# Do not use "automake --force-missing", as it overwrites the INSTALL file.
echo "[fbkbuild] Generating Makefile.in for each directory"
automake --add-missing --copy