Date: Sun, 9 Apr 2000 08:55:38 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Prashant TR cc: djgpp-workers AT delorie DOT com Subject: Re: Porting problems with Sh-utils (beta) In-Reply-To: <200004081349.SAA00705@midpec.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 8 Apr 2000, Prashant TR wrote: > source='getdate.c' object='getdate.o' libtool=no \ > depfile='.deps/getdate.Po' tmpdepfile='.deps/getdate.TPo' \ > depmode=gcc d:/djgpp/bin/sh.exe ../depcomp \ > gcc -DLIBDIR=\"d:/djgpp/lib\" -DHAVE_CONFIG_H -I.. -I. -I../intl -g > -O2 -c -o > getdate.o `test -f getdate.c || echo './'`getdate.c > depcomp: Variables source, object and depmode must be set > make.exe[2]: *** [getdate.o] Error 1 > make.exe[2]: Leaving directory `d:/prj/x/sh-utils-2.0g/lib' > make.exe[1]: *** [all-recursive] Error 1 > make.exe[1]: Leaving directory `d:/prj/x/sh-utils-2.0g' > make.exe: *** [all-recursive-am] Error 2 > ----- > > The fragment of the makefile producing this error is: > > ----- > CCDEPMODE = depmode=gcc > > .c.o: > source='$<' object='$@' libtool=no \ > depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ > $(CCDEPMODE) $(depcomp) \ > $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< > ----- > > There's a script called depcomp in the parent directory, but it > doesn't seem to be receiving the values of "source", "object" and > "libtool". And if I try compiling on Linux, the package compiles > perfectly. Does the Makefile say "SHELL = /bin/sh"? If not, this command is not going to work. > It seems to me that the values of variables are not passed > on to the child program by MAKE. It's not Make's job to pass variables to the child program, in this case. The syntax "foo=bar xyz=abc foobar.exe" is processed entirely by a Unixy shell, such as Bash, which Make should invoke. If that command is passed by Make to Bash, the values of the variables will be passed to "d:/djgpp/bin/sh.exe" and to the script. I just tried this in a short Makefile, and it worked for me, in all versions of Make (3.75, 3.76, 3.77, 3.78.1, and the hot-off-the-grill Make 3.79). If the Makefile does say "SHELL = /bin/sh" (and I suspect it does), I think something else is at work here. Perhaps the problem is not with Make, but with the depcomp script (which you didn't show ;-). Btw, why does the build process use docomp instead of libtool? > I'm using Make 3.77. I don't think anything's changed in this matter, but just in case, try it with Make 3.78.1.