-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathMakefile.am
More file actions
58 lines (50 loc) · 1.88 KB
/
Makefile.am
File metadata and controls
58 lines (50 loc) · 1.88 KB
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
#
# Copyright (c) 2018-2026, Amazon.com, Inc. or its affiliates. All rights reserved.
#
# See LICENSE.txt for license information
#
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include 3rd-party src topology tests
EXTRA_DIST = \
autogen.sh \
CODE_OF_CONDUCT.md \
CONTRIBUTING.md \
INSTALL.md \
LICENSE \
NOTICE \
README.md \
RELEASENOTES.md \
m4/get_version.sh
AM_DISTCHECK_CONFIGURE_FLAGS=$(NCCL_NET_OFI_DISTCHCK_CONFIGURE_FLAGS)
# Reset ownership to 0 (root) in distribution tarball
# Ref: https://www.gnu.org/software/automake/manual/html_node/Basics-of-Distribution.html
TAR_OPTIONS = --owner=0 --group=0
export TAR_OPTIONS
# create a hook so that autogen.sh works in release tarballs
# Implement the equivalent of check-news, but for RELEASENOTES.md
dist-hook:
echo "Creating .release_version file"
@echo "@PACKAGE_VERSION@" > $(distdir)/.release_version
@echo $(VERSION) | grep -q '^git-' || \
case `sed 15q $(srcdir)/RELEASENOTES.md` in \
*"$(VERSION)"*) : ;; \
*) \
echo "RELEASENOTES.md not updated; not releasing" 1>&2; \
exit 1;; \
esac
# Format targets
format:
@VERSION=$$(clang-format --version | grep -oE '[0-9]+\.[0-9]+' | head -1); \
if [ "$$(echo "$$VERSION < 18.1" | bc -l)" -eq 1 ]; then \
echo "Error: clang-format version $$VERSION is too old. Version 18.1+ required for .clang-format-ignore support."; \
exit 1; \
fi; \
find src include -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i
check-format:
@VERSION=$$(clang-format --version | grep -oE '[0-9]+\.[0-9]+' | head -1); \
if [ "$$(echo "$$VERSION < 18.1" | bc -l)" -eq 1 ]; then \
echo "Error: clang-format version $$VERSION is too old. Version 18.1+ required for .clang-format-ignore support."; \
exit 1; \
fi; \
find src include -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.hpp" \) -print0 | xargs -0 clang-format --dry-run --Werror
.PHONY: format check-format