Paul Koning <paul_kon...@dell.com> writes: > It occurred to me that this might be an issue others have run into. > Would it be useful for gcc to provide some way to have the __FILE__ > value trimmed? Perhaps something analogous to the -p switch in the > "patch" utility?
I think it is useful to have a way to set __FILE__ in general. There already is a way: use a #line directive. It's not clear to me that it's necessary to have a command line option. foo.o: $(srcdir)/foo.c (echo '#line 1 "foo.c"'; cat $(srcdir)/foo.c) | $(CC) -c -x c - -o $@ Ian