delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/04/09:35:03

Date: Sun, 4 Jul 1999 16:32:55 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Edevaldo Pereira (q14792)" <q14792 AT email DOT sps DOT mot DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: TCL Port
In-Reply-To: <377CC509.B7453D72@email.sps.mot.com>
Message-ID: <Pine.SUN.3.91.990704163233.13333e@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Fri, 2 Jul 1999, Edevaldo Pereira (q14792) wrote:

> # Additional editing of Makefiles
> /ac_given_INSTALL=/,/^CEOF/ {
>   /^s%@l@%/a\
>   /TEXINPUTS=/s,:,\\\\\\\\\\\\\\;,g\
>   /PATH=/s,:,\\\\\\\;,g\
>   s,po2tbl\\.sed\\.in,po2tbl-sed.in,g\
>   s,config\\.h\\.in,config.h-in,g\
>   s,Makefile\\.in\\.in,Makefile.in-in,g\
>   s,Makefile\\.am\\.in,Makefile.am-in,g\
> }
> 
> 	I tried this in three different machines( Dos/DJGPP, Solaris & Linux)
> and got the same result. The problem starts in the line :
> 
> 	/TEXINPUTS=/s,:,\\\\\\\\\\\\\\;,g\
> 
> 	Sed complains about the last char "\" in this line and in the lines
> after it. The error is something like "Unsupported s/ extension". Is
> this a gnu extension? I browsed the info files and man pages in all
> three machines and couldn't find the reason for the "\". My hypothesis
> is that all this lines are arguments for the first line (/^s%@l@%/a\) so
> they are appended to the sed script (in the autoconf config file) that
> edits the TCL makefile.

Yes, the backslash is there because these commands are appended (see
the a\ in the first line of the block).  I think the problem is that
the last line of the block ends with a backslash:

   s,Makefile\\.am\\.in,Makefile.am-in,g\

Please remove the traling backslash and see if that solves the
problem.

> 	BUT there are no occurrences of "ac_given_INSTALL=" in the configure
> script. There is something close, that is "ac_given_source=" and between
> this and a ^CEOF the is a sed script that is applied in the
> makefile.

Then you should change ac_given_INSTALL to ac_given_source.

> 	Eli, could you comment about the "\\" present in the sed code above? I
> didn't understood the "\\." and the "\\\\\\\\\\;" parts.

The extra backslashes are there to protect the characters that are
special to Sed, like the dot and the backslash itself.  There's need
for several levels of backslash-escaping because the lines patched by
the above Sed scripts are themselves fed to Sed when the config.status
script runs (config.status is in turn generated by configure).  Yet
another level of escaping is required in the TEXINPUTS and PATH lines
because those backslashes protect the semicolon which is special for
Make and for the shell.

> To be more
> specific why the 2nd line (s|po2tbl\.sed\.in|po2tbl-sed.in|g) and the
> 9th line (s,po2tbl\\.sed\\.in,po2tbl-sed.in,g\) are so different ( \\.
> vs \.)

These two lines only have the dot to escape, whereas the other lines
have additional special characters.

As I said, the problem is in the last line, which should NOT have the
traling backslash.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019