This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: make clean doesn't in current cvs
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: make clean doesn't in current cvs
- From: Colin Howell <chowell at redhat dot com>
- Date: Thu, 22 Mar 2001 20:10:35 -0800 (PST)
- Cc: "Mark E." <snowball3 at bigfoot dot com>
I was running into this problem too.
You found the problematic line. The actual problem is in the quotes
around the sed command's argument:
\'s/.*=$$/XFOO=/\'
which should be:
's/.*=$$/XFOO=/'
Since this argument is part of a larger backquoted string:
`echo \"RANLIB=$${RANLIB}\" | sed -e \'s/.*=$$/XFOO=/\'`
the backslashes before the single-quotes are not removed, but are
included in the command executed by the subshell. The backslashes are
interpreted by the subshell; therefore the single-quotes are *not*
interpreted by the subshell but are included as part of sed's
argument.
The backslashes before the double-quotes are removed before the
backquoted string is executed by the subshell; this is because the
backquoted string is itself within double quotes.
(No, I'm not a shell expert, but I can read a man page. ;-)
I'll post a patch for this to gcc-patches.
On Thu, 22 Mar 2001 19:29:13 -0500, Mark E. wrote:
> Hi guys,
> After I updated my copy of gcc, 'make clean' and 'make mostlyclean'
> no longer work. I get the message:
> c:/djgpp/bin/sed.exe: -e expression #1, char 1: Unknown command: ``'''
> make.exe: *** empty string invalid as file name. Stop.
> make.exe: *** [do-clean] Error 1
>
> This is with DJGPP, GNU make, GNU sed, etc.
>
> The problem doesn't appear in the binutils tree. Comparing the two, I find
> the problem goes away if I make one change to the gcc version of Makefile.in
> to match the binutils version. The change shows me where the problem is, but
> I have no idea how to fix it.
>
> Index: Makefile.in
> ===================================================================
> RCS file: /cvs/gcc/gcc/Makefile.in,v
> retrieving revision 1.77
> diff -c -p -r1.77 Makefile.in
> *** Makefile.in 2001/03/21 19:34:08 1.77
> --- Makefile.in 2001/03/23 00:26:37
> *************** $(DO_X):
> *** 967,973 ****
> if (cd ./$$i; \
> $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
> "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
> ! "`echo \"RANLIB=$${RANLIB}\" | sed -e \'s/.*=$$/XFOO=/\'`" \
> "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
> $${target}); \
> then true; else exit 1; fi; \
> --- 967,973 ----
> if (cd ./$$i; \
> $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
> "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
> ! "RANLIB=$${RANLIB}" \
> "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
> $${target}); \
> then true; else exit 1; fi; \
--
Colin Douglas Howell E-mail: chowell@redhat.com
Support Engineer Support line: (408) 542-9601
Red Hat, Inc.