This is a bit tricky...
I want my Makefile to display progression percentage of my compilation. This is easy as long as I use tput or escaped sequences to move my cursor to modify my percentage.
But if a warning appears, the next warning will be on the previous one and so on...
How can I do something like that ?
I've already found some ideas like storing cursor position inside a variable, but I failed. I've thought about redirect gcc's (or clang's idc) output to a variable but it failed too.
I can output the cursor position with : echo -en "\033[6n" ; read -sdR CURPOS ; CURPOS=$${CURPOS#*[} ; echo "$${CURPOS}"
but I cannot use $(shell ..)
because it just infinit loop (I guess) so $(eval VAR = $(shell echo ..))
is impossible.
Maybe I'm looking the problem at the wrong side ?
I'm really stuck tbh so thank for your help