Re: Order-only Prerequisites Suppress some Error Checking

2008-04-23 Thread Tony Strauss
> > I don't think this is correct. Your "comment out" example (example2.mk) > is not accurate. To be accurate, you should comment out ONLY the > order-only prerequisite part, like this: > >$(DERIVED_OBJ_DIR)/test.o: # | $(DERIVED_OBJ_DIR) > > Not the entire line. If you do this, you'll s

Order-only Prerequisites Suppress some Error Checking

2008-04-20 Thread Tony Strauss
My targets live in a different directory than my source, and so I want to ensure that the target directory exists before building the target. This can be accomplished in lots of ways, but one way that I thought of was to use order-only prerequisites for this (actually, originally I just was using

Re: $(eval) expansion within $(eval)

2008-04-16 Thread Tony Strauss
> > Right. If you don't want those effects, then don't use inner > $(eval)s! If you leave out the $(eval)s and just reference $(func2) > and $(func3) inside the definition of func1, those issues don't arise: > > > define func1 > SOME_VALUE := 1 > MY_FUNC1_VAR := $$(SOME_VALUE) > all:: >

$(eval) expansion within $(eval)

2008-04-15 Thread Tony Strauss
Calling $(eval) within $(eval) can lead to very unintuitive (at least to me :) behavior. In particular, the inner $(eval) is expanded *and* executed during the expansion of the outer $(eval). For instance (I've also attached this example, since my email client mangled the tabs in the code below):