diff --git a/Makefile b/Makefile index 59456f8..ce60f09 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 \ diff --git a/include/Makefile b/include/Makefile index 780ae0b..2a06425 100644 --- a/include/Makefile +++ b/include/Makefile @@ -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 \ diff --git a/include/arpa/Makefile b/include/arpa/Makefile index 64dbfde..ee2b830 100644 --- a/include/arpa/Makefile +++ b/include/arpa/Makefile @@ -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 \ diff --git a/include/bits/Makefile b/include/bits/Makefile index 43e9e9b..758537e 100644 --- a/include/bits/Makefile +++ b/include/bits/Makefile @@ -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 \ diff --git a/include/bits/types/Makefile b/include/bits/types/Makefile index 3a82f7d..3733251 100644 --- a/include/bits/types/Makefile +++ b/include/bits/types/Makefile @@ -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 \ diff --git a/include/mint/Makefile b/include/mint/Makefile index fcde642..5ff054a 100644 --- a/include/mint/Makefile +++ b/include/mint/Makefile @@ -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 \ diff --git a/include/mint/arch/Makefile b/include/mint/arch/Makefile index 683ea76..084acda 100644 --- a/include/mint/arch/Makefile +++ b/include/mint/arch/Makefile @@ -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 \ diff --git a/include/net/Makefile b/include/net/Makefile index 79b3de0..ea12bcc 100644 --- a/include/net/Makefile +++ b/include/net/Makefile @@ -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 \ diff --git a/include/netinet/Makefile b/include/netinet/Makefile index 72fdeff..264a565 100644 --- a/include/netinet/Makefile +++ b/include/netinet/Makefile @@ -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 \ diff --git a/include/nfs/Makefile b/include/nfs/Makefile index 781dc1e..128d819 100644 --- a/include/nfs/Makefile +++ b/include/nfs/Makefile @@ -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 \ diff --git a/include/protocols/Makefile b/include/protocols/Makefile index eadc5be..ce70b7a 100644 --- a/include/protocols/Makefile +++ b/include/protocols/Makefile @@ -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 \ diff --git a/include/rpc/Makefile b/include/rpc/Makefile index dde1403..a7fe7c3 100644 --- a/include/rpc/Makefile +++ b/include/rpc/Makefile @@ -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 \ diff --git a/include/rpcsvc/Makefile b/include/rpcsvc/Makefile index 3db2e9f..d7dd1fe 100644 --- a/include/rpcsvc/Makefile +++ b/include/rpcsvc/Makefile @@ -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 \ diff --git a/include/sys/Makefile b/include/sys/Makefile index 91d867a..dac2bd3 100644 --- a/include/sys/Makefile +++ b/include/sys/Makefile @@ -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 \