[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: woody make problems



"John H. Robinson, IV" <jhriv@ucsd.edu> writes:

> On Wed, Feb 14, 2001 at 10:32:23AM -0800, John H. Robinson, IV wrote:
> > 
> > i think that we are going to have to make specific make/* entries for
> > the case of the null %.
> 
> just thought of something...
> 
> resc1440%.bin:     $(root_for_rescue) linux% rescue.sh $(arch_rescue_deps)
> 	$(ROOTCMD) ./rescue.sh $(archive) "$*" $(kver) $< \
> 	1440 $(debianversion) "" $(LINGUA) $(SFONT)
> 
> what if - we made rescue.sh (and friends) smart enough to know about its
> size and other optings (ie: -s) so we could do this:
> 
> resc%.bin:	$(root_for_rescue) linux% rescue.sh $(arch_rescue_deps)
> 	$(ROOTCMD) ./rescue.sh $(archive) "$*" $(kver) $< \
> 	$(debianversion) "" $(LINGUA) $(SFONT)
> 
> or something similar?
> 
> i know i know - Object Oriented wants the data smart and the procedures
> stupid, and this would be the other way around. however, i have never
> seen Makefiles as being very Object Oriented.
> 
> that would also solve all the null % problems
> 
> working on that idea now...

Well, if you are going to work on that, just do it right in the first
place.  Here's my idea...

Have the target be:

 release/%/rescue.bin

Then rescue.sh could build the .bin right into place and we wouldn't
need to have release.sh move it all in place (and release.sh wouldn't
have to be manually kept in sync with the Makefiles).

So we could have it try to build, for instance, on i386:

 release/images-1.44/compact/rescue.bin

and in this case, $* would be 'images-1.44/compact'.  Then release.sh
(probalby should be a function in common.sh) could parse
images-1.44/compact to know that the blocks we want is 1440 and the
flavor is 'compact'.  

And we could slowly whittle away much of release.sh as well!

This seems so much more transparent to me.

Thoughts?

-- 
.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>



Reply to: