Hi All I have recently made changes to my makefiles and changed the construct of using ar command to create the static archive libraries. The libraries are created by object files residining in different subdirectories. The makefile in the parent directory recursively calls the makefiles in each of the subdirectories which compiles the source file and runs the ar command to attach the objects files of the subdirectory to the static library. What happens is sometimes an subdirectory with say only one source file, gets compiled and object file is created but no ar command is run and hence that object file is not included in the static archive library. This causes undefined reference errors later when an application tries to link to this library and is using a function call defined in the object file that is not included.
Is this a bug in the make rules? Is there a way that I can ensure that this does not happen? I would very much appreciate your advice and inputs. Please find below the ar declaration of one of the Makefile that is used to compile and create the archive. $(LIBDIR)/db/libmbacc$(MACHINE).a: $(OBJS) $(AR) $(ARFLAGS) $@ $^ @$(RANLIB) $@ Thanks in advance. With Regards Vardhan _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make