Visit The New, Modern Unix Linux Community

Call makefile from shell script

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Call makefile from shell script
# 1  
Call makefile from shell script

I'm writing a VERY simple shell script. I need to call a makefile in a subdirectory. What's the command I need to use?

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

Thanks in advance
# 2  
make isn't and never was in those directories. make just checks inside the current directory for a file named makefile or Makefile.

You can make it check a different directory with -C

make -C /path/to/dirwithmakefileinit/
This User Gave Thanks to Corona688 For This Post:

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #379
Difficulty: Medium
Solaris is UNIX V7, UNIX 03 and UNIX 98 compliant.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to call .sh file from

I have used $(shell ./ and also tried bin_SCRIPTS = but it is not working it is compiling but not executing. I have kept mkdir filename in (2 Replies)
Discussion started by: srikanth007
2 Replies

2. Shell Programming and Scripting

How to call .sh file from

in this bin_SCRIPTS = this command is not working, $(shell ./ ) this is also not working then how to execute it? (1 Reply)
Discussion started by: srikanth007
1 Replies

3. Shell Programming and Scripting

Bash script from makefile - it is called each time i call make

I've created a tag in the makefile: mytag: $(shell ${PWD}/ When i do: make clean - the script is executed When i perform make or make mytag the script is again executed with the output: make: Nothing to be done for mytag What i want ? I want to be executed only... (0 Replies)
Discussion started by: Pufo
0 Replies

4. Shell Programming and Scripting

using a Shell Script in a Makefile

Hello, I have a Makefile that converts wrl (vrml) files to html files... how can I use a shell script in that makefile which works on all html files after converting? The Shell Script have to find and replace a String in every createt html file. sorry I'm a Newbie, so I hope someone can... (0 Replies)
Discussion started by: Dan_78
0 Replies

5. Shell Programming and Scripting

how to run a shell script through Makefile

I want to run a target defined in a shell script. The shell script name is '' and the target in it is 'N' i.e. (ua N) throught a makefile. How can i do it so that i can run it with a make target. (3 Replies)
Discussion started by: vineet.dhingra
3 Replies

6. Shell Programming and Scripting

Capture makefile errors in shell script

Hi, I have a bash script which calls a few "make". I would like to know whether the makefile failed with any errors. How do I do that in the script? Thanks, S (2 Replies)
Discussion started by: suryaemlinux
2 Replies

7. Shell Programming and Scripting

Makefile autogenerated by shell script for a given .c code file

Hi, I have learned native compilation of basic c code example programs from the net. The issue is, .c code file doesn't come with respective Makefile. Visited some web sites with Makefile manuals but still can not master writing Makefile file to work. The idea is to have intelligent shell... (5 Replies)
Discussion started by: darius2
5 Replies

8. Shell Programming and Scripting

Shell script makefile

Is there a way to write a makefile for all the source files in a directory with a shell script? (2 Replies)
Discussion started by: zzhan
2 Replies

9. Shell Programming and Scripting

shell script in makefile

Hi, Can we execute a shell script by makefile. I mean we will write a shell script in a make file and it will be executed when we compile the C++ program using make file. (2 Replies)
Discussion started by: surjyap
2 Replies

10. Shell Programming and Scripting

embeding shell script in makefile

Hi I am new to shell scripting and makefile. I want a command's output in makefile to process further, can anyone plz suggest me a way ? I want ls -d *.dsm output in a variable and want to process it in makefile itself. It's urgent Thanks In advance (0 Replies)
Discussion started by: madhu12345
0 Replies

Featured Tech Videos