?
Solved

Which script runs first when clearmake is invoked?

Posted on 2007-10-08
6
Medium Priority
?
685 Views
Last Modified: 2013-12-26
Our OS is Windows XP.  We write 'C' Language code for PowerPC platforms.  Our make utility is Clearmake with GNU Compatibility.  When clearmake <target> is invoked, I thought filename Makefile or makefile runs first but  filename makefile.options is running first.  The contents of this file are as follows:

# Use clearmake GNU compatibility
CCASE_MAKE_COMPAT = gnu

Then, following two filenames are run:

C:\Program Files\Rational\Clearcase\etc\gnubuiltinvars.mk
C:\Program Files\Rational\Clearcase\etc\gnubuiltin.mk

Then, Makefile is run.

Please explain how build works up to processing of Makefile.  How does clearmake know to process gnubuiltinvars.mk and gnubuiltin.mk?  Were these two files installed during installation?
0
Comment
Question by:naseeam
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:cup
ID: 20036735
I don't have clearmake but I can tell you how to find out.  Depends on your OS.  If you're using Linux, the utility is called strace.  If you're using Solaris, it is called truss.  There are others that do similar things like dtrace and ktrace.  Just type

strace clearmake

It will give you a list of files that are opened, environment variables examined etc.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 20036913
don't have clearmake either, but you should check if it has a debug and/or verbose option which tells you what's going
I.g. make first tries to resolve the dependencies of an target and then calls the commands of the target, hence if the dependencie is a target itself the commands there will be executed first and so on ...
0
 
LVL 11

Expert Comment

by:cup
ID: 20037210
Normal trick for something like that is

clearmake --help
clearmake -zz

Some utilities will tell you that zz is not recognized and then tell you what is recognized.  Would be nice if all the utilities had a --help.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:naseeam
ID: 20041307
Thanks for suggestions but none of them worked.

strace didn't work for Windows NT.

It does have debug option.  I know what's going on.  That's not my question.  Please see my question posted above.

--help and --zz return error.
0
 
LVL 11

Accepted Solution

by:
cup earned 2000 total points
ID: 20043036
Sorry - went down the wrong track.

Clearmake is just a Clearcase variant of the GNU make.

If the compatibility mode (-C) is set to gnu, Clearmake will process gnubuiltin.mk.

If you don't set it, it will process builtin.mk.

If you set it to std, it ignores the setting of the CCASE_MAKE_COMPAT environment variable.  Clearmake has a whole raft of environment variables.

All make systems process some default rules before they get to your makefile.  I think if you switch on the -d or -v flag, you will possibly get a list of files it processes.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 20044225
> Clearmake is just a Clearcase variant of the GNU make.
if so, your friends are following options:

  -n
  -v
  -d
  -p
  -q
  -D
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question