* Behdad Esfahbod wrote on Mon, Oct 06, 2008 at 11:31:29PM CEST: > Ralf Wildenhues wrote: > > * Behdad Esfahbod wrote on Mon, Oct 06, 2008 at 05:40:52PM CEST: > >> Ralf Wildenhues wrote: > >>> my-dist: > >>> env TAR_OPTIONS="--owner=0 --group=0" $(MAKE) $(AM_MAKEFLAGS) dist > >> > >> Thanks. Done now. Would be nice if automake did that already. Or at > >> least > >> just passed TAR_OPTIONS down, as in: > >> > >> AMTAR = TAROPTIONS="$(TAROPTIONS)" ${SHELL} > >> /home/behdad/src/git/fd.o/cairo/build/missing --run tar > > > > Yeah. I'm considering that for 1.11. It cannot be in 1.10 because > > it would break current setups that have an external script to set > > TAR_OPTIONS (note the underscore BTW), or a rule like the my-dist one > > above. Backward compatibility is a fine line. ;-) > > It still works with GNU make, right? Cause that automatically defines shell > vars as make vars, right? We do a lot of things like this in cairo: > > TARGETS = $(CAIRO_TARGETS) > TEST_ENVIRONMENT = CAIRO_TARGETS="$(TARGETS)" > > This way a user can do either of: > > CAIRO_TARGETS=whatever make check > > make check TARGETS=whatever
This works even with portable make. The crucial difference is that you use two different names, one for the environment variable and one for the make macro. Maybe that's what you meant with TAROPTIONS vs. TAR_OPTIONS (except even then the AMTAR line would be buggy). I'd consider that confusing though. ;-) Cheers, Ralf