Skip to content

Commit 6b2e6f9

Browse files
committed
Makefile.in: Using current $CC in dmtcp/config.log?
1 parent 0f882dc commit 6b2e6f9

1 file changed

Lines changed: 22 additions & 3 deletions

File tree

Makefile.in

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,17 @@ DMTCP_ROOT ?= $(top_builddir)/dmtcp
4242
# Macros TEST and XTERM_E used on command line by check1, check2, ...:
4343
# make TEST=readline XTERM_E="xterm -e" check-readline
4444

45+
# MANA configure does configure DMTCP. But no re-make in DMTCP. Check ${CC}.
4546
default: display-build-env add-git-hooks mana_prereqs
47+
@ cc_version="$$(${CC} --version | head -1 | tr -d '\n')" ; \
48+
if test ! -e dmtcp/bin/dmtcp_coordinator || \
49+
test ! -e dmtcp/config.log || \
50+
! grep --quiet $${cc_version} dmtcp/config.log; then \
51+
echo "** DMTCP: not present, or else compiler version"; \
52+
echo " is not current: ${cc_version}"; \
53+
echo "** Doing 'make' in dmtcp subdirectory."; \
54+
$(MAKE) dmtcp; \
55+
fi
4656
$(MAKE) mana
4757

4858
all: default
@@ -82,14 +92,23 @@ distclean: clean
8292
rm -rf $(top_builddir)/lib
8393
- cd $(top_builddir)/bin && find . \! -name '*mana*' -delete
8494

95+
# MANA configure does configure DMTCP and 'make'; but doen't do a 'clean'.
96+
# Fix this in case a previous 'make' used a different ${CC} version.
97+
clean: tidy
98+
@ cc_version="$$(${CC} --version | head -1 | tr -d '\n')" ; \
99+
if test ! -e dmtcp/config.log || \
100+
! grep --quiet $${cc_version} dmtcp/config.log; then \
101+
echo "** DMTCP: compiler version is not current: ${cc_version}"; \
102+
echo "** Doing 'make clean' in dmtcp subdirectory."; \
103+
- cd ${DMTCP_ROOT} && $(MAKE) clean; \
104+
fi
105+
cd mpi-proxy-split && $(MAKE) clean
106+
85107
tidy:
86108
rm -rf ckpt_rank*
87109
rm -f ckpt_*.dmtcp dmtcp_restart_script*
88110
rm -f dmtcp_coordinator_db-*.json
89111

90-
clean: tidy
91-
cd mpi-proxy-split && $(MAKE) clean
92-
93112
mana_prereqs:
94113
@ if test -n "$$HUGETLB_DEFAULT_PAGE_SIZE"; then \
95114
echo '** Env. var. HUGETLB_DEFAULT_PAGE_SIZE detected.'; \

0 commit comments

Comments
 (0)