Skip to content
Snippets Groups Projects
Commit 5ccb1b70 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

plumedcheck: autoconf

While doing plumedcheck, verify that autoconf has been applied correctly
parent 53a89ca8
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,7 @@ BEGIN{ ...@@ -67,6 +67,7 @@ BEGIN{
pre="" pre=""
opt_global_check=0 opt_global_check=0
astyle="astyle" astyle="astyle"
autoconf="autoconf"
for(i=1;i<ARGC;i++){ for(i=1;i<ARGC;i++){
opt=pre ARGV[i] opt=pre ARGV[i]
pre="" pre=""
...@@ -84,6 +85,9 @@ BEGIN{ ...@@ -84,6 +85,9 @@ BEGIN{
astyle_options=opt; astyle_options=opt;
break; break;
break; break;
case /--autoconf=.*/:
sub("^--autoconf=","",opt);
autoconf=opt;
case /-.*/: case /-.*/:
print "Unknown option " opt; exit(1) print "Unknown option " opt; exit(1)
default: default:
...@@ -209,6 +213,23 @@ BEGINFILE{ ...@@ -209,6 +213,23 @@ BEGINFILE{
system("rm " tempfile) system("rm " tempfile)
} }
# check if configure.ac is consistent with configure
if(filetype=="autoconf"){
tempfile = tmpdir "/configure"
configurefile = FILENAME
sub("\\.ac","",configurefile)
system("autoconf " FILENAME " > " tempfile)
s=system("diff -q " configurefile " " tempfile ">/dev/null 2>/dev/null")
# check if autoconf has been applied correctly
# DOC: :autoconf:
# DOC: In our git repository we distribute both `./configure` and `./configure.ac` files.
# DOC: When you modify the latter, the former should be regenerated using `autoconf` and
# DOC: committed to git. This error indicates that the `./configure.ac` and `./configure` files
# DOC: in the repository are not consistent.
if(s!=0) error("autoconf","autoconf not satisfied")
system("rm " tempfile)
}
} }
# line by line analysis # line by line analysis
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment