From: pjfarley AT dorsai DOT org (Peter J. Farley III) Newsgroups: comp.os.msdos.djgpp Subject: Re: Rebuilding gcc -- cc1plus and gxx not made Date: Fri, 12 Sep 1997 01:42:32 GMT Organization: None Lines: 116 Message-ID: <341896b9.14764524@snews.zippo.com> References: NNTP-Posting-Host: news.newsdawg.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Eli Zaretskii wrote: > >On Wed, 10 Sep 1997, Nate Eldredge wrote: > >> Well... without using bash it doesn't work, the makefile bombs out on the >> line `genattr config/i386/i386.md > t-attr.h'. > >Why? This line has nothing special that needs a Unixy shell. The >original Makefile created by configur.bat works for me, including that >line, without Bash. > >In fact, the above line (and a few others like it) will NOT work with >Bash, because Bash by default doesn't search the current directory for >executable programs. Did you change the Bash's PATH to include the >current directory? Otherwise, I don't understand how does that >Makefile work for you. I have to agree with Eli on this, Nate. I was able to build gcc2721s with just the DOS command.com, which is how DJ says he builds it. The trick was that I had to boot DOS 6.22 to do it, it would not work under DOS 7 (Win95 DOS). It *will* also run with bash if you include "." in the PATH, as I have always done, as I suspect you also did, and as Eli has said is necessary. I *do* so detest having to type "./name" to execute something in the current directory. >There are also a few other lines that won't work with Bash: those >which use backslashes. For example, this line: > > bi-arity < $(srcdir)\bytecode.def >t-bc-arity.h > >(there are quite a few like this one). Eli, as far as I can see there are only three cases of this particular error, one right after the other in the makefile. There is also one case of a "bare" filename instead of a make variable: s-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change genattrtab md > t-attrtab.c ^^ which should have been coded like this: s-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change genattrtab $(md_file) > t-attrtab.c ^^^^^^^^^^ >Maybe you have a modified Makefile? Are we talking about the original >one created when you run configur.bat from v2gnu/gcc2721s.zip on >SimTel.NET? > >Or maybe you have some non-DJGPP sh.exe somewhere on your PATH? > >> Also, I think one of the >> makefiles contains a line with backquotes, implying that it needs >> bash. > >Only if you say "make install". The install: target wasn't ported to >MS-DOS. Otherwise, there are no backquotes. Actually, he's right Eli. In cp/Makefile there is this case (please excuse the line-wrap): parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG)\ `echo $(PARSE_C) ^^^ ^^^ (Note no trailing backquote) which looks like this in the GNU original: parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG)\ `echo $(PARSE_C) | sed 's,^\./,,'` and which probably should have been coded to use the make string substitution facility like this, since the only purpose for the echo/sed execution is to remove a leading "./" in $(PARSE_C): parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG)\ ${@:o=c} The ${@:o=c} takes the target name "@" (parse.o) and substutites a "c" for the trailing "o". >> At any rate, having bash seems to greatly simplify things, and it's >> probably easier to get it than to research and fix the things that >> don't work otherwise. > >It is actually the other way around: using Bash requires more changes >to the Makefile (or to the way you set up Bash). See the comments >above. Respecfully, Eli, there are *fewer* changes to the *GNU* makefile that need to be made if one has bash. There may well be more changes to *DJ*'s makefile if using bash, but not to the original GNU version. Which, after all, should be a porter's goal, shouldn't it? >> So I think using only `stock DOS tools' is only important to a >> purist. > >It is also important to people who don't have Bash and the auxiliary >utilities installed. Agreed, Eli, but see my other post in reply to you under the subject "Suggestion for future DJGPP development -- depend on bash" for my humble opinions on whether that is an environment DJGPP should target now that there *is* a bash and all the necessary tools for DOS. ---------------------------------------------------- Peter J. Farley III (pjfarley AT dorsai DOT org)