Link to home
Start Free TrialLog in
Avatar of naseeam
naseeamFlag for United States of America

asked on

Which script runs first when clearmake is invoked?

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?
Avatar of cup
cup

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 ...
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.
Avatar of naseeam

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of cup
cup

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> Clearmake is just a Clearcase variant of the GNU make.
if so, your friends are following options:

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