Skip to content

Commit d63eece

Browse files
authored
add support for make flags to the build info script (#4672)
we can capture any flags provided to "make" via the $(MAKEFLAGS) variable and pass them into the build info generator. This allows us to store the command line overrides in a job_info
1 parent 38547bb commit d63eece

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Tools/C_scripts/AMReX_buildInfo.H

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const char* buildInfoGetCXXFlags();
2121
const char* buildInfoGetFFlags();
2222
const char* buildInfoGetLinkFlags();
2323
const char* buildInfoGetLibraries();
24+
const char* buildInfoGetMakeFlags();
2425
const char* buildInfoGetAux(int i);
2526
int buildInfoGetNumModules();
2627
const char* buildInfoGetModuleName(int i);

Tools/C_scripts/makebuildinfo_C.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
return libraries;
9797
}
9898
99+
const char* buildInfoGetMakeFlags() {
100+
101+
static const char make_flags[] = "@@make_flags@@";
102+
return make_flags;
103+
}
104+
99105
const char* buildInfoGetAux(int i) {
100106
101107
//static const char AUX1[] = "${AUX[1]}";
@@ -238,6 +244,10 @@ def get_git_hash(d, git_style):
238244

239245
parser.add_argument("--libraries", help="libraries linked", type=str, default="")
240246

247+
parser.add_argument("--make_flags",
248+
help="the options provided to the make command",
249+
type=str, default="")
250+
241251
parser.add_argument("--AUX",
242252
help="auxiliary information (EOS, network path) (deprecated)",
243253
type=str, default="")

0 commit comments

Comments
 (0)