Sponsored Content
Top Forums Shell Programming and Scripting Call makefile from shell script Post 302513267 by yamahabob on Tuesday 12th of April 2011 05:33:28 PM
Old 04-12-2011
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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 'ua.sc' 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

7. 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

8. 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}/script.sh) 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 script.sh to be executed only... (0 Replies)
Discussion started by: Pufo
0 Replies

9. Shell Programming and Scripting

How to call .sh file from makefile.am?

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

10. UNIX for Beginners Questions & Answers

How to call .sh file from makefile.am?

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

NAME
gccmakedep - create dependencies in makefiles using 'gcc -M' SYNOPSIS
gccmakedep [ -sseparator ] [ -fmakefile ] [ -a ] [ -- options -- ] sourcefile ... DESCRIPTION
The gccmakedep program calls 'gcc -M' to output makefile rules describing the dependencies of each sourcefile, so that make(1) knows which object files must be recompiled when a dependency has changed. By default, gccmakedep places its output in the file named makefile if it exists, otherwise Makefile. An alternate makefile may be speci- fied with the -f option. It first searches the makefile for a line beginning with # DO NOT DELETE or one provided with the -s option, as a delimiter for the dependency output. If it finds it, it will delete everything following this up to the end of the makefile and put the output after this line. If it doesn't find it, the program will append the string to the makefile and place the output after that. EXAMPLE
Normally, gccmakedep will be used in a makefile target so that typing 'make depend' will bring the dependencies up to date for the make- file. For example, SRCS = file1.c file2.c ... CFLAGS = -O -DHACK -I../foobar -xyz depend: gccmakedep -- $(CFLAGS) -- $(SRCS) OPTIONS
The program will ignore any option that it does not understand, so you may use the same arguments that you would for gcc(1), including -D and -U options to define and undefine symbols and -I to set the include path. -a Append the dependencies to the file instead of replacing existing dependencies. -fmakefile Filename. This allows you to specify an alternate makefile in which gccmakedep can place its output. Specifying "-" as the file name (that is, -f-) sends the output to standard output instead of modifying an existing file. -sstring Starting string delimiter. This option permits you to specify a different string for gccmakedep to look for in the makefile. The default is "# DO NOT DELETE". -- options -- If gccmakedep encounters a double hyphen (--) in the argument list, then any unrecognized arguments following it will be silently ignored. A second double hyphen terminates this special treatment. In this way, gccmakedep can be made to safely ignore esoteric compiler arguments that might normally be found in a CFLAGS make macro (see the EXAMPLE section above). -D, -I, and -U options appearing between the pair of double hyphens are still processed normally. SEE ALSO
gcc(1), make(1), makedepend(1). AUTHOR
The version of the gccmakedep included in this X.Org Foundation release was originally written by the XFree86 Project based on code sup- plied by Hongjiu Lu. Colin Watson wrote this manual page, originally for the Debian Project, based partly on the manual page for makedepend(1). X Version 11 gccmakedep 1.0.2 gccmakedep(1)
All times are GMT -4. The time now is 02:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy