Skip to content

Which step would one take to integrate an existing Makefile with moulti? #4

Answered by xavierog
MartyLake asked this question in Q&A
Discussion options

You must be logged in to vote

Or I could create a filter that calls moulti appropriately when such strings appear, but I am not even sure how to do that.

Like this?

moultimake.bash:

#!/usr/bin/env bash

# Instruct the Moulti instance to harvest any output not explicitly assigned to
# a step:
export MOULTI_RUN_OUTPUT=harvest
export MOULTI_INSTANCE="make"
[ "${MOULTI_RUN}" ] || exec moulti run -- "$0" "$@"

function process_lines {
	local step_counter=0
	while read -r line; do
		if [[ "${line}" =~ 'Must remake target' ]]; then
			# New target: create a new Moulti step:
			local title=$(sed 's/Must remake target `\(.*\)'\''./\1/' <<< "${line}")
			((++step_counter))
			local step_id="make_$$_${step_counter}"
			moulti …

Replies: 15 comments 17 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by xavierog
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@xavierog
Comment options

Comment options

You must be logged in to vote
14 replies
@xavierog
Comment options

@xavierog
Comment options

@MartyLake
Comment options

@xavierog
Comment options

@xavierog
Comment options

Comment options

You must be logged in to vote
1 reply
@xavierog
Comment options

Comment options

You must be logged in to vote
1 reply
@xavierog
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3 on May 10, 2024 20:04.