From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: "J.T. Conklin" Cc: gdb@sourceware.cygnus.com Subject: Re: make capabilities Date: Wed, 21 Mar 2001 15:59:00 -0000 Message-id: References: <5mofvlqrpv.fsf@jtc.redback.com> X-SW-Source: 2001-03/msg00012.html On 1 Mar 2001, J.T. Conklin wrote: > Is it safe to assume that all versions of make used to build GDB will > understand the ${FOO:.c=.o} construct? It does not appear to be used > elsewhere in the GDB or binutils trees, so it is possible (maybe even > likely) that they do not. But I do not know how to solve a problem > without it. > > The problem is the "lint" target: > > lint: $(LINTFILES) > $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ > `echo $(DEPFILES) | sed 's/\.o /\.c /g'` > > If srcdir != objdir, lint is not able to find the source files. This > can be fixed if the rule is re-written as such: > > lint: $(LINTFILES) $(DEPFILES:.c=.o) > $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $^ > > Thoughts? I can suggest two thoughts: 1. The current Emacs distribution uses $(FOO:.x=.y) in its Makefile's. While this version is not yet released, its pretest was tested on many different systems, and none failed to build it. 2. However, it _is_ known that not all versions of Make support that construct. If you want to be 100% portable, you can edit .c into .o with `sed` invocation in the rule's commands.