+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
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))
#
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
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:
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` ; \
# 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.
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:
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
+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.
install uninstall:
for i in $(SUBDIRS); do \
- (cd $$i; $(MAKE) $@); \
+ (cd $$i; $(MAKE) $@ $(FLAGS_TO_PASS)); \
done
ifdef SNAPDATE
$(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
# 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)
$(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:
$(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: