Permalink
Browse files

build: Avoid crashing for SIESTA build

The final 'touch /.f90 /.F90' command in the configure
script is included directly from configure.ac in order to:

  dnl and to stop over-eager makes trying to recreate f90 files
  dnl when m4 is not gnu m4.

(which is hard to test for unless you happen to have a
non gnu m4). This fails if configure is run from outside
the main FoX directory (e.g. for Siesta when VPATH is used)
and, furthermore, if FoX is configured from within a Makefile
the make will terminate with an error. Wrap the touch command
in a subshell and always report sucess, even if the touch
fails.
  • Loading branch information...
1 parent 84fe209 commit 6ae5a66631151463c1d1fb54c3823c149294d746 @andreww committed May 13, 2012
Showing with 6 additions and 3 deletions.
  1. +5 −2 config/configure.ac
  2. +1 −1 configure
View
@@ -205,6 +205,9 @@ AC_OUTPUT
chmod +x FoX-config
touch .config
dnl and to stop over-eager makes trying to recreate f90 files
-dnl when m4 is not gnu m4 ..
-touch */*.f90 */*.F90
+dnl when m4 is not gnu m4.
+dnl But, if we are in a VPATH make (and wrapped in a recursive
+dnl makefile - e.g. SIESTA) this fails so wrap in a subshell
+dnl and always report sucess.
+(touch */*.f90 */*.F90 ; exit 0)
dnl
View
@@ -7439,4 +7439,4 @@ fi
chmod +x FoX-config
touch .config
-touch */*.f90 */*.F90
+(touch */*.f90 */*.F90 ; exit 0)

0 comments on commit 6ae5a66

Please sign in to comment.