Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #25716

Re: Request for source code review

From Les Cargill <lcargill99@comcast.com>
Newsgroups comp.lang.c
Subject Re: Request for source code review
Date 2012-09-01 20:45 -0500
Organization A noiseless patient Spider
Message-ID <k1udcl$ac0$1@dont-email.me> (permalink)
References (2 earlier) <aa8aj4F8arU4@mid.individual.net> <k1njlc$vdi$1@dont-email.me> <aabbp3FinpU1@mid.individual.net> <k1rquf$il2$3@dont-email.me> <k1u9jc$pjm$1@dont-email.me>

Show all headers | View raw


James Kuyper wrote:
> On 08/31/2012 10:18 PM, Les Cargill wrote:
>> Ian Collins wrote:
>>> On 08/30/12 11:43 PM, James Kuyper wrote:
>>>> On 08/30/2012 01:04 AM, Ian Collins wrote:
>>>>> On 08/30/12 01:55 PM, Keith Thompson wrote:
>>>> ....
>>>>>> This isn't directly a C issue, but your Makefile doesn't reflect any
>>>>>> dependencies on the *.h files.  For example, if you edit gauss.h and
>>>>>> type "make", it won't rebuild anything.
>>>>>
>>>>> A decent make should provide a means for automating this.  Otherwise
>>>>> where do you stop recursing up the include paths?
>>>>
>>>> I've used a "decent" make that was part of a configuration management
>>>> system called ClearCase, which fully automated the tracking of
>>>> dependencies, but by rather drastic means. Whenever clearmake executed
>>>> the build script for a given target, it would monitor the processes that
>>>> were executed, keeping track of ALL files that were opened during the
>>>> build. If they were versioned files managed by ClearCase, it identified
>>>> which version of the file was currently visible; for other files it just
>>>> looked at the file date. The next time that the same target was built,
>>>> it would check to see whether any of the files that had been opened the
>>>> last time had been changed, and if so, it assumed that the build script
>>>> had to be re-executed.
>>>>
>>>> One of the key things that made this work was that the make facility was
>>>> tightly integrated with a special device driver that managed access to
>>>> disk space; only the use of files stored on disk volumes managed by that
>>>> driver could be detected.
>>>
>>> I've had hours of fun with clearmake...
>>>
>>> Sun's (d)make uses the output of the preprocessor phase of compiles to
>>> collate dependency information.  Rather more elegant and a lot cheaper!
>>>
>>
>> *nix "make" makefiles can easily say :
>> depend:
>> 	$(CC) -M $(CFLAGS) *.c > .depend
>> ...
>>
>> include .depend
>
> I tried that for several years. It ended up being more trouble than it
> was worth, partly because .depend was always one version out of date
> compared to the current code. Unfortunately, I don't remember the details.


You only need to "make depend" when a file has its includes changed. And 
in a pinch, you can always utter "gcc -M sourcefile.c >> .depend".

>
> What clearmake did was much more comprehensive - it tracked down all
> kinds of file dependencies, not just header files, (which can be helpful
> when the build script included commands other than those that invoke a
> compiler) and the user never had to deal with how or where that
> information was stored.

I would have to use it for months before I could trust it.

> As I remember, it "just worked" (at least, the
> dependency tracking did - other parts of the system were a little more
> complicated to deal with).
>

Never used clearmake; only clearcase. Was less than impressed with
clearcase.

--
Les Cargill

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-30 00:49 +0530
  Re: Request for source code review Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-08-29 19:43 +0000
    Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-30 18:46 +0530
  Re: Request for source code review Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-08-29 22:27 +0100
    Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-30 09:44 +0530
    Re: Request for source code review Seungbeom Kim <musiphil@bawi.org> - 2012-09-07 17:31 -0700
      Re: Request for source code review Ian Collins <ian-news@hotmail.com> - 2012-09-08 12:41 +1200
      Re: Request for source code review Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-08 04:06 +0100
        Re: Request for source code review 88888 Dihedral <dihedral88888@googlemail.com> - 2012-09-07 23:50 -0700
          Re: Request for source code review Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-08 12:28 +0100
  Re: Request for source code review "BartC" <bc@freeuk.com> - 2012-08-29 22:58 +0100
    Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-30 09:48 +0530
  Re: Request for source code review Keith Thompson <kst-u@mib.org> - 2012-08-29 18:55 -0700
    Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-30 10:06 +0530
      Re: Request for source code review lovecreatesbeauty <lovecreatesbeauty@gmail.com> - 2012-08-29 21:59 -0700
        Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-30 18:51 +0530
      Re: Request for source code review Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-08-30 13:44 +0100
        Re: Request for source code review lovecreatesbeauty <lovecreatesbeauty@gmail.com> - 2012-09-12 03:24 -0700
    Re: Request for source code review Ian Collins <ian-news@hotmail.com> - 2012-08-30 17:04 +1200
      Re: Request for source code review James Kuyper <jameskuyper@verizon.net> - 2012-08-30 07:43 -0400
        Re: Request for source code review Ian Collins <ian-news@hotmail.com> - 2012-08-31 20:43 +1200
          Re: Request for source code review Les Cargill <lcargill99@comcast.com> - 2012-08-31 21:18 -0500
            Re: Request for source code review James Kuyper <jameskuyper@verizon.net> - 2012-09-01 20:34 -0400
              Re: Request for source code review Les Cargill <lcargill99@comcast.com> - 2012-09-01 20:45 -0500
                Re: Request for source code review Ian Collins <ian-news@hotmail.com> - 2012-09-02 15:11 +1200
                Re: Request for source code review Les Cargill <lcargill99@comcast.com> - 2012-09-01 23:43 -0500
      Re: Request for source code review Adrian Ratnapala <raka@scooter.fritz.box> - 2012-09-01 07:40 +0000
  Re: Request for source code review Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-08-30 05:10 -0700
    Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-30 19:14 +0530
      Re: Request for source code review Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-08-30 16:42 +0100
  Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-31 19:44 +0530
  Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-08-31 20:03 +0530
    Re: Request for source code review Keith Thompson <kst-u@mib.org> - 2012-08-31 13:34 -0700
      Re: Request for source code review Adrian Ratnapala <raka@scooter.fritz.box> - 2012-09-01 07:49 +0000
        Re: Request for source code review Keith Thompson <kst-u@mib.org> - 2012-09-01 02:53 -0700
    Re: Request for source code review pete <pfiland@mindspring.com> - 2012-08-31 21:15 -0400
  Re: Request for source code review Jan Kuiken <jan.kuiken@quicknet.nl> - 2012-08-31 19:55 +0200
    Re: Request for source code review Udyant Wig <udyantw@gmail.com> - 2012-09-02 15:39 +0530
      Re: Request for source code review Jan Kuiken <jan.kuiken@quicknet.nl> - 2012-09-02 19:57 +0200

csiph-web