diff options
author | Charles Wilson <cygwin@cwilson.fastmail.fm> | 2009-10-30 00:53:47 +0300 |
---|---|---|
committer | Charles Wilson <cygwin@cwilson.fastmail.fm> | 2009-10-30 00:53:47 +0300 |
commit | c16cd856651c5d8fde6bfad41de6f24acd811e46 (patch) | |
tree | b9e89844e7c014b9e612ecce7bc6c58677a0b412 /winsup/mingw/profile | |
parent | d952e44c44093126b9b6dcfb9c8e0e338728f11b (diff) |
Honor DESTDIR for winsup/mingw and winsup/w32api
Diffstat (limited to 'winsup/mingw/profile')
-rw-r--r-- | winsup/mingw/profile/Makefile.in | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/winsup/mingw/profile/Makefile.in b/winsup/mingw/profile/Makefile.in index b918bfbb0..83a288033 100644 --- a/winsup/mingw/profile/Makefile.in +++ b/winsup/mingw/profile/Makefile.in @@ -128,18 +128,30 @@ info-html: install-info: info -install: all - $(mkinstalldirs) $(inst_libdir) +need-DESTDIR-compatibility = prefix libdir includedir +.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 for i in $(CRT0S); do \ - $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \ done for sub in . ; do \ - $(mkinstalldirs) $(inst_includedir)/$$sub ; \ + $(mkinstalldirs) $(DESTDIR)$(inst_includedir)/$$sub ; \ for i in $(srcdir)/$$sub/*.h ; do \ - $(INSTALL_DATA) $$i $(inst_includedir)/$$sub/`basename $$i` ; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(inst_includedir)/$$sub/`basename $$i` ; \ done ; \ done |