Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Wilson <cygwin@cwilson.fastmail.fm>2009-10-30 00:53:47 +0300
committerCharles Wilson <cygwin@cwilson.fastmail.fm>2009-10-30 00:53:47 +0300
commitc16cd856651c5d8fde6bfad41de6f24acd811e46 (patch)
treeb9e89844e7c014b9e612ecce7bc6c58677a0b412 /winsup/mingw/mingwex/Makefile.in
parentd952e44c44093126b9b6dcfb9c8e0e338728f11b (diff)
Honor DESTDIR for winsup/mingw and winsup/w32api
Diffstat (limited to 'winsup/mingw/mingwex/Makefile.in')
-rw-r--r--winsup/mingw/mingwex/Makefile.in18
1 files changed, 15 insertions, 3 deletions
diff --git a/winsup/mingw/mingwex/Makefile.in b/winsup/mingw/mingwex/Makefile.in
index 2ccffe1ab..a495d5269 100644
--- a/winsup/mingw/mingwex/Makefile.in
+++ b/winsup/mingw/mingwex/Makefile.in
@@ -255,10 +255,22 @@ info-html:
install-info: info
-install: all
- $(mkinstalldirs) $(inst_libdir)
+need-DESTDIR-compatibility = prefix libdir
+.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
+
+$(need-DESTDIR-compatibility):
+ @test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
+ $(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
+ esac
+
+fail-DESTDIR-compatibility:
+ $(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
+ try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
+
+install: all $(need-DESTDIR-compatibility)
+ $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
done
clean: