Skip to content

Commit fc7bd2c

Browse files
committed
Use automake's nobase_nodist_include_HEADERS variable for poly2tri headers
We don't want to distribute the modified poly2tri headers that we create during the build process, but we _do_ want to install them (with the proper relative directory structure), so that libmesh users can include them in their own codes.
1 parent 1cf7a40 commit fc7bd2c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

contrib/poly2tri/modified/Makefile.am

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,22 @@ poly2tri_headers = poly2tri/poly2tri.h \
2727
poly2tri/sweep/sweep_context.h \
2828
poly2tri/sweep/sweep.h
2929

30-
nodist_include_HEADERS = $(poly2tri_headers)
30+
# includedir is an automake variable, and we are just using its default value here
31+
includedir = $(prefix)/include
32+
33+
# nobase_include_HEADERS are headers which should be _installed_ while maintaining relative paths.
34+
# nodist_include_HEADERS are headers which should _not_ be included as part of the source distribution.
35+
#
36+
# In our case, we _do_ want to install the modified poly2tri headers
37+
# that we create during the build process, but we don't want to
38+
# distribute them. If you separately specify the same set of headers
39+
# as both nobase_ and nodist_, this apparently creates a conflict for
40+
# automake, and it ends up including the files in the distribution
41+
# anyway. But, according to Google AI: "If you need both
42+
# behaviors--keeping the subdirectory structure AND not
43+
# distributing--the correct variable name is
44+
# nobase_nodist_include_HEADERS. The nobase_ prefix must come first."
45+
nobase_nodist_include_HEADERS = $(poly2tri_headers)
3146

3247
BUILT_SOURCES = $(poly2tri_headers)
3348

0 commit comments

Comments
 (0)