On Tue, 03 Feb 2009, Maurilio Longo wrote: Hi,
> it seems to be working changing os2/gcc.cf line > $(foreach file, $(^F), $(lib_object)) > into > $(COMSPEC) /C "for %i in ( *.o ) do echo ADDMOD %i >> _l_.tmp" > tomorrow I'll do some more tests. Interesting. Now it looks like GNU make problem. Maybe some trick with eval function can help, f.e. something like: define lib_object echo ADDMOD $(1) >> __lib__.tmp endef define create_library IF EXIST $(OS2_LIB_ARCH) $(RM) $(OS2_LIB_ARCH) echo CREATE $(LIB_DIR)/$@ > __lib__.tmp $(foreach file, $(^F), $(eval $(call lib_object,$(file)))) echo SAVE >> __lib__.tmp echo END >> __lib__.tmp $(AR) -M < __lib__.tmp endef > Of course it works on the assumption that the library is made up of .o files. You can use $(OBJ_EXT) instead of .o $(COMSPEC) /C "for %i in ( *$(OBJ_EXT) ) do echo ADDMOD %i >> _l_.tmp" I do not know OS2 command line size limit but if it's big enough then you can also use: $(COMSPEC) /C "for %i in ($(^F)) do echo ADDMOD %i >> _l_.tmp" Though in such case it should be possible to directly call ar without the above trick by simple: AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) so I guess it's smaller then necessary. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour