aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/resources/Makefiles/stage2.mk')
-rw-r--r--scripts/resources/Makefiles/stage2.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/resources/Makefiles/stage2.mk b/scripts/resources/Makefiles/stage2.mk
new file mode 100644
index 0000000..764bc5c
--- /dev/null
+++ b/scripts/resources/Makefiles/stage2.mk
@@ -0,0 +1,24 @@
+.PHONY: stage2 clean-stage2 force-stage2 post-stage2
+
+stage2: ${STAGE2_MAKEFILE} ${POST_STAGE1_CACHE}
+ make -f ${STAGE2_MAKEFILE} all -j`nproc`
+
+force-stage2: ${STAGE2_MAKEFILE} ${POST_STAGE1_CACHE}
+ make -f ${STAGE2_MAKEFILE} all -j`nproc` -B
+
+post-stage2:
+ for dir in ${MAVEN_OVERLAY_DIR}/*; do \
+ find $${dir} -type f -name \*.ebuild | grep . || continue;\
+ pushd $${dir} > /dev/null;\
+ parallel ebuild '$$(echo {}/*.ebuild | cut -d\ -f1)' digest ::: *;\
+ popd > /dev/null;\
+ done
+
+clean-stage2:
+ # just to make sure "${MAVEN_OVERLAY_DIR}" points to an overlay
+ if [[ -f ${MAVEN_OVERLAY_DIR}/profiles/repo_name ]]; then\
+ find ${MAVEN_OVERLAY_DIR} -type f \
+ \( -name \*.ebuild \
+ -o -name Manifest \)\
+ -delete;\
+ fi