Pass parameter from a child make to a parent


 
Thread Tools Search this Thread
Top Forums Programming Pass parameter from a child make to a parent
# 1  
Old 10-04-2010
Pass parameter from a child make to a parent

Hello,

I have the following problem:
I have makefileproj and makefilemod in a build process for a complex project - from makefileproj I call the makefilemod.
In makefilemod I generate a list containing objects eg,: "../../../25_Build/Results/Objects/FBL/Fls.o ../../../25_Build/Results/Objects/FBL/Fls_Ac.o ../../../
25_Build/Results/Objects/FBL/Fls_PBcfg.o"

In makefileproj I need the list of object to tell the linker what to link, but I can't find a solution to access this object list.
Please help me!!!
Thanks for any idea you might give me...
# 2  
Old 10-04-2010
Are you sourcing the subshell makefilemod?

If variable exporting is not working the way it does on your command line: try setting the SHELL variable to the shell you start out using by default. Some shells use
Code:
var=something; export var

instead of
Code:
export var=something

# 3  
Old 10-04-2010
export works only from makefileproj to makefilemod

Variables exported in makefileproj are readable in makefilemod but not the other way around which is exactly what I need. Smilie
Another think that I tried was to print the object list (from mkmod) to a file obj.mk but I don't know how to return it's content in a variable in mkproj


p.s. thanks for helping
# 4  
Old 10-04-2010
I guess I need to start from the beginning

Are you defining shell variables in the subscript, or is the subscript strictly a makefile?

What is the exact line in your file that calls the subscript?
# 5  
Old 10-04-2010
call to mkmod

This is how I call the Makefile_Module.mk from Makefile_Project.mk
........
/usr/bin/make obj -f Makefile_Modules.mk
..........
so yes, the subscript is strictly a Makefile
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How make parent to wait from child process?

Hi all, I am starting mgen5 for sometime depends on input from a file, in a child process. now I want to make parent to wait in this child process till mgen5 finishes, or timeout happens. could anyone please tell me how to make parent to wait in child process in shell script? thanks... (2 Replies)
Discussion started by: girijajoshi
2 Replies

2. UNIX for Dummies Questions & Answers

parent and child directory

does anyone know how to check in an 'if' statement if a particular directory is a child directory of a particular directory? help ~ (2 Replies)
Discussion started by: ymc1g11
2 Replies

3. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies

4. Homework & Coursework Questions

Need help with deleting childīs parent and child subprocess

1. The problem statement, all variables and given/known data: I need to make an program that in a loop creates one parent and five children with fork(). The problem i'm trying to solve is how to delete the parent and child of the childīs process. 2. Relevant commands, code, scripts,... (0 Replies)
Discussion started by: WhiteFace
0 Replies

5. Programming

To share fd between parent and child

i used function fork(). so i made two process. parent process accepted socket fd and writing to shared memory. then now. how can child process share parent's socket fd? is this possible? Thanks in advance (1 Reply)
Discussion started by: andrew.paul
1 Replies

6. Shell Programming and Scripting

How to make the parent process to wait for the child process

Hi All, I have two ksh script. 1st script calls the 2nd script and the second script calls an 'C' program. I want 1st script to wait until the 'C' program completes. I cant able to get the process id for the 'C' program (child process) to make the 1st script to wait for the second... (7 Replies)
Discussion started by: sennidurai
7 Replies

7. UNIX for Advanced & Expert Users

how to make a parent wait on a child shells running in background?

Hi I have a shell script A which calls another 10 shell scripts which run in background. How do i make the parent script wait for the child scripts complete, or in other words, i must be able to do a grep of parent script to find out if the child scripts are still running. My Code: ... (1 Reply)
Discussion started by: albertashish
1 Replies

8. Shell Programming and Scripting

Parent/Child Processes

Hello. I have a global function name func1() that I am sourcing in from script A. I call the function from script B. Is there a way to find out which script called func1() dynamically so that the func1() can report it in the event there are errors? Thanks (2 Replies)
Discussion started by: yoi2hot4ya
2 Replies

9. UNIX for Dummies Questions & Answers

kill parent and child

Hello all, I have gone through the search and looked at posting about idle users and killing processes. Here is my question I would like to kill an idle user ( which I can do) but how can I asure that all of his process is also killed whit out tracing his inital start PID. I have tried this on a... (4 Replies)
Discussion started by: larry
4 Replies

10. UNIX for Dummies Questions & Answers

what are parent and child processes all about?

I don't follow what these are... this is what my text says... "When a process is started, a duplicate of that process is created. This new process is called the child and the process that created it is called the parent. The child process then replaces the copy for the code the parent... (1 Reply)
Discussion started by: xyyz
1 Replies
Login or Register to Ask a Question