On 2007-10-20 01:03Z, Rick Flower wrote: > Hi all.. We started using a linker input script (for use w/ GNU ld) and I > specified that in my Makefile like so : > > LINK_SCRIPT_FILE = linker-inputs.txt > > That is then appended to the list of objects specified later : > > OBJECTs := ... [file list here] ... > ... > OBJECTS += $(LINK_SCRIPT_FILE)
Probably the case of the last letter (OBJECTS vs. OBJECTs) is just an email typo, but I'll mention it just in case it somehow affects the problem. But does a linker script really belong in $(OBJECTS) per se? Would it be more natural to write 'LDFLAGS=-Wl,-T$(LINK_SCRIPT_FILE)', for instance, and perhaps less error prone? > However, GNU Make (version 3.81) wants to implicitly read the contents of > the linker-inputs.txt file instead of just holding it and specifying it > for the linker which is what I want.. Is there some way to keep Make from > trying to read the contents of this file? 'make' seems to consider it a makefile. Might you have something like include *.txt in one of your set of makefiles? Could it be that an autodependency rule that operates on everything in $(OBJECTS) causes this file to be included in a makefile? > Interestly enough, if I rename > the text file to be a ".o" file then it works as I want.. Any ideas? Below > is what I see : > > make -d all [...] > Reading makefiles... > Reading makefile `Makefile'... [...more makefiles...] > Reading makefile `/export/home/rflower/test/foo/Makefile-includes.mak' > (search path) (no ~ expansion)... [...more makefiles...] > Reading makefile `linker-inputs.txt' (search path) (don't care) (no ~ > expansion)... > linker-inputs.txt:1: *** missing separator. Stop. I don't know how that could happen except due to an 'include' directive. First place I'd look is 'Makefile-includes.mak'. _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
