Questions about make -C in SunOS


 
Thread Tools Search this Thread
Operating Systems Solaris Questions about make -C in SunOS
# 1  
Old 04-24-2006
Questions about make -C in SunOS

I am using a SunOS to compile a project. The Makefile contains commands "$(MAKE) -C $$dir". However, in "man make" there is no -C option. I tried using MAKE=gmake but it failed too. My questions:

1. The make options for this SunOS is different from the gnu make options. Is it because of the difference between the BSD make and GNU make, I wonder?

2. Could I rewrite make -C $$dir as:
cd dir; \
make; \
cd ..
?

Thanks.
# 2  
Old 04-24-2006
gnumake man page does show a -C option.

Does the software require you use gnumake? If so, then you can probably get it at www.sunfreeware.com (listed under make-xxx (xxx=version)
# 3  
Old 04-24-2006
Thanks for your reply.

> gnumake man page does show a -C option.

Yes, in

http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?make

I saw from "OPTIONS"

-C dir
Change to directory dir before reading the makefiles or doing
anything else. If multiple -C options are specified, each is
interpreted relative to the previous one: -C / -C etc is equiva-
lent to -C /etc. This is typically used with recursive invoca-
tions of make.

From the description, I think my way to simulate this option (in my question 2) is OK.

> Does the software require you use gnumake?

Not actually. The project I use has a Makefile.common for linux as well as one for SunOS. However the Makefile which is shared by both contains "make -C". Thus I think probably it's because linux has -C support for make, which may come from GNU make.

Last edited by yzhang; 04-24-2006 at 11:43 AM..
# 4  
Old 04-24-2006
[fx:later] When I try to use gmake, I got this problem:

>>> $ gmake clean
>>> gmake[1]: *** /xxx/yyy/currentdir: Is a directory. Stop.

The program does not seem to run at all. "/xxx/yyy/currentdir" is the current directory, and is defined in Makefile.common:

"BASE = /xxx/yyy/currentdir"

The only use of $(BASE) is

"BASE_DIR = $(BASE)/zzz"

I could not figure out why this makes gmake stop.
# 5  
Old 04-25-2006
Conclusion

There are different versions of make. The version under SunOS is probably called sun make. The most popular one is gmake, GNU make. The version under BSD is still different.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

SunOS 5.5.1 usage of Makefile command in make file

I am new to Solaris and compilation using make files. I have a code base which is organized into different folders. At the root folder is a master make file and in the sub directories, there are make files for that particular folder. In the make files present in subdirectories, I am seeing... (2 Replies)
Discussion started by: rajujayanthy
2 Replies

2. Programming

Issue with make, no rule to make target etc.

I have been trying to split up my src directory to clear out files that are not re-compiled very often. Now I have the following setup in my trunk, trunk/bld trunk/src/ trunk/src/src_server trunk/makefile.linux In the make file, I have compile rules SOURCELOC = src # compile src c++... (4 Replies)
Discussion started by: LMHmedchem
4 Replies

3. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

4. UNIX for Dummies Questions & Answers

Difference between configure/make/make install.

Hi, While installation of apache on linux, we perform the below tasks. 1) Untar 2) configure 3) make 4) make install. I wanted to understand the difference and working of configure/make/make install. Can any one help me understanding this? Thanks in advance. (1 Reply)
Discussion started by: praveen_b744
1 Replies

5. Solaris

Gani Network Driver Won't Install - make: Fatal error: Don't know how to make targ...

I attached a README file that I will refer to. I successfully completed everything in the README file until step 4. # pwd /gani/gani-2.4.4 # ls COPYING Makefile.macros gem.c Makefile Makefile.sparc_gcc gem.h Makefile.amd64_gcc ... (1 Reply)
Discussion started by: Bradj47
1 Replies

6. Linux

Error in issuing a make and make install

Hi, Recently I install a package and try to do a make and make install. However, in the make it gives me below error:- make:Nothing to be done for 'install-exec-am' make:Nothing to be done for 'install-data-am' Can anyone please explain to me what does this mean? I have been trying... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

7. UNIX for Dummies Questions & Answers

Simple make file questions....i think, thnx

Hello, I'm a noob when comes to make files.... My intentions for the use of my make file are not that of a usual compilation, etc. It is simply to copy some files from a RCS controlled area to a public area which has read rights only for a web page. My dilemma comes in the form of sub... (0 Replies)
Discussion started by: Roxydogg28
0 Replies

8. UNIX for Advanced & Expert Users

Migration of binary file from Sunos 5.8 to Sunos 5.9

I have compiled binary file using "cc" on SunOS 5.8 and the same binary file i have copied to SunOS 5.9 and it is giving me core dump error.I want to know whether migration of compiled code from lower version to higer version created this problem. how can i solve this problem.I am pasting the core... (1 Reply)
Discussion started by: Arvind Maurya
1 Replies

9. UNIX for Dummies Questions & Answers

make and make install commands

Hi there, I am installing a package at the moment on to my Solaris version 8 and I have run into a problem with the 'make' command. I have installed the package using the 'pkgadd' command and I am now at the stage where I have to use the 'make' command followed by the 'make install'... (4 Replies)
Discussion started by: gerwhelan
4 Replies
Login or Register to Ask a Question