I quite solved myself, although I'm not sure this is ok, it works:
all: $(MYLIB) TEST
$(MYLIB):
....
TEST: $(MYLIB)
...
I could solve by putting $(MYLIB) as a prerequisite of TEST, but I don't
want to pass through (=depend on) TEST for compiling the library. I
would like to be able to exclude TEST on demand and stll compile the library
You don't depend on TEST to compile the library, because the
prerequisite list of target $(MYLIB) is empty. Just call
"make $(MYLIB)" (the name of your library) and make will just build
the library without TEST.
Regards
Michael
_______________________________________________
Help-make mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-make