I have to live with a build system that moves pieces of source around before running make. I have a function that pipes output of make through a sed to remap file references back to the source tree.
(defun mybuild ()
"Run mybuild"
(interactive)
(compile "mybuild | sed -e 's/path-x/path-y/' -e ..."))
My problem is that the sed expression is getting too long and it does not look elegant.
Are there any nice solutions to this problem, e.g. set compilation-filter function that will have one sed/regexp expression per line?
Also, I do not want to have a global change in compilation filter for all invocations of compile command.
I suspect that the solution could be as simple defining sed command as a multi line string and then use in compile command expression.
sed
has a-f
switch that allows you to put all that in a file (and if you are lucky, never have to look at it again - ever :-) )