Skip to content

Commit a5b1e0c

Browse files
committed
Fix "make install-headers" again
It must not recursively descent into source directories, and must not depend on a cross-compiler already being available
1 parent 5919d04 commit a5b1e0c

File tree

14 files changed

+26
-14
lines changed

14 files changed

+26
-14
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ install-lib: all install-lib-recursive
133133

134134
install-include: all install-include-recursive
135135

136-
install-headers: install-include-recursive
136+
install-headers: install-headers-recursive
137137

138138
install-man: all install-man-recursive
139139

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

252+
install-headers-recursive:
253+
if test "${CROSS}" = yes -a "$(DESTDIR)${prefix}" = "/usr"; then \
254+
echo "attempting to install on host; aborting" >&2; \
255+
exit 1; \
256+
fi; \
257+
list='include'; \
258+
for subdir in $$list; do \
259+
target=`echo $@ | sed s/-recursive//`; \
260+
echo "Making $$target in $$subdir"; \
261+
$(MAKE) -C $$subdir $$target || exit 1; \
262+
done
263+
252264
dist-recursive bindist-recursive:
253265
@set fnord $(MAKEFLAGS); amf=$$2; \
254266
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \

include/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ syscall-list.h: $(csrcdir)/syscalls.list $(csrcdir)/gensys
7878

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

81-
install-include: remove-stale
81+
install-include install-headers: remove-stale
8282
$(mkinstalldirs) $(DESTDIR)$(includedir)
8383
@list='$(includefiles)'; for p in $$list; do \
8484
if test -f $$p; then \

include/arpa/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include $(top_srcdir)/rules
3030

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

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

include/bits/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ include $(top_srcdir)/rules
3232

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

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

include/bits/types/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include $(top_srcdir)/rules
3030

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

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

include/mint/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ include $(top_srcdir)/rules
3232

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

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

include/mint/arch/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include $(top_srcdir)/rules
3030

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

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

include/net/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include $(top_srcdir)/rules
3030

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

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

include/netinet/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include $(top_srcdir)/rules
3030

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

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

include/nfs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ include $(top_srcdir)/rules
3131
includefiles = $(filter %.h, $(MISCFILES))
3232
includefiles += $(filter %.x, $(MISCFILES))
3333

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

0 commit comments

Comments
 (0)