1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
|
## Process this file with automake to produce Makefile.in -*- makefile -*-
# $Source: bitbucket.org:berkeleylab/gasnet.git/Makefile.am $
# Description: Makefile for GASNet
# Copyright 2002, Dan Bonachea <bonachea@cs.berkeley.edu>
# Terms of use are as specified in license.txt
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I other/plpa/config
# Directories for automake to recurse into:
SUBDIRS = \
config-aux \
other
# GASNET_TOOLSONLY_TRUE_BEGIN
# CONDUITMODE_DIST_SUBDIRS =
# CONDUITMODE_headers =
# CONDUITMODE_EXTRA_DIST = .gasnet_toolsonly_mode
# CONDUITMODE_INSTALL_DOCS =
# GASNET_TOOLSONLY_TRUE_END
# GASNET_TOOLSONLY_FALSE_BEGIN
# Directories we manually recurse into:
CONDUITMODE_DIST_SUBDIRS = \
mpi-conduit \
smp-conduit \
udp-conduit \
ibv-conduit \
ucx-conduit \
ofi-conduit
CONDUITMODE_headers = \
gasnetex.h \
gasnet.h \
gasnet_ammacros.h \
gasnet_trace.h \
gasnet_fwd.h \
other/kinds/gasnet_mk.h \
extended-ref/coll/gasnet_coll.h \
extended-ref/ratomic/gasnet_ratomic.h \
extended-ref/vis/gasnet_vis.h
CONDUITMODE_EXTRA_DIST = \
docs \
extended-ref \
gasnet_legacy.c \
gasnet_event.c \
gasnet_event_internal.h \
gasnet_handler_internal.h \
gasnet_internal.h \
gasnet_internal.c \
gasnet_am.h \
gasnet_am.c \
gasnet_mmap.c \
gasnet_tm.c \
gasnet_diagnostic.c \
gasnet_pshm.h \
gasnet_pshm.c \
gasnet_syncops.h \
gasnet_trace.c
CONDUITMODE_INSTALL_DOCS = \
docs/memory_kinds.pdf \
docs/memory_kinds_implementation.md \
docs/implementation_defined.md \
docs/gasnet1_differences.md \
docs/GASNet-EX.txt
# GASNET_TOOLSONLY_FALSE_END
# bug3285: Order matters here: other should follow conduits to maintain dependencies for distclean
DIST_SUBDIRS = $(CONDUITMODE_DIST_SUBDIRS) $(SUBDIRS)
configdir = $(includedir)
config_DATA = $(CONFIG_HEADER)
if NEED_DOCDIR
docdir = $(datadir)/doc/GASNet
endif
headers = \
$(CONDUITMODE_headers) \
gasnet_asm.h \
gasnet_atomicops.h \
gasnet_atomic_bits.h \
gasnet_atomic_fwd.h \
gasnet_basic.h \
gasnet_help.h \
gasnet_membar.h \
gasnet_timer.h \
gasnet_tools.h \
gasnet_toolhelp.h
EXTRA_DIST = \
$(CONDUITMODE_EXTRA_DIST) \
README \
README-tools \
ChangeLog \
license.txt \
.autom4te.cfg \
Bootstrap \
unBootstrap \
configure.in \
acconfig.h \
acinclude.m4 \
gasnet_tools.c
# tests handled below
include_HEADERS = $(headers)
# deliberately omitted git-only docs: README-devel README-git README-release gasnet.*
INSTALL_DOCS = \
$(CONDUITMODE_INSTALL_DOCS) \
README \
README-tools \
license.txt
force:
#-------------------------------------------------------
# libgasnet_tools goop
if BUILD_SEQ_LIBS
libgasnet_tools_seq_a_SOURCES =
libraries_seq = libgasnet_tools-seq.a
fragments_seq = gasnet_tools-seq.mak
pkgconfig_seq = gasnet_tools-seq.pc
endif
if BUILD_PAR_LIBS
libgasnet_tools_par_a_SOURCES =
libraries_par = libgasnet_tools-par.a
fragments_par = gasnet_tools-par.mak
pkgconfig_par = gasnet_tools-par.pc
endif
libraries = $(libraries_seq) $(libraries_par)
fragments = $(fragments_seq) $(fragments_par)
pkgconfig = $(pkgconfig_seq) $(pkgconfig_par)
# leading - prevents distclean failures
-include $(top_builddir)/other/Makefile-libgasnet.mak
libgasnet_tools-seq.a: $(libgasnet_tools_dependencies)
@$(MAKE) do-libgasnet_tools-seq
libgasnet_tools-par.a: $(libgasnet_tools_dependencies)
@$(MAKE) do-libgasnet_tools-par
lib_LIBRARIES = $(libraries)
#-------------------------------------------------------
# bug1758: cannot depend on $(top_builddir)/other/Makefile-libgasnet.mak here,
# as that will cause a failure during distclean on some make versions
# make should automatically introduce the desired dependency on Makefile-libgasnet.mak.in
# due to the include operation above
Makefile: $(srcdir)/Makefile.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
# echo an arbitrary make/environment variable
echovar: force
@echo $(VARNAME)=\"$($(VARNAME))\"
if CONDUIT_MODE
@BUILD_PAR_LIBS_TRUE@ DEFAULT_TEST_MODE=par
@BUILD_PAR_LIBS_FALSE@ DEFAULT_TEST_MODE=seq
test: tests-$(DEFAULT_TEST_MODE)
tests: tests-$(DEFAULT_TEST_MODE)
tests-installed: tests-installed-$(DEFAULT_TEST_MODE)
# automake name, used by distcheck:
installcheck-local: tests-installed-$(DEFAULT_TEST_MODE)
# xSDK alias:
test_install: run-tests-installed-$(DEFAULT_TEST_MODE)
other-tests:
@cd $(top_builddir)/other && $(MAKE) all tests
tests-seq tests-parsync tests-par tests-installed-seq tests-installed-par tests-installed-parsync: other-tests
@for conduit in $(CONDUITS) ; do \
( cd "$(top_builddir)/$$conduit-conduit" && $(MAKE) $@ ) || exit $$?; \
done
TESTINSTANCE=$${PPID:-xxxx}
TESTLOG=`pwd`/.test-results
RUN_TEST_TARGETS= \
run-tests run-tests-seq run-tests-parsync run-tests-par \
run-tests-installed-seq run-tests-installed-parsync run-tests-installed-par
$(RUN_TEST_TARGETS): do-begin-tests
@testinst=$(TESTINSTANCE) ; \
testlog=$(TESTLOG) ; \
err=0 ; \
for conduit in $(CONDUITS) ; do \
( cd "$(top_builddir)/$$conduit-conduit" && \
$(MAKE) TESTINSTANCE=$$testinst TESTLOG=$$testlog \
TESTLOG_INHERIT=1 $@ ) || err=$$? ; \
if test "$$err" != "0" ; then \
echo " *-* COMPILE FAILURE: $$conduit-conduit $@ *-*" >> $(TESTLOG) ; \
break ; \
fi ; \
done ; \
if test "$$err" = "0" ; then \
( cd $(top_builddir)/other && \
$(MAKE) TESTINSTANCE=$$testinst TESTLOG=$$testlog \
TESTLOG_INHERIT=1 run-tests ) || err=$$? ; \
fi ; \
$(MAKE) TESTINSTANCE=$(TESTINSTANCE) TESTLOG=$(TESTLOG) do-end-tests ; \
exit $$err
do-begin-tests:
@testinst=$(TESTINSTANCE) ; \
testlog=$(TESTLOG) ; \
if test "`sed 1q $$testlog 2> /dev/null`" != "$$testinst" ; then \
echo "$$testinst" > $$testlog ; \
echo Starting a new test instance, log=$$testlog ; \
fi
do-end-tests:
@testinst=$(TESTINSTANCE) ; \
testlog=$(TESTLOG) ; \
if test "`sed 1q $$testlog 2> /dev/null`" = "$$testinst" ; then \
line='+++++++++++++++++++++++++++++++++++++++' ; line="$$line$$line" ; \
echo "$$line" ; \
echo Test results: `sed -n '1d;/\*-\*/p' $$testlog | wc -l` failures ; \
sed 1d $$testlog ; \
echo "$$line" ; \
fi
CLEANFILES = $(TESTLOG)
else
TOOLSONLY_CHECK = run-tests
TOOLSONLY_TESTS = testtools
test: tests
tests: $(TOOLSONLY_TESTS)
$(TOOLSONLY_TESTS): force
@$(MAKE) -f $(top_builddir)/tests/Makefile \
GASNET_INCLUDES="-I@TOP_BUILDDIR@ -I@TOP_SRCDIR@ -I@TOP_SRCDIR@/other" \
$@
run-tests: tests
./testtools
CLEANFILES = $(TOOLSONLY_TESTS)
endif
# Build, clean, install, uninstall, etc. the conduits - in parallel if possible.
# Instead of automake's loop over subdir, we expand to one target per subdir.
# Care is taken w/ the 'clean-local' rule in case distclean has wiped the
# local or conduit Makefiles
# Note that if ($VAR:%=%FOO) doesn't work for a given make, then we are
# reduced to using actual conduit names as PHONY targets, but the rule for
# $(recurse_local) is tailored to work correctly regardless.
recurse_local = $(CONDUITS:%=%-recurse) recurse_local_dummy
$(recurse_local):
@if test "$@" != "recurse_local_dummy" ; then \
cd `echo $@ | sed s/-recurse//`-conduit && $(MAKE) $(DO_WHAT) || exit $$? ; \
fi
# conduit subdirectories that should be made, even when the conduit is disabled
SPECIAL_SUBDIRS = mpi-conduit/contrib
recurse_special:
@for dir in $(SPECIAL_SUBDIRS) ; do \
if test -f $$dir/Makefile ; then \
cd $$dir && $(MAKE) $(DO_WHAT) || exit $$? ; \
fi ; \
done
all-local: $(lib_LIBRARIES) $(fragments) $(pkgconfig)
@$(MAKE) $(recurse_local) DO_WHAT=$${DO_WHAT=all}
@$(MAKE) recurse_special DO_WHAT=$${DO_WHAT=all}
clean-local:
rm -f $(fragments) $(pkgconfig)
@if test -f Makefile -a -f smp-conduit/Makefile; then \
$(MAKE) $(recurse_local) DO_WHAT=clean || exit $$? ; \
fi
@if test -f Makefile; then \
$(MAKE) recurse_special DO_WHAT=clean ; \
fi
check-local: check-exports $(TOOLSONLY_CHECK)
$(MAKE) check-pkgconfig CHECK_FILES="$(pkgconfig)"
seq par parsync:
@$(MAKE) $(recurse_local) DO_WHAT=$@
check tests-clean:
@$(MAKE) $(recurse_local) DO_WHAT=$@
@cd "$(top_builddir)/other" && $(MAKE) $@
check-prefix-vars: force
@if test -n "$(DESTDIR)" -a `expr "X$(DESTDIR)" : X/` = 0; then \
echo "ERROR: install \$$DESTDIR must begin with a '/' character."; \
exit 1; \
fi
@if test -n "$(DESTDIR)" -a `expr "$(DESTDIR)" : ".*[[:space:]]"` != 0; then \
echo "ERROR: install \$$DESTDIR must not contain space characters."; \
exit 1; \
fi
@if test `expr "X$(prefix)" : X/` = 0; then \
echo "ERROR: install \$$prefix must begin with a '/' character."; \
exit 1; \
fi
@if test `expr "$(prefix)" : ".*[[:space:]]"` != 0; then \
echo "ERROR: install \$$prefix must not contain space characters."; \
exit 1; \
fi
install-data-local: check-prefix-vars
@$(MAKE) $(recurse_local) DO_WHAT=install-data
@$(MAKE) recurse_special DO_WHAT=install-data
$(mkinstalldirs) $(DESTDIR)$(docdir)
if test -f $(top_srcdir)/version.git ; then \
$(INSTALL_DATA) $(top_srcdir)/version.git $(DESTDIR)$(docdir)/version.git || exit $$? ; \
fi
if test -f $(top_srcdir)/extended-ref/README ; then \
$(INSTALL_DATA) $(top_srcdir)/extended-ref/README $(DESTDIR)$(docdir)/README-extref || exit $$? ; \
fi
@: Automake 1.4 correct handling of headers given by relative path: ensure nested ext-ref headers get correctly installed in top-level include
@for file in $(include_HEADERS) ; do \
if test -f "$(srcdir)/$$file" ; then ( b=`basename $$file` ; set -x ; \
$(INSTALL_DATA) "$(srcdir)/$$file" "$(DESTDIR)$(includedir)/$$b" ) || exit $$?; \
fi; \
done
for file in $(INSTALL_DOCS) ; do \
$(INSTALL_DATA) $(top_srcdir)/$$file $(DESTDIR)$(docdir)/`basename $$file` || exit $$? ; \
done
$(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig
@list='$(fragments)'; for p in $$list; do \
if test -f $$p; then \
filename=`basename $$p`; \
destmak="$(DESTDIR)$(includedir)/$$filename"; \
echo @GASNET_INSTALL_CMD@ " < $$p > $$destmak"; \
@GASNET_INSTALL_CMD@ < $$p > $$destmak || exit $$? ; \
thread_model=`echo "$$filename" | sed 's/^.*-\(.*\)\.mak$$/\1/'` ; \
destpc="$(DESTDIR)$(libdir)/pkgconfig/gasnet_tools-$$thread_model.pc"; \
$(MAKE) do-pkgconfig-tools thread_model=$$thread_model pkgconfig_file="$$destpc" FRAGMENT="$$destmak" || exit $$? ; \
chmod 644 "$$destpc" || exit $$? ; \
else :; fi; \
done
install-exec-local: check-prefix-vars
@$(MAKE) $(recurse_local) DO_WHAT=install-exec
@$(MAKE) recurse_special DO_WHAT=install-exec
uninstall-local:
@if test -n "$(DESTDIR)" -a `expr "X$(DESTDIR)" : X/` = 0; then \
echo "ERROR: \$$DESTDIR must begin with a '/' character."; \
exit 1; \
fi
@if test `expr "X$(prefix)" : X/` = 0; then \
echo "ERROR: \$$prefix must begin with a '/' character."; \
exit 1; \
fi
@$(MAKE) $(recurse_local) DO_WHAT=uninstall
@$(MAKE) recurse_special DO_WHAT=uninstall
rm -Rf $(DESTDIR)$(docdir)
for file in $(fragments) ; do \
rm -f $(DESTDIR)$(includedir)/$$file ; \
done
rm -f $(DESTDIR)$(libdir)/pkgconfig/gasnet_tools-*.pc
# Bug3285: the behavior of distclean-recursive varies in incompatible ways
# across automake versions, such that no matter what variables we specify
# some versions will break the dependencies between subdirectories.
# Very early automakes ignore DIST_SUBDIRS entirely.
# We override it with our own top-level rule to ensure consistent ordering.
distclean: force
@for dir in $(DIST_SUBDIRS); do \
if test -f "$$dir/Makefile"; then \
( cd "$$dir" && $(MAKE) distclean ) || exit 1; \
fi; \
done
$(MAKE) recurse_special DO_WHAT=distclean
$(MAKE) $(AM_MAKEFLAGS) distclean-am
rm -f tests/Makefile
rm -f $(am__CONFIG_DISTCLEAN_FILES)
rm -f config.status gasnet_config.h stamp-h1
rm -f Makefile
.PHONY: force tests test do-begin-tests do-end-tests \
other-tests other-run-tests tests-seq tests-par tests-parsync \
run-tests-seq run-tests-par run-tests-parsync \
recurse_special $(recurse_local)
if TOOLSONLY_MODE
TESTDIST = README testtools.c test.h Makefile.in
# A tools-only git clone is *always* dirty, but we don't want to see the
# string '-dirty' in version info of distributed tarballs and resuting installs.
GIT_DESCRIBE_DIRTY =
else
TESTDIST = `find . -print | grep -v ^./mpi`
GIT_DESCRIBE_DIRTY = --dirty
endif
dist-hook:
@if grep -q 'cache_file=/dev/null' $(srcdir)/configure; then \
echo ERROR: Refusing to distribute configure not generated by Bootstrap. Please start with a clean source tree and Bootstrap. ; \
exit 1 ; \
fi
if test -d $(srcdir)/.git ; then \
GASNET_DESC=`( cd $(srcdir) && $${GIT=git} describe --long --always $(GIT_DESCRIBE_DIRTY) ) 2>/dev/null | head -n 1`; \
if test -z "$$GASNET_DESC"; then \
echo 'Use of git describe failed even though .git exists' 1>&2; \
exit 1; \
fi; \
$(PERL) -pi -e "s:no-version-control-info:$$GASNET_DESC:;" -- $(distdir)/configure || exit $$? ; \
echo $$GASNET_DESC > $(distdir)/version.git || exit $$? ; \
fi
if test -f $(distdir)/docs/Makefile ; then \
cd $(distdir)/docs && $(MAKE) dist-hook || exit $$? ; \
fi
mkdir -p $(distdir)/tests # need this special hack to handle tests or distcheck will fail
fulldistdir=`cd $(distdir) ; @PWD_PROG@` export fulldistdir ; \
cd $(srcdir)/tests ; for file in $(TESTDIST) ; do \
if test -d $$file -a ! -d $$fulldistdir/tests/$$file ; then \
mkdir -p $$fulldistdir/tests/$$file || exit $$? ; \
fi; \
if test -f $$file -a ! -f $$fulldistdir/tests/$$file ; then \
cp -p $$file $$fulldistdir/tests/$$file || exit $$? ; \
fi ; \
done
# If we've enabled PSHM, also enabled for 'make distcheck'
if USE_PSHM
PSHM_CONFIG_FLAG=--enable-pshm
else
PSHM_CONFIG_FLAG=
endif
DISTCHECK_CONFIGURE_FLAGS = $(PSHM_CONFIG_FLAG)
|