Skip to content

Commit

Permalink
Fix "make install-headers" again
Browse files Browse the repository at this point in the history
It must not recursively descent into source directories, and must not
depend on a cross-compiler already being available
  • Loading branch information
th-otto committed Jun 4, 2024
1 parent 5919d04 commit a5b1e0c
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 14 deletions.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ install-lib: all install-lib-recursive

install-include: all install-include-recursive

install-headers: install-include-recursive
install-headers: install-headers-recursive

install-man: all install-man-recursive

Expand Down Expand Up @@ -249,6 +249,18 @@ uninstall-include-recursive uninstall-man-recursive:
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"

install-headers-recursive:
if test "${CROSS}" = yes -a "$(DESTDIR)${prefix}" = "/usr"; then \
echo "attempting to install on host; aborting" >&2; \
exit 1; \
fi; \
list='include'; \
for subdir in $$list; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
$(MAKE) -C $$subdir $$target || exit 1; \
done

dist-recursive bindist-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
Expand Down
2 changes: 1 addition & 1 deletion include/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ syscall-list.h: $(csrcdir)/syscalls.list $(csrcdir)/gensys

includefiles = $(filter %.h, $(MISCFILES)) stab.def syscall-list.h

install-include: remove-stale
install-include install-headers: remove-stale
$(mkinstalldirs) $(DESTDIR)$(includedir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/arpa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/bits/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/bits/types/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/mint/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/mint/arch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/netinet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/nfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ include $(top_srcdir)/rules
includefiles = $(filter %.h, $(MISCFILES))
includefiles += $(filter %.x, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/protocols/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/rpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/rpcsvc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ include $(top_srcdir)/rules
includefiles = $(filter %.h, $(MISCFILES))
includefiles += $(filter %.x, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down
2 changes: 1 addition & 1 deletion include/sys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include $(top_srcdir)/rules

includefiles = $(filter %.h, $(MISCFILES))

install-include:
install-include install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/$(subdir)
@list='$(includefiles)'; for p in $$list; do \
if test -f $$p; then \
Expand Down

0 comments on commit a5b1e0c

Please sign in to comment.