0

I have a command which outputs lines. I would like to process each line in parallel with Make.

target:
  command > $@

so now, I have a file called "target". In shell, I would do

   while read -r line; do
       echo "$line"
    done < target
NinjaGaiden
  • 3,046
  • 6
  • 28
  • 49
  • 1
    make does not process lines of files. It automates the processing of files, producing other files. So if you would like to use make to process in parallel the lines produced by your `command`, the best option is probably to split that in as many different files. Is it OK for you? But if the only characteristic of make you are interested in is parallel processing, you should probably use something else. Did you look at [`parallel`](https://www.gnu.org/software/parallel/)? – Renaud Pacalet Aug 09 '21 at 13:14
  • Yes, I am aware of parallel. I will consider that. – NinjaGaiden Aug 09 '21 at 13:44
  • How is the shell example parallel? – John Bollinger Aug 09 '21 at 14:41

0 Answers0