In order to run make file, I am supposed to go to the make file's directory and from there only I can run the make file. How can I do the same even if i am in any directory?

link|improve this question
Which make? Borland's make? GNU make? Microsoft's nmake? One of the umpteen shareware implementations of make that have floated around over the years? And on what platform? The answer is different depending from the specifics. RedGrittyBrick is presuming that you have a POSIX-conformant shell and filesystem, for example. – JdeBP Dec 23 '11 at 13:43
feedback

1 Answer

up vote 2 down vote accepted
(cd /other/dir; make)

Will not change your current directory but will run make with an appropriate current working directory

link|improve this answer
Thanks RedGrittyBrick :). – Dinesh Dec 22 '11 at 9:52
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.