Add DESTDIR support to mingw32 win32/Makefile.gcc.
This commit is contained in:
parent
2cd90d2bf5
commit
9f4d9052dc
@ -123,20 +123,20 @@ zlibrc.o: win32/zlib1.rc
|
|||||||
.PHONY: install uninstall clean
|
.PHONY: install uninstall clean
|
||||||
|
|
||||||
install: zlib.h zconf.h $(STATICLIB) $(IMPLIB)
|
install: zlib.h zconf.h $(STATICLIB) $(IMPLIB)
|
||||||
@if test -z "$(INCLUDE_PATH)" -o -z "$(LIBRARY_PATH)" -o -z "$(BINARY_PATH)"; then \
|
@if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \
|
||||||
echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \
|
echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
-@mkdir -p $(INCLUDE_PATH)
|
-@mkdir -p '$(DESTDIR)$(INCLUDE_PATH)'
|
||||||
-@mkdir -p $(LIBRARY_PATH) $(LIBRARY_PATH)/pkgconfig
|
-@mkdir -p '$(DESTDIR)$(LIBRARY_PATH)' '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig
|
||||||
-if [ "$(SHARED_MODE)" = "1" ]; then \
|
-if [ "$(SHARED_MODE)" = "1" ]; then \
|
||||||
mkdir -p $(BINARY_PATH); \
|
mkdir -p '$(DESTDIR)$(BINARY_PATH)'; \
|
||||||
$(INSTALL) $(SHAREDLIB) $(BINARY_PATH); \
|
$(INSTALL) $(SHAREDLIB) '$(DESTDIR)$(BINARY_PATH)'; \
|
||||||
$(INSTALL) $(IMPLIB) $(LIBRARY_PATH); \
|
$(INSTALL) $(IMPLIB) '$(DESTDIR)$(LIBRARY_PATH)'; \
|
||||||
fi
|
fi
|
||||||
-$(INSTALL) zlib.h $(INCLUDE_PATH)
|
-$(INSTALL) zlib.h '$(DESTDIR)$(INCLUDE_PATH)'
|
||||||
-$(INSTALL) zconf.h $(INCLUDE_PATH)
|
-$(INSTALL) zconf.h '$(DESTDIR)$(INCLUDE_PATH)'
|
||||||
-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
|
-$(INSTALL) $(STATICLIB) '$(DESTDIR)$(LIBRARY_PATH)'
|
||||||
sed \
|
sed \
|
||||||
-e 's|@prefix@|${prefix}|g' \
|
-e 's|@prefix@|${prefix}|g' \
|
||||||
-e 's|@exec_prefix@|${exec_prefix}|g' \
|
-e 's|@exec_prefix@|${exec_prefix}|g' \
|
||||||
@ -144,16 +144,16 @@ install: zlib.h zconf.h $(STATICLIB) $(IMPLIB)
|
|||||||
-e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \
|
-e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \
|
||||||
-e 's|@includedir@|$(INCLUDE_PATH)|g' \
|
-e 's|@includedir@|$(INCLUDE_PATH)|g' \
|
||||||
-e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \
|
-e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \
|
||||||
zlib.pc.in > $(LIBRARY_PATH)/pkgconfig/zlib.pc
|
zlib.pc.in > '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig/zlib.pc
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
-if [ "$(SHARED_MODE)" = "1" ]; then \
|
-if [ "$(SHARED_MODE)" = "1" ]; then \
|
||||||
$(RM) $(BINARY_PATH)/$(SHAREDLIB); \
|
$(RM) '$(DESTDIR)$(BINARY_PATH)'/$(SHAREDLIB); \
|
||||||
$(RM) $(LIBRARY_PATH)/$(IMPLIB); \
|
$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(IMPLIB); \
|
||||||
fi
|
fi
|
||||||
-$(RM) $(INCLUDE_PATH)/zlib.h
|
-$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zlib.h
|
||||||
-$(RM) $(INCLUDE_PATH)/zconf.h
|
-$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zconf.h
|
||||||
-$(RM) $(LIBRARY_PATH)/$(STATICLIB)
|
-$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(STATICLIB)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-$(RM) $(STATICLIB)
|
-$(RM) $(STATICLIB)
|
||||||
|
Loading…
Reference in New Issue
Block a user