Click here to Skip to main content
15,947,389 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello guys,

I would like several files to be copied from "folderA" to "folderB" automatically after each "make".
Does anyone know how to add a post-build line into the makefile?

Regards,
Yasir

p.s. Linux noob here.
Posted

you can write shell command in makefile
after last make command in your makefile, enter your copy command

all: example.o
$(CC) -o application_name example.o -I.
cp -r folderA/* folderB/*
 
Share this answer
 
Comments
Amir Mahfoozi 13-Nov-11 12:02pm    
+5
BigBang222 13-Nov-11 13:00pm    
Thank you
Very useful
 
Share this answer
 
Comments
coffeenet 4-Nov-11 1:57am    
Thank you for the link.

Where does that block of text go inside the Makefile?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900