Skip to content

Commit afe234a

Browse files
committed
docs: do not set HTML install tree to 0755 perms
Follow on to 8ffe33f: do not set the dirs in the installed HTML files tree to have 0755 permissions because Automake doesn't do that when it creates directories. Additionally, add a comment explaining why the install-data-hook rule exists, and why we are doing what we are doing in it. Signed-off-by: Jeff Squyres <[email protected]>
1 parent 3c95815 commit afe234a

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

docs/Makefile.am

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
>#
22
# Copyright (c) 2022 Cisco Systems, Inc. All rights reserved.
33
#
44
# $COPYRIGHT$
@@ -889,10 +889,23 @@ man1_MANS += \
889889
man3_MANS += $(OSHMEM_MAN3_BUILT)
890890
endif
891891

892+
# We do not know the names of all the generated HTML files: we only
893+
# know that the generated tree will of files be in _build/html/.
894+
# Unfortunately, Automake's installation process only handles
895+
# individual files -- not entire trees of files. Hence, we use "cp -r
896+
# ..." to copy the entire generated tree to the target directory.
897+
#
898+
# Ensure to set the permissions of each file in that target tree to
899+
# 0644, mimicing what Automake's installation process does for
900+
# individual files.
901+
#
902+
# Note, however, that we specifically do *not* set directory
903+
# permissions because Automake simply uses MKDIR_P to make directories
904+
# and solely relies on the user's umask for the resulting permissions
905+
# on that directory.
892906
install-data-hook:
893907
$(MKDIR_P) $(DESTDIR)$(docdir)
894908
cp -r $(srcdir)/_build/html $(DESTDIR)$(docdir)
895-
find $(DESTDIR)$(docdir) -type d -exec chmod 0755 {} \;
896909
find $(DESTDIR)$(docdir) -type f -exec chmod 0644 {} \;
897910

898911
uninstall-hook:

0 commit comments

Comments
 (0)