Update buildsys

This commit is contained in:
Jonathan Schleifer 2018-01-21 21:52:58 +01:00
parent 69a336682e
commit a156dab77d
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
2 changed files with 144 additions and 81 deletions

View file

@ -1,7 +1,7 @@
#
# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
# 2017
# Jonathan Schleifer <js@heap.zone>
# 2017, 2018
# Jonathan Schleifer <js@heap.zone>
#
# https://heap.zone/git/?p=buildsys.git
#
@ -80,6 +80,7 @@ JAVAC = @JAVAC@
JAVACFLAGS = @JAVACFLAGS@
JAR = @JAR@
WINDRES = @WINDRES@
BUILD_AND_HOST_ARE_DARWIN = @BUILD_AND_HOST_ARE_DARWIN@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
@ -89,6 +90,7 @@ datarootdir = @datarootdir@
datadir = @datadir@
includedir = @includedir@
includesubdir ?= ${PACKAGE_NAME}
INSTALL_INCLUDES ?= yes
localedir = @localedir@
localename ?= ${PACKAGE_NAME}
mandir = @mandir@
@ -122,7 +124,7 @@ all:
${MAKE} pre-all
${MAKE} subdirs
${MAKE} depend
${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${MORPHOS_LIB} ${MORPHOS_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales
${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${FRAMEWORK} ${FRAMEWORK_NOINST} ${MORPHOS_LIB} ${MORPHOS_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales
${MAKE} subdirs-after
${MAKE} post-all
@ -251,7 +253,7 @@ ${SHARED_LIB} ${SHARED_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${LINK_FAILED}; \
fi
${FRAMEWORK}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${FRAMEWORK} ${FRAMEWORK_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
rm -fr $@
${MKDIR_P} $@
${MAKE} INSTALL_INCLUDES_IF_SUBDIR=${includesubdir} INSTALL_INCLUDES_DESTINATION=$$PWD/$@/Headers install-includes
@ -302,78 +304,96 @@ ${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${PLUGIN_OBJS}
${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
out="$@"; \
objs=""; \
ars=""; \
for i in ${OBJS} ${OBJS_EXTRA}; do \
case $$i in \
*.a) \
ars="$$ars $$i" \
;; \
*.o) \
objs="$$objs $$i" \
;; \
esac \
done; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
mkdir -p $$dir; \
cd $$dir; \
${AR} x ../$$i; \
for j in *.o; do \
objs="$$objs $$dir/$$j"; \
done; \
cd ..; \
done; \
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
${LINK_OK}; \
if test x"${BUILD_AND_HOST_ARE_DARWIN}" = x"yes"; then \
if /usr/bin/libtool -static -o $@ ${OBJS} ${OBJS_EXTRA}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done
out="$@"; \
objs=""; \
ars=""; \
for i in ${OBJS} ${OBJS_EXTRA}; do \
case $$i in \
*.a) \
ars="$$ars $$i" \
;; \
*.o) \
objs="$$objs $$i" \
;; \
esac \
done; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
mkdir -p $$dir; \
cd $$dir; \
${AR} x ../$$i; \
for j in *.o; do \
objs="$$objs $$dir/$$j"; \
done; \
cd ..; \
done; \
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done; \
fi
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
out="$@"; \
objs=""; \
ars=""; \
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
case $$i in \
*.a) \
ars="$$ars $$i" \
;; \
*.o) \
objs="$$objs $$i" \
;; \
esac \
done; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
mkdir -p $$dir; \
cd $$dir; \
${AR} x ../$$i; \
for j in *.o; do \
objs="$$objs $$dir/$$j"; \
done; \
cd ..; \
done; \
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
${LINK_OK}; \
if test x"${BUILD_AND_HOST_ARE_DARWIN}" = x"yes"; then \
if /usr/bin/libtool -static -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done
out="$@"; \
objs=""; \
ars=""; \
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
case $$i in \
*.a) \
ars="$$ars $$i" \
;; \
*.o) \
objs="$$objs $$i" \
;; \
esac \
done; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
mkdir -p $$dir; \
cd $$dir; \
${AR} x ../$$i; \
for j in *.o; do \
objs="$$objs $$dir/$$j"; \
done; \
cd ..; \
done; \
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done; \
fi
locales: ${MO_FILES}
@ -676,6 +696,17 @@ install: all install-extra
fi \
done
for i in "" ${FRAMEWORK}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; \
if ${MKDIR_P} ${DESTDIR}${prefix}/Library/Frameworks && cp -R $$i ${DESTDIR}${prefix}/Library/Frameworks/; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
@ -716,15 +747,17 @@ install: all install-extra
fi \
done
for i in "" ${INCLUDES}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
if test x"${INSTALL_INCLUDES}" = x"yes"; then \
for i in "" ${INCLUDES}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done \
fi
for i in "" ${MO_FILES}; do \
test x"$$i" = x"" && continue; \
@ -793,6 +826,19 @@ uninstall: uninstall-extra
fi; \
done
for i in "" ${FRAMEWORK}; do \
test x"$$i" = x"" && continue; \
if test -d ${DESTDIR}${prefix}/Library/Frameworks/$$i; then \
if rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
-rmdir ${DESTDIR}${prefix}/Library/Frameworks >/dev/null 2>&1
-rmdir ${DESTDIR}${prefix}/Library >/dev/null 2>&1
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${libdir}/$$i; then \