make -j dependency


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers make -j dependency
# 1  
Old 04-06-2011
make -j dependency

Hi,

I had a make file, something like that,

all:
cd dir1; make
cd dir2; make

the problem is the makefile under dir2 need some objs from dir1, so I need to set some dependency let dir2 run only after the dir1 run is done.

how to set the dependency?

Thanks.

peter
# 2  
Old 04-06-2011
make -C is better than cd ; make.
How about:

Code:
all:.dir1 .dir2

.dir1:
        make -C dir1
        touch .dir1

.dir2:.dir1
        make -C dir2
        touch .dir2

Where eight spaces need to actually be tabs of course.
# 3  
Old 04-07-2011
thanks, it works.

peter
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get the missing dependency from two files

#cat hwlock-full.dep libx11-6 >= 1.4.4 libz1 >= 1.2.7 libtinfo5 >= 5.9 libxcb1 >= 1.8.1 numactl >= 2.0.8+rc4 libpixman-1-0 >= 0.29.2 libxml2 >= 2.7.8 libxext6 >= 1.3.1 libxrender1 >= 0.9.7 libfreetype6 >= 2.4.9 libxcb-render0 >= 1.8.1 libcairo2 >= 1.12.14 libc6 >= 2.15 libxcb-shm0... (7 Replies)
Discussion started by: yanglei_fage
7 Replies

2. Shell Programming and Scripting

Processing Dependency Printing

Gurus, I came across a typical requirement where the input is like- TRANS FIRM DEPT CUST TRANS CUST TRANS DEPT FIRM CUST & the expected Output is- CUST DEPT FIRM TRANS This is basically a dependency list for processing the tables where FIRM is feeding data to TRANS... (3 Replies)
Discussion started by: kapeeljoshi
3 Replies

3. Emergency UNIX and Linux Support

Changing executable dependency

hello, can anyone help in changing the executable dependency on a certain shared library. eg, .. say i am having an executable by name utest. when i run UNIX ldd command on it then it shows the libraries on which it depends as follows: ldd release/utest release/utest needs: ... (4 Replies)
Discussion started by: skyineyes
4 Replies

4. HP-UX

Library dependency coming out of nowhere

I'm building on a HP-UX ia64 system. During building, I'm getting an error ld: Can't find dependent library "libnnz10.so" Nowhere in my makefile do I link with this library. This library is there in the directory /databases/oracle10.2.0_64BIT/lib. I'm having two source files ora8ibulk.cpp... (1 Reply)
Discussion started by: old_as_a_fossil
1 Replies

5. Programming

Fortran dependency checking

Hello, I'm creating an add-on for a large piece of software written in Fortran. In my directory I reference subroutines in other directories, which in turn reference more subroutines. I'm running into trouble because on occasion the developers of the main software change some sub calls. ... (2 Replies)
Discussion started by: kudude
2 Replies

6. Infrastructure Monitoring

Weird dependency problem!

Hi, I want to install net-snmp-devel package but i have following dependecy problem. It's very odd, i don't get it. One of packages is depended on the other one, the other one is depended on the previous one as well. :S :S Could you help me please? Here are the steps: # ls -l total... (4 Replies)
Discussion started by: oduth
4 Replies

7. Programming

Simple Makefile Problem (with a dependency)

Hi all, I have 4 '.cpp' files and 1 header files: Tools.cpp Code1.cpp Code2.cpp Code3.cpp and Tools.hh Now all Code1.cpp, Code2.cpp, Code3.cpp use functions stored in Tools.cpp. Currently, what I do to compile all of them is using this simple shell script: (1 Reply)
Discussion started by: monkfan
1 Replies

8. Solaris

Dependency problem

Hi all am new to solaris ............ i installed amanda client pkg that time am getting lots of dependency problem.......... is there any Yum server like things in solaris Regards ' prAn (8 Replies)
Discussion started by: pran
8 Replies

9. UNIX for Dummies Questions & Answers

Dependency problems with Fedora7

Hey guys, I installed Fedora7 from DVD yesterday. I have previously worked with RHEL4 and Fedora4(As of RPM based systems). I used to copy all the rpms from the media to a directory. #mkdir /rpms #copy /path_to_rpms_in_media/* /rpms/ My intention for doing this was to get around the... (0 Replies)
Discussion started by: tmm
0 Replies

10. UNIX for Dummies Questions & Answers

process dependency

how to find all the processes associated with a given process in unix,is there any command for this. (3 Replies)
Discussion started by: laddu
3 Replies
Login or Register to Ask a Question