%% Maciej Walezak <[EMAIL PROTECTED]> writes: mw> I want to have one rule that removes object files from a mw> library. The library and file is defined in variables.
mw> When I invoke 'make clean' cleanning is executed only once. I mw> suppose it is because 'remove-from-lib' occures two times mw> eventually and 'make' ignores the second occurence. mw> How can I force 'make' to do all the mentioned targets I don't think there's any way. Once make builds a target, it won't build it again in that invocation. mw> or how can I achieve what I want in another way? You can do recursive makes (I don't advise this, but it will work) or you can just define clean1 and clean2 to actually run the command instead of depending on another target to do it: REMOVE-FROM-LIB = ar -d $(LIB) $(MEM) clean1: LIB = dir1/libymy.a clean1: MEM = obj.o clean1: ; $(REMOVE-FROM-LIB) clean2: LIB = dir2/libymy.a clean2: MEM = obj.o clean2: ; $(REMOVE-FROM-LIB) clean: clean1 clean2 -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://www.paulandlesley.org/gmake/ "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
