- ${CP} -r ${DISTNAME} bootstrap && \
- cd bootstrap/${DISTNAME} && \
- ${LN} -sf ${PWD_CMD} utils/ghc-pwd/ghc-pwd && \
- ${ECHO} "====> Configuring for bootstrap compiler" && \
- ${ENV} ${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" && \
+ ${GTAR} -cf - ${DISTNAME} | ${GTAR} -C bootstrap -xf - && \
+ ${CP} ${BOOTSTRAP_MAIN_C} bootstrap/${DISTNAME}/rts/bootstrap-main.c && \
+ ${CP} ${BOOTSTRAP_CAPI_C} bootstrap/${DISTNAME}/rts/capi-wrappers.c && \
+ ${TOUCH} ${.TARGET}
+
+${WRKDIR}/stamp-configure-hc-boot: ${WRKDIR}/stamp-prepare-bootstrap
+ ${RUN} cd ${WRKDIR}/bootstrap/${DISTNAME} && \
+ ${PHASE_MSG} "Configuring bootstrapping 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}" && \
+ if ${TEST} "`${DATE} '+%Y%m%d%H%M'`" -le 200001010000; then \
+ ${FAIL_MSG} "Adjust your system clock: `${DATE}`"; \
+ fi && \
+ ${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 bootstrapping compiler for ${PKGNAME}" && \