Re: 'How makefiles are remade'

2004-04-23 Thread Jim
Noel Yap wrote: Paul D. Smith wrote: Making it work the way you want (if I understand you correctly), where steps 2 and 3 are performed in a loop so that the re-exec happens immediately when each makefile is rebuilt instead of after all the makefiles are rebuilt, is simply not the way make is desi

Re: 'How makefiles are remade'

2004-04-21 Thread Jim
Ted Stern wrote: On 20 Apr 2004 at 23:03 PDT, [EMAIL PROTECTED] wrote: Is there any way to cause make to exit without error? Hi Jim, For this problem, I think this might work SHELL=/bin/ksh (or bash) target: dependency return 1 Same as /bin/false (returns non-zero for scripts) R

Re: 'How makefiles are remade'

2004-04-21 Thread Jim
k the documentation is quite clear on this point. This is the second paragraph in the section "How Makefiles are Remade", which is where this entire feature is described: Oooh ... To this end, after reading in all makefiles, `make' will consider each as a goal target and attempt to updat

Re: 'How makefiles are remade'

2004-04-21 Thread Jim
Noel Yap wrote: Can you state what you want to do in development process terms, rather than makefile implementation terms, please? Maybe there's another solution that doesn't involve extremely complicated makefiles (maybe it doesn't even involve make ;-). Well okay, I'll consider how much aft

Re: 'How makefiles are remade'

2004-04-21 Thread Paul D. Smith
assumption is incorrect and not justified by any text in the manual. I think this is a case of reading into the docs what you expected to find. In fact, I think the documentation is quite clear on this point. This is the second paragraph in the section "How Makefiles are Remade", whi

Re: 'How makefiles are remade'

2004-04-21 Thread Noel Yap
Paul D. Smith wrote: Making it work the way you want (if I understand you correctly), where steps 2 and 3 are performed in a loop so that the re-exec happens immediately when each makefile is rebuilt instead of after all the makefiles are rebuilt, is simply not the way make is designed. Trying to

Re: 'How makefiles are remade'

2004-04-21 Thread Noel Yap
Jim wrote: Some ideas I've toyed with - a make preprocessor... alternative makes - cook, hmm can't think of the others off the top of my head.. I've been saying this for several years now, but one day I'll learn cook :-) Make is good... there have been several things I've wanted that I couldn't

Re: 'How makefiles are remade'

2004-04-21 Thread Noel Yap
Can you state what you want to do in development process terms, rather than makefile implementation terms, please? Maybe there's another solution that doesn't involve extremely complicated makefiles (maybe it doesn't even involve make ;-). Thanks, Noel Jim wrote: If there was just a way to end m

Re: 'How makefiles are remade'

2004-04-21 Thread Noel Yap
Jim wrote: Maybe you could chalk this up to a documentation bug, it says whenever ANY included makefile is read, it reloads, the above trace indicates that two rules to generate makefiles were performed before reloading... I still don't understand what the problem is; the documentation, accordin

Re: 'How makefiles are remade'

2004-04-21 Thread Jim
If there was just a way to end make with the last executed make's status (including when that make ends with success... otherwise all other targets are processed again, but with an invalid state, since those files which were modified were not reloaded) that would be great, and or to force a rel

Re: 'How makefiles are remade'

2004-04-21 Thread Jim
Paul D. Smith wrote: Yes it is, if you write it correctly. (sorry, this is such an attacking statement...) The correct way being that a makefile includes one and only one other makefile? I mean sure, if the documentation didn't say if ANY change, then the make is restrated (one would assume th

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Jim wrote: Noel Yap wrote: > That would be fine, if that even worked, that would probalby solve about 90% of the problems just by cleverly odering the includes... but, as I started, the first attached makefile fails, and it includes 'ticks' which if Makefile or one of the other touchable thing

Re: 'How makefiles are remade'

2004-04-20 Thread Paul D. Smith
%% Jim <[EMAIL PROTECTED]> writes: j> That would be fine, if that even worked, that would probalby solve j> about 90% of the problems just by cleverly odering the j> includes... but, as I started, the first attached makefile fails, j> and it includes 'ticks' which if Makefile or one of the

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Noel Yap wrote: > I think this only happens at the time the makefile is included. It's infeasible to have make check whether all makefiles that it had included, has been touched by something. That would be fine, if that even worked, that would probalby solve about 90% of the problems just b

Re: 'How makefiles are remade'

2004-04-20 Thread Noel Yap
Jim wrote: Noel Yap wrote: The amount of hairy code in a system stays constant :-) Although the definition may be ugly, it's usage is pretty simple: $(call include-makefile,my-makefile) well yeah - but include-makefile supplies ,-include,$(m), for the $(1) and $(2) in _include-makefile... #

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Noel Yap wrote: Jim wrote: Well that's an ugly thing :) The amount of hairy code in a system stays constant :-) Although the definition may be ugly, it's usage is pretty simple: $(call include-makefile,my-makefile) well yeah - but include-makefile supplies ,-include,$(m), for the $(1) and

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Noel Yap wrote: Jim wrote: Noel Yap wrote: okay so I extended it some... and this fails. .PHONY:all all: junk; @echo $(TICKS) include ticks2 ticks2: @echo TICKS=a number >> ticks2 include make2 make2: @echo junk: >>make2 @echo echo $(TICKS) >>make2 if ticks2 were really reload

Re: 'How makefiles are remade'

2004-04-20 Thread Noel Yap
Jim wrote: Well that's an ugly thing :) The amount of hairy code in a system stays constant :-) Although the definition may be ugly, it's usage is pretty simple: $(call include-makefile,my-makefile) > $(1) $(2) within the macro will include a makefile on the fly eh? but sometime after a

Re: 'How makefiles are remade'

2004-04-20 Thread Noel Yap
Jim wrote: Noel Yap wrote: okay so I extended it some... and this fails. .PHONY:all all: junk; @echo $(TICKS) include ticks2 ticks2: @echo TICKS=a number >> ticks2 include make2 make2: @echo junk: >>make2 @echo echo $(TICKS) >>make2 if ticks2 were really reloaded then make2 wou

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Noel Yap wrote: Jim wrote: Noel Yap wrote: This makefile works: .PHONY: all all: ; include ticks ticks: @touch $(@) How do you know? Sure the rule is done, it doesn't mean that ticks is reloaded Since we have this sort of thing in our makefiles, I'm pretty sure it gets reloaded

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Noel Yap wrote: Jim wrote: Hmm not sure how eval equates to include... Since the actual end in mind is a Makefile.cache, which is the literal expanded targets, rules nessecary to genearte the product defined by the makefile... This must be dependant on all makefiles which may have changed...

Re: 'How makefiles are remade'

2004-04-20 Thread Noel Yap
Jim wrote: Hmm not sure how eval equates to include... Since the actual end in mind is a Makefile.cache, which is the literal expanded targets, rules nessecary to genearte the product defined by the makefile... This must be dependant on all makefiles which may have changed... the final result

Re: 'How makefiles are remade'

2004-04-20 Thread Noel Yap
Jim wrote: Noel Yap wrote: This makefile works: .PHONY: all all: ; include ticks ticks: @touch $(@) How do you know? Sure the rule is done, it doesn't mean that ticks is reloaded Since we have this sort of thing in our makefiles, I'm pretty sure it gets reloaded. The above can eas

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Paul D. Smith wrote: I think Jim's example could be _MUCH_ clearer (what's with all that TICKS and patsubst, etc.? That hardly seems necessary to show the issue). well yeah - I started off just with echo TICKS=$(TICKS)I > ticks which just kept adding an I - so I got bored and made it roman numer

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Noel Yap wrote: This makefile works: .PHONY: all all: ; include ticks ticks: @touch $(@) How do you know? Sure the rule is done, it doesn't mean that ticks is reloaded Try adding to it little by little until it stops working. Noel Jim wrote: Noel Yap wrote: It would help if yo

Re: 'How makefiles are remade'

2004-04-20 Thread Paul D. Smith
I think Jim's example could be _MUCH_ clearer (what's with all that TICKS and patsubst, etc.? That hardly seems necessary to show the issue). But, if I understand correctly, what Jim wants is for make to re-invoke itself after each makefile that it rebuilds, so that subsequent rebuilds can take a

Re: 'How makefiles are remade'

2004-04-20 Thread Noel Yap
This makefile works: .PHONY: all all: ; include ticks ticks: @touch $(@) Try adding to it little by little until it stops working. Noel Jim wrote: Noel Yap wrote: It would help if you can post a /minimal/ makefile that demonstrates the problem. right here - there is no fewer statem

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Noel Yap wrote: It would help if you can post a /minimal/ makefile that demonstrates the problem. right here - there is no fewer statements that can be done to make a makefile which creates a makefile which creates a makefile (and no that's not redunant). It was a attached - here it is done ver

Re: 'How makefiles are remade'

2004-04-20 Thread Noel Yap
It would help if you can post a /minimal/ makefile that demonstrates the problem. Noel Jim wrote: Noel Yap wrote: I've done what the documentation describes many, many times. It's always worked for me. Which make are you using? Are you sure it's GNU make? 3.80 positive it is gnu make. htt

Re: 'How makefiles are remade'

2004-04-20 Thread Jim
Noel Yap wrote: I've done what the documentation describes many, many times. It's always worked for me. Which make are you using? Are you sure it's GNU make? 3.80 positive it is gnu make. http://make.paulandlesley.org/autodep.html provides more examples on how to rebuild included makefiles.

Re: 'How makefiles are remade'

2004-04-20 Thread Noel Yap
I've done what the documentation describes many, many times. It's always worked for me. Which make are you using? Are you sure it's GNU make? http://make.paulandlesley.org/autodep.html provides more examples on how to rebuild included makefiles. HTH, Noel Jim wrote: http://www.gnu.org/softwar

'How makefiles are remade'

2004-04-20 Thread Jim
http://www.gnu.org/software/make/manual/html_mono/make.html#SEC20 "After all makefiles have been checked, if any have actually been changed, make starts with a clean slate and reads all the makefiles over again. (It will also attempt to update each of them over again, but normally this will not