Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -276,10 +276,31 @@ dir=".$$(echo $$i | sed 's/\//_/g').objs"; \ rm -fr $$dir; \ done ${FRAMEWORK}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA} + rm -fr $@ + ${MKDIR_P} $@ + ${MAKE} INSTALL_INCLUDES_IF_SUBDIR=${includesubdir} INSTALL_INCLUDES_DESTINATION=$$PWD/$@/Headers install-includes + if test -f Info.plist; then \ + i=Info.plist; \ + ${INSTALL_STATUS}; \ + if ${INSTALL} -m 644 $$i $@/$$i; then \ + ${INSTALL_OK}; \ + else \ + ${INSTALL_FAILED}; \ + fi \ + fi + if test -f module.modulemap; then \ + i=module.modulemap; \ + ${INSTALL_STATUS}; \ + if ${MKDIR_P} $@/Modules && ${INSTALL} -m 644 $$i $@/Modules/$$i; then \ + ${INSTALL_OK}; \ + else \ + ${INSTALL_FAILED}; \ + fi \ + fi ${LINK_STATUS} out="$@"; \ objs=""; \ ars=""; \ for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \ @@ -301,41 +322,20 @@ for j in *.o; do \ objs="$$objs $$dir/$$j"; \ done; \ cd ..; \ done; \ - rm -fr $$out; \ - ${MKDIR_P} $$out; \ if ${LD} -o $$out/$${out%.framework} $$objs ${FRAMEWORK_LDFLAGS} ${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS} && codesign -fs ${CODESIGN_IDENTITY} --timestamp=none $$out; then \ ${LINK_OK}; \ else \ rm -fr $$out; \ ${LINK_FAILED}; \ fi; \ for i in $$ars; do \ dir=".$$(echo $$i | sed 's/\//_/g').objs"; \ rm -fr $$dir; \ - done; \ - ${MAKE} INSTALL_INCLUDES_IF_SUBDIR=${includesubdir} INSTALL_INCLUDES_DESTINATION=$$PWD/$$out/Headers install-includes; \ - if test -f Info.plist; then \ - i=Info.plist; \ - ${INSTALL_STATUS}; \ - if ${INSTALL} -m 644 $$i $$out/$$i; then \ - ${INSTALL_OK}; \ - else \ - ${INSTALL_FAILED}; \ - fi \ - fi; \ - if test -f module.modulemap; then \ - i=module.modulemap; \ - ${INSTALL_STATUS}; \ - if ${MKDIR_P} $$out/Modules && ${INSTALL} -m 644 $$i $$out/Modules/$$i; then \ - ${INSTALL_OK}; \ - else \ - ${INSTALL_FAILED}; \ - fi \ - fi + done ${MORPHOS_LIB} ${MORPHOS_LIB_NOINST}: ${EXT_DEPS} ${MORPHOS_LIB_OBJS} ${MORPHOS_LIB_OBJS_EXTRA} ${LINK_STATUS} out="$@"; \ objs=""; \