diff options
-rw-r--r-- | winsup/mingw/ChangeLog | 18 | ||||
-rw-r--r-- | winsup/mingw/Makefile.in | 42 | ||||
-rw-r--r-- | winsup/mingw/mingwex/Makefile.in | 18 | ||||
-rw-r--r-- | winsup/mingw/profile/Makefile.in | 24 | ||||
-rw-r--r-- | winsup/w32api/ChangeLog | 17 | ||||
-rw-r--r-- | winsup/w32api/Makefile.in | 2 | ||||
-rw-r--r-- | winsup/w32api/lib/Makefile.in | 40 | ||||
-rw-r--r-- | winsup/w32api/lib/ddk/Makefile.in | 36 | ||||
-rw-r--r-- | winsup/w32api/lib/directx/Makefile.in | 36 |
9 files changed, 171 insertions, 62 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index e9ed69a41..abe67bbda 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,21 @@ +2009-10-29 Charles Wilson <mingw@cwilson.fastmail.fm> + + Honor DESTDIR for winsup/mingw and winsup/w32api. + Detect and report error if installation paths are win32 + format, but DESTDIR is non-empty. + + * Makefile.in (DESTDIR): Honor per convention. + (need-DESTDIR-compatibility): New macro; define it and a + corresponding rule. + (fail-DESTDIR-compatibility): New dependency goal. + (install-dirs): Require need-DESTDIR-compatibility. + * mingwex/Makefile.in (DESTDIR): Honor per convention. + (need-DESTDIR-compatibility): New macro; define it and a + corresponding rule. + (fail-DESTDIR-compatibility): New dependency goal. + (install): Require need-DESTDIR-compatibility. + * profile/Makefile.in: Ditto. + 2009-10-25 Charles Wilson <mingw@cwilson.fastmail.fm> Sync pseudo-reloc.c with mingw64 diff --git a/winsup/mingw/Makefile.in b/winsup/mingw/Makefile.in index ef67da893..7a51a9f16 100644 --- a/winsup/mingw/Makefile.in +++ b/winsup/mingw/Makefile.in @@ -90,6 +90,7 @@ inst_bindir:=$(tooldir)/bin inst_includedir:=$(tooldir)/include/mingw inst_libdir:=$(tooldir)/lib/mingw inst_docdir:=$(tooldir)/share/doc/mingw-runtime +need-DESTDIR-compatibility = prefix exec_prefix tooldir mandir else ifneq (,$(with_cross_host)) # @@ -104,11 +105,13 @@ inst_bindir:=$(tooldir)/bin inst_includedir:=$(tooldir)/include inst_libdir:=$(tooldir)/lib inst_docdir:=$(tooldir)/share/doc/mingw-runtime +need-DESTDIR-compatibility = prefix exec_prefix tooldir mandir else inst_bindir:=$(bindir) inst_includedir:=$(includedir) inst_libdir:=$(libdir) inst_docdir:=$(prefix)/doc/runtime +need-DESTDIR-compatibility = prefix bindir includedir libdir mandir endif endif @@ -274,7 +277,7 @@ all_dlls_host: $(DLLS) install_dlls_host: for i in $(DLLS); do \ - $(INSTALL_PROGRAM) $$i $(inst_bindir)/$$i ; \ + $(INSTALL_PROGRAM) $$i $(DESTDIR)$(inst_bindir)/$$i ; \ done _libm_dummy.o: @@ -493,25 +496,36 @@ info-html: install-info: info -install-dirs: - $(mkinstalldirs) $(inst_bindir) - $(mkinstalldirs) $(inst_includedir) - $(mkinstalldirs) $(inst_libdir) - $(mkinstalldirs) $(inst_docdir) - $(mkinstalldirs) $(mandir)/man$(mansection) +.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-dirs: $(need-DESTDIR-compatibility) + $(mkinstalldirs) $(DESTDIR)$(inst_bindir) + $(mkinstalldirs) $(DESTDIR)$(inst_includedir) + $(mkinstalldirs) $(DESTDIR)$(inst_libdir) + $(mkinstalldirs) $(DESTDIR)$(inst_docdir) + $(mkinstalldirs) $(DESTDIR)$(mandir)/man$(mansection) install: all install-dirs $(install_dlls_host) 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 i in $(INSTDOCS); do \ - $(INSTALL_DATA) $(srcdir)/$$i $(inst_docdir)/$$i ; \ + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(inst_docdir)/$$i ; \ done for sub in . sys ; do \ - dstdir=$(inst_includedir)/$$sub ; \ + dstdir=$(DESTDIR)$(inst_includedir)/$$sub ; \ $(mkinstalldirs) $$dstdir ; \ for i in $(srcdir)/include/$$sub/*.h ; do \ $(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \ @@ -521,10 +535,10 @@ install: all install-dirs $(install_dlls_host) # This provisional hack installs the only manpage we have at present... # It simply CANNOT suffice, when we have more manpages to ship. # - $(mkinstalldirs) $(mandir)/man$(mansection) - $(INSTALL_DATA) $(srcdir)/man/dirname.man $(mandir)/man$(mansection)/`\ + $(mkinstalldirs) $(DESTDIR)$(mandir)/man$(mansection) + $(INSTALL_DATA) $(srcdir)/man/dirname.man $(DESTDIR)$(mandir)/man$(mansection)/`\ echo dirname.man|sed '$(manpage_transform);s,man$$,$(mansection),'` - $(INSTALL_DATA) $(srcdir)/man/dirname.man $(mandir)/man$(mansection)/`\ + $(INSTALL_DATA) $(srcdir)/man/dirname.man $(DESTDIR)$(mandir)/man$(mansection)/`\ echo basename.man|sed '$(manpage_transform);s,man$$,$(mansection),'` # # End provisional hack. 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: 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 diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index 329e4b54c..e0d9449de 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,3 +1,20 @@ +2009-10-29 Charles Wilson <mingw@cwilson.fastmail.fm> + + Honor DESTDIR for winsup/mingw and winsup/w32api. + Detect and report error if installation paths are win32 + format, but DESTDIR is non-empty. + + * Makefile.in (install, uninstall): Use FLAGS_TO_PASS + when invoking make in subdirs. + * lib/Makefile.in (DESTDIR): Honor per convention. + (need-DESTDIR-compatibility): New macro; define it and a + corresponding rule. + (fail-DESTDIR-compatibility): New dependency goal. + (install-libraries, install-headers, uninstall-libraries, + uninstall-headers): Require need-DESTDIR-compatibility. + * lib/ddk/Makefile.in: Ditto. + * lib/directx/Makefile.in: Ditto. + 2009-10-04 Corinna Vinschen <corinna@vinschen.de> * include/winbase.h (CreateRestrictedToken): Declare for >= Win 2000. diff --git a/winsup/w32api/Makefile.in b/winsup/w32api/Makefile.in index e97cdd36b..e48e1de09 100644 --- a/winsup/w32api/Makefile.in +++ b/winsup/w32api/Makefile.in @@ -89,7 +89,7 @@ test: install uninstall: for i in $(SUBDIRS); do \ - (cd $$i; $(MAKE) $@); \ + (cd $$i; $(MAKE) $@ $(FLAGS_TO_PASS)); \ done ifdef SNAPDATE diff --git a/winsup/w32api/lib/Makefile.in b/winsup/w32api/lib/Makefile.in index d1bcebffc..9439627c3 100644 --- a/winsup/w32api/lib/Makefile.in +++ b/winsup/w32api/lib/Makefile.in @@ -208,24 +208,36 @@ lib%.a: %.o $(AR) rc $@ $*.o $(RANLIB) $@ +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) + .PHONY: install install-libraries install-headers install-ddk # install headers and libraries in a target specified directory. install: install-libraries install-headers install-ddk install-directx -install-libraries: all - $(mkinstalldirs) $(inst_libdir) +install-libraries: 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 -install-headers: - $(mkinstalldirs) $(inst_includedir) +install-headers: $(need-DESTDIR-compatibility) + $(mkinstalldirs) $(DESTDIR)$(inst_includedir) for i in $(HEADERS); do \ - $(INSTALL_DATA) $(srcdir)/../include/$$i $(inst_includedir)/$$i ; \ + $(INSTALL_DATA) $(srcdir)/../include/$$i $(DESTDIR)$(inst_includedir)/$$i ; \ done - $(mkinstalldirs) $(inst_includedir)/GL + $(mkinstalldirs) $(DESTDIR)$(inst_includedir)/GL for i in $(GL_HEADERS); do \ - $(INSTALL_DATA) $(srcdir)/../include/GL/$$i $(inst_includedir)/GL/$$i ; \ + $(INSTALL_DATA) $(srcdir)/../include/GL/$$i $(DESTDIR)$(inst_includedir)/GL/$$i ; \ done install-ddk: install-libraries install-headers @@ -237,17 +249,17 @@ install-directx: install-libraries install-headers # uninstall headers and libraries from a target specified directory uninstall: uninstall-ddk uninstall-directx uninstall-libraries uninstall-headers -uninstall-libraries: +uninstall-libraries: $(need-DESTDIR-compatibility) @for i in $(LIBS); do \ - rm -f $(inst_libdir)/$$i ; \ + rm -f $(DESTDIR)$(inst_libdir)/$$i ; \ done - rmdir $(inst_libdir) + rmdir $(DESTDIR)$(inst_libdir) -uninstall-headers: +uninstall-headers: $(need-DESTDIR-compatibility) @for i in $(HEADERS); do \ - rm -r $(inst_includedir)/$$i ; \ + rm -r $(DESTDIR)$(inst_includedir)/$$i ; \ done - rmdir $(inst_includedir) + rmdir $(DESTDIR)$(inst_includedir) uninstall-ddk: cd ddk && $(MAKE) -C uninstall $(FLAGS_TO_PASS) diff --git a/winsup/w32api/lib/ddk/Makefile.in b/winsup/w32api/lib/ddk/Makefile.in index 80b148c2a..d6040f3cc 100644 --- a/winsup/w32api/lib/ddk/Makefile.in +++ b/winsup/w32api/lib/ddk/Makefile.in @@ -141,35 +141,47 @@ lib%.a: %.o $(AR) rc $@ $*.o $(RANLIB) $@ +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 headers and libraries in a target specified directory. install: install-libraries install-headers -install-libraries: all - $(mkinstalldirs) $(inst_libdir) +install-libraries: 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 -install-headers: - $(mkinstalldirs) $(inst_includedir) +install-headers: $(need-DESTDIR-compatibility) + $(mkinstalldirs) $(DESTDIR)$(inst_includedir) for i in $(HEADERS); do \ - $(INSTALL_DATA) $(srcdir)/../../include/ddk/$$i $(inst_includedir)/$$i ; \ + $(INSTALL_DATA) $(srcdir)/../../include/ddk/$$i $(DESTDIR)$(inst_includedir)/$$i ; \ done # uninstall headers and libraries from a target specified directory uninstall: uninstall-libraries uninstall-headers -uninstall-libraries: +uninstall-libraries: $(need-DESTDIR-compatibility) @for i in $(LIBS); do \ - rm -f $(inst_libdir)/$$i ; \ + rm -f $(DESTDIR)$(inst_libdir)/$$i ; \ done - rmdir $(inst_libdir) + rmdir $(DESTDIR)$(inst_libdir) -uninstall-headers: +uninstall-headers: $(need-DESTDIR-compatibility) @for i in $(HEADERS); do \ - rm -r $(inst_includedir)/$$i ; \ + rm -r $(DESTDIR)$(inst_includedir)/$$i ; \ done - rmdir $(inst_includedir) + rmdir $(DESTDIR)$(inst_includedir) dist: diff --git a/winsup/w32api/lib/directx/Makefile.in b/winsup/w32api/lib/directx/Makefile.in index a56c398d5..89a3cc602 100644 --- a/winsup/w32api/lib/directx/Makefile.in +++ b/winsup/w32api/lib/directx/Makefile.in @@ -166,35 +166,47 @@ lib%.a: %.o $(AR) rc $@ $*.o $(RANLIB) $@ +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 headers and libraries in a target specified directory. install: install-libraries install-headers -install-libraries: all - $(mkinstalldirs) $(inst_libdir) +install-libraries: 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 -install-headers: - $(mkinstalldirs) $(inst_includedir) +install-headers: $(need-DESTDIR-compatibility) + $(mkinstalldirs) $(DESTDIR)$(inst_includedir) for i in $(HEADERS); do \ - $(INSTALL_DATA) $(srcdir)/../../include/directx/$$i $(inst_includedir)/$$i ; \ + $(INSTALL_DATA) $(srcdir)/../../include/directx/$$i $(DESTDIR)$(inst_includedir)/$$i ; \ done # uninstall headers and libraries from a target specified directory uninstall: uninstall-libraries uninstall-headers -uninstall-libraries: +uninstall-libraries: $(need-DESTDIR-compatibility) @for i in $(LIBS); do \ - rm -f $(inst_libdir)/$$i ; \ + rm -f $(DESTDIR)$(inst_libdir)/$$i ; \ done - rmdir $(inst_libdir) + rmdir $(DESTDIR)$(inst_libdir) -uninstall-headers: +uninstall-headers: $(need-DESTDIR-compatibility) @for i in $(HEADERS); do \ - rm -r $(inst_includedir)/$$i ; \ + rm -r $(DESTDIR)$(inst_includedir)/$$i ; \ done - rmdir $(inst_includedir) + rmdir $(DESTDIR)$(inst_includedir) dist: |