build: doc/html install ships only content, not build files

The doc/html install tar'd the whole $(srcdir), so it shipped Makefile.in
(always) and, for an in-tree build, the config.status-generated Makefile,
into $CAD_ROOT/magic/doc/html/.  That also made the install differ
in-tree (377 files) vs out-of-tree (376).

Exclude ./Makefile and ./Makefile.in from the tar.  The install now
contains only the 148 HTML files (+ subdirs) and is identical in-tree and
out-of-tree (375 files).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Darryl L. Miles 2026-07-22 18:57:43 +00:00 committed by R. Timothy Edwards
parent f2c77ad927
commit 54a5a919bb
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,11 @@ include $(MAGICDIR)/defs.mak
HTML_INSTDIR=$(INSTALL_LIBDIR)/magic/doc/html
install: $(DESTDIR)${HTML_INSTDIR}
tar -C $(srcdir) -cf - . | (cd $(DESTDIR)${HTML_INSTDIR}; tar xf - )
# Ship only the HTML content, not the build files. $(srcdir) holds
# Makefile.in (always) and, for an in-tree build, the config.status-generated
# Makefile; excluding both keeps the install identical in-tree vs out-of-tree.
tar -C $(srcdir) --exclude=./Makefile --exclude=./Makefile.in -cf - . \
| (cd $(DESTDIR)${HTML_INSTDIR}; tar xf - )
$(DESTDIR)${HTML_INSTDIR}:
${SCRIPTS}/mkdirs $(DESTDIR)${HTML_INSTDIR}