|
Answer» Hello every one
can some one tell me how to use CD (change directory) in makefiles rule.
I want to change directory in makefile rules before execute some EXE's.
Thanks for HELP in advance.I have no idea how to change a dir within a makefile .... but if you specify the full path to the exe / parameter files, then you wont have to either
GrahamI think cd is WORKING in makefile but when I try to run another command in next line it wont work from the dir to which I do cd .
currentally i m in folder : C:\test\make\run
now i want to cd in folder C:\test and then run the test.exe from run folder.
i wrote the makefile is looking like
Code: [Select]DIR = C:\test all: cd $(DIR) C:\test\make\run\test.exe now test.exe use a FILE present in C:\test , so i need to run test.exe only from C:\test. and it STILL runs the test.exe from C:\test\make
Following code works :
Code: [Select]DIR = C:\test all: cd $(DIR) & C:\test\make\run\test.exe
It runs the test.exe file from C:\test dir.
Thanks for the help
|