Skip to content

Commit de3dfab

Browse files
bwbarrettrhc54
authored andcommitted
build: Import and use external Autoconf repo
Start using our external repo of Autoconf macros shared across the Open MPI, OpenPMIx, and PRRTE projects. For now, only move OAC_ASSERT_LITERAL and OAC_CHECK_PACKAGE, plus their dependencies, but we expect to move more over time. This will help manage the divergence in macros between the three projects (we already had significant divergence in CHECK_PACKAGE after less than a year). Signed-off-by: Brian Barrett <[email protected]>
1 parent 70ec5fe commit de3dfab

File tree

6 files changed

+62
-923
lines changed

6 files changed

+62
-923
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "oac"]
2+
path = config/oac
3+
url = ../../open-mpi/oac

autogen.pl

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,52 @@ sub replace_config_sub_guess {
887887

888888
#---------------------------------------------------------------------------
889889

890+
++$step;
891+
verbose "\n$step. Checking for git submodules\n\n";
892+
893+
# Make sure we got a submodule-full clone. If not, abort and let a
894+
# human figure it out.
895+
if (-f ".gitmodules") {
896+
open(IN, "git submodule status|")
897+
|| die "Can't run \"git submodule status\"";
898+
while (<IN>) {
899+
chomp;
900+
$_ =~ m/^(.)(.{40}) ([^ ]+) *\(*([^\(\)]*)\)*$/;
901+
my $status = $1;
902+
my $local_hash = $2;
903+
my $path = $3;
904+
my $extra = $4;
905+
906+
# Make sure the submodule is there
907+
if ($status eq "-") {
908+
print(" ==> ERROR: Missing
909+
910+
The submodule \"$path\" is missing.
911+
912+
Perhaps you forgot to \"git clone --recursive ...\", or you need to
913+
\"git submodule update --init --recursive\"...?\n\n");
914+
exit(1);
915+
}
916+
917+
# See if the submodule is at the expected git hash
918+
# (it may be ok if it's not -- just warn the user)
919+
$extra =~ m/-g(.+)/;
920+
my $remote_hash = $1;
921+
if ($remote_hash) {
922+
my $abbrev_local_hash = substr($local_hash, 0, length($remote_hash));
923+
if ($remote_hash ne $abbrev_local_hash) {
924+
print(" ==> WARNING: Submodule hash is different than upstream.
925+
If this is not intentional, you may want to run:
926+
\"git submodule update --init --recursive\"\n");
927+
} else {
928+
print(" Local hash == remote hash (good!)\n");
929+
}
930+
}
931+
}
932+
}
933+
934+
#---------------------------------------------------------------------------
935+
890936
# No platform file -- write an empty list
891937
$m4 .= "m4_define([autogen_platform_file], [])\n\n";
892938

@@ -973,7 +1019,7 @@ sub replace_config_sub_guess {
9731019

9741020
# Run autoreconf
9751021
verbose "==> Running autoreconf\n";
976-
my $cmd = "autoreconf -ivf --warnings=all,no-obsolete,no-override -I config";
1022+
my $cmd = "autoreconf -ivf --warnings=all,no-obsolete,no-override -I config -I config/oac";
9771023
safe_system($cmd);
9781024

9791025
patch_autotools_output(".");

config/oac

Submodule oac added at 5c8de3d

0 commit comments

Comments
 (0)