We help IT Professionals succeed at work.

Which script runs first when clearmake is invoked?

735 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?
Comment
Watch Question

cup

Commented:
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.
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 ...
cup

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

Author

Commented:
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.
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
> Clearmake is just a Clearcase variant of the GNU make.
if so, your friends are following options:

  -n
  -v
  -d
  -p
  -q
  -D
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.