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) <[email protected]>
This commit is contained in:
Darryl L. Miles
2026-07-26 14:54:11 -04:00
committed by R. Timothy Edwards
co-authored by Claude Opus 4.8
parent f2c77ad927
commit 54a5a919bb
+5 -1
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}