LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-12-2011, 04:58 PM   #1
YaMaHaBoB
LQ Newbie
 
Registered: Aug 2006
Posts: 24

Rep: Reputation: 0
Call makefile from shell script


I can find all kinds of information on calling a script from a makefile but not the other way around.

I'm writing a VERY basic shell script, and I need to call a makefile located in a directory lower than the shell script but can't seem to figure it out.

./dir/make and ./dir/makefile don't work.

Solution?

Thanks in advance
 
Old 04-12-2011, 05:06 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
A makefile / Makefile must usually be run with 'make' in it's directory.

cd <path-to-dir-with-Makefile>/ && make && cd <back-to-work-dir/



..

Last edited by knudfl; 04-12-2011 at 05:09 PM.
 
1 members found this post helpful.
Old 04-12-2011, 05:22 PM   #3
YaMaHaBoB
LQ Newbie
 
Registered: Aug 2006
Posts: 24

Original Poster
Rep: Reputation: 0
oh makes total sense. thanks for the speedy response
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
relation between a Makefile and shell script shaiva Linux - Software 9 06-14-2012 05:54 PM
What does $^ means in Makefile or in shell script kondrara Linux - Newbie 1 06-13-2009 02:28 AM
create shell script in makefile xface66 Programming 2 05-08-2007 04:26 AM
Makefile call shell script thllgo Programming 4 12-28-2005 09:51 AM
Shell Script and makefile thomasmathew Programming 11 12-23-2003 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration