%% Ken Mankoff <[EMAIL PROTECTED]> writes: km> On Wed, 10 May 2006, Ken Mankoff wrote: >> I'm trying to do conditional compilation using findstring and ifeq >> in the makefile, but having errors. Can anyone advise how to best >> do this?
km> My apologies for not searching the list archives more thoroughly. km> The solution is like so: km> %.o: %.f km> $(if $(findstring $@,$(OBJ)), \ km> $(FC) $(FFLAGS) $<, \ km> $(FCMP) $(FFLAGSMP) $<) Just a note: I would definitely avoid findstring here. It will find any _substring_. It's obviously unlikely that a <...>.o string will appear inside another word in OBJ; nevertheless ... You should use the filter and filter-out functions (in this case you want filter) to match entire words. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
