Re: SGI mode depcomp breaks when '.' appears in source filenames twice
"Hari" == Raja R Harinath [EMAIL PROTECTED] writes: Hari Try changing that to Hari sed 's/^.*\.o://' | tr ' I checked this in. Thanks. Tom
Re: SGI mode depcomp breaks when '.' appears in source filenames twice
On Thu, Apr 05, 2001 at 10:32:02PM -0500, Raja R Harinath wrote: Well -- the whole idea is to remove the rule targets. I know of only one use of multiple colons on a line -- in GNU make. Even there, everything before a ':' is a rule target. My comment "limited to the first ':'" may not be accurate, but I don't see any advantage to not always removing everything before a ':'. it sounds as if you're saying that rule :: action is GNU-make specific, which is not true, of course. -- Thomas E. Dickey [EMAIL PROTECTED] http://dickey.his.com ftp://dickey.his.com
Re: SGI mode depcomp breaks when '.' appears in source filenames twice
Thomas Dickey wrote: On Thu, Apr 05, 2001 at 10:32:02PM -0500, Raja R Harinath wrote: Well -- the whole idea is to remove the rule targets. I know of only one use of multiple colons on a line -- in GNU make. Even there, everything before a ':' is a rule target. My comment "limited to the first ':'" may not be accurate, but I don't see any advantage to not always removing everything before a ':'. it sounds as if you're saying that rule :: action is GNU-make specific, which is not true, of course. -- Thomas E. Dickey [EMAIL PROTECTED] http://dickey.his.com ftp://dickey.his.com Thomas: The question here applies to only the output of the SGI compiler's automatic dependency generation, and perhaps other compilers that use the same scheme(?). If we had source for the SGI preprocessor we could find out for certain, but I doubt that '::' will appear anywhere in its output. I have attached a patch, made with the suggestions by Hari. Unfortunately it wasn't made with cvs as I'm currently in the midst of an outage. :( Robert -- Robert Boehne Software Engineer Ricardo Software Chicago Technical Center TEL: (630)789-0003 x. 238 FAX: (630)789-0127 email: [EMAIL PROTECTED] --- depcomp Thu Apr 5 18:20:41 2001 +++ /usr/local/share/automake/depcomp Wed Apr 4 10:58:22 2001 @@ -131,7 +131,7 @@ # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). tr ' ' ' -' "$tmpdepfile" | sed 's/^.*\.o://' | tr ' +' "$tmpdepfile" | sed 's/^[^\.]*\.o://' | tr ' ' ' ' $depfile tr ' ' '
Re: SGI mode depcomp breaks when '.' appears in source filenames twice
Thomas Dickey [EMAIL PROTECTED] writes: On Thu, Apr 05, 2001 at 10:32:02PM -0500, Raja R Harinath wrote: Well -- the whole idea is to remove the rule targets. I know of only one use of multiple colons on a line -- in GNU make. Even there, everything before a ':' is a rule target. My comment "limited to the first ':'" may not be accurate, but I don't see any advantage to not always removing everything before a ':'. it sounds as if you're saying that rule :: action is GNU-make specific, which is not true, of course. Whoops. I forgot all about that. I was thinking of foo.o bar.o: %.o: %.h; ... Anyway, we are getting off-topic :-) The 'sed' rule under question is applied to what's generated by an SGI compiler's dependency-generator. - Hari -- Raja R Harinath -- [EMAIL PROTECTED] "When all else fails, read the instructions." -- Cahn's Axiom "Our policy is, when in doubt, do the right thing." -- Roy L Ash
Re: SGI mode depcomp breaks when '.' appears in source filenames twice
"Raja" == Raja R Harinath [EMAIL PROTECTED] writes: Raja Whoops. I forgot all about that. I was thinking of Raja foo.o bar.o: %.o: %.h; ... Multiple ":"s can appear on a line when using Windows, too. Raja Anyway, we are getting off-topic :-) The 'sed' rule under Raja question is applied to what's generated by an SGI compiler's Raja dependency-generator. I agree. That's all that matters. It probably doesn't generate "::" rules, or run on Windows, or anything like that. I haven't read the patch yet. But if someone else with write access thinks it is ok, that's good enough for me. It, or something, should go in. Tom
Re: SGI mode depcomp breaks when '.' appears in source filenames twice
I accidentally made the patch backwards, but it should still work. ;) Tom Tromey wrote: "Raja" == Raja R Harinath [EMAIL PROTECTED] writes: Raja Whoops. I forgot all about that. I was thinking of Raja foo.o bar.o: %.o: %.h; ... Multiple ":"s can appear on a line when using Windows, too. Raja Anyway, we are getting off-topic :-) The 'sed' rule under Raja question is applied to what's generated by an SGI compiler's Raja dependency-generator. I agree. That's all that matters. It probably doesn't generate "::" rules, or run on Windows, or anything like that. I haven't read the patch yet. But if someone else with write access thinks it is ok, that's good enough for me. It, or something, should go in. Tom -- Robert Boehne Software Engineer Ricardo Software Chicago Technical Center TEL: (630)789-0003 x. 238 FAX: (630)789-0127 email: [EMAIL PROTECTED]
Re: SGI mode depcomp breaks when '.' appears in source filenames twice
On Apr 5, 2001, Raja R Harinath [EMAIL PROTECTED] wrote: Robert Boehne [EMAIL PROTECTED] writes: sed 's/^[^\.]*\.o://' | tr ' Try changing that to sed 's/^.*\.o://' | tr ' This should be safe. I don't see why the original tried to avoid '.'s. The regexp is limited to the first ':' -- so the '.*' cannot swallow any more of the line. Perhaps `[^:]*', just to be on the safe side? -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me