- ${ECHO} "====> Preparing bootstrap compiler" && \
- ${MKDIR} bootstrap && \
- ${CP} -r ${DISTNAME} bootstrap && \
- cd bootstrap/${DISTNAME} && \
- ${LN} -sf ${PWD_CMD} utils/ghc-pwd/ghc-pwd && \
- ${ECHO} "====> Configuring for bootstrap compiler" && \
- ${SETENV} ${CONFIGURE_ENV} ./configure --enable-hc-boot ${CONFIGURE_ARGS} && \
- ${ECHO} "====> Extracting bootstrap HC archive" && \
- (cd .. && bsdtar jxfm ${DISTDIR}/${BOOTSTRAP_TARBALL}) && \
- ${SH} mkfiles && \
- ${ECHO} "====> Building bootstrap compiler" && \
+ ${PHASE_MSG} "Preparing bootstrap compiler for ${PKGNAME}" && \
+ ${RM} -rf bootstrap && \
+ ${MKDIR} -p bootstrap/${DISTNAME}/utils/ghc-pwd/dist-boot && \
+ ${GTAR} -cf - ${DISTNAME} | ${GTAR} -C bootstrap -xf - && \
+ ${LN} -sf ${PWD_CMD} bootstrap/${DISTNAME}/utils/ghc-pwd/dist-boot/ghc-pwd && \
+ ${TOUCH} ${.TARGET}
+
+${WRKDIR}/stamp-configure-hc-boot: ${WRKDIR}/stamp-prepare-bootstrap
+ ${RUN} cd ${WRKDIR}/bootstrap/${DISTNAME} && \
+ ${PHASE_MSG} "Configuring bootstrap compiler for ${PKGNAME}" && \
+ ${SETENV} ${CONFIGURE_ENV} ./configure --enable-hc-boot --with-ghc="" ${CONFIGURE_ARGS} && \
+ ${TOUCH} ${.TARGET}
+
+${WRKDIR}/stamp-extract-hc: ${WRKDIR}/stamp-configure-hc-boot
+ ${RUN} cd ${WRKDIR}/bootstrap && \
+ ${PHASE_MSG} "Extracting bootstrap HC archive for ${PKGNAME}" && \
+ ${FIND} ${DISTNAME} -type d -o -type f | ${XARGS} ${TOUCH} -t 200001010000 && \
+ ${GTAR} -jxf ${DISTDIR}/${BOOTSTRAP_TARBALL} && \
+ (cd ${DISTNAME} && ${SH} mkfiles) && \
+ ${TOUCH} ${.TARGET}
+
+${WRKDIR}/stamp-rewrite-hc-paths: ${WRKDIR}/stamp-extract-hc
+ ${RUN} cd ${WRKDIR}/bootstrap/${DISTNAME} && \
+ ${PHASE_MSG} "Rewriting source paths in bootstrap compiler for ${PKGNAME}" && \