Copy multiple files to different directories in Makefile -


I have a makefile where I currently have two files which should be copied to different directories Currently, I Tested

  resonant $ {dirs} | Xargs -n 1 cp $ {sources}  

So I think this will not work because it will try to copy one of the directories all in the source file at all times. But is there any way i can execute per command for each source file and directory?

Best regards,

Simon

me It seems that what you want from what you wrote, but it is possible that other people said, then you should be more clear, so we do not have to spend time to spend it.

Anyway, since you do not want to copy all the files in all the directories, you can call Make anyway, where you copy the files. Want the easiest way to select that you $ (COPIES) , and not only $ {dirs} as of full copies of variables. In this reply, I am going to accept the already existing destination directories.

  .PHONY: all: $ (copies) PERCENT: =% SECONDEXPANSION: $ (COPIES):%: $$ ($ $ (PERCENT) / $ $ Filter (notdir $$ *), $ (source)) Makefile cp $ & lt; $ @  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -