Which script runs first when clearmake is invoked?

Posted on 2007-10-08
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

Then, following two filenames are run:

C:\Program Files\Rational\Clearcase\etc\
C:\Program Files\Rational\Clearcase\etc\

Then, Makefile is run.

Please explain how build works up to processing of Makefile.  How does clearmake know to process and  Were these two files installed during installation?
Question by:naseeam
    LVL 11

    Expert Comment

    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.
    LVL 51

    Expert Comment

    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 ...
    LVL 11

    Expert Comment

    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 Comment

    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.
    LVL 11

    Accepted Solution

    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

    If you don't set it, it will process

    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.

    LVL 51

    Expert Comment

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


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
    Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    731 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now