From: Nick Clifton Date: Thu, 2 May 2002 08:15:00 +0000 (+0000) Subject: Do not attempt to create a .gmo file if the sources are read-only. X-Git-Tag: binutils-2_13-branchpoint~1129 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3427997ad759f705f99611018da19512ca2bbb0;p=platform%2Fupstream%2Fbinutils.git Do not attempt to create a .gmo file if the sources are read-only. --- diff --git a/gprof/ChangeLog b/gprof/ChangeLog index 84f2b3d..079f34a 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,8 @@ +2002-05-02 Nick Clifton + + * po/Make-in (.po.gmo): Do not attempt to create a .gmo file if + the sources are read-only. + 2002-04-04 Alan Modra * dep-in.sed: Cope with absolute paths. diff --git a/gprof/po/Make-in b/gprof/po/Make-in index 0552db1..833d418 100644 --- a/gprof/po/Make-in +++ b/gprof/po/Make-in @@ -70,7 +70,9 @@ INSTOBJEXT = @INSTOBJEXT@ .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ - && rm -f $$file && $(GMSGFMT) -o $$file $< + && test -w $$file \ + && (rm -f $$file && $(GMSGFMT) -o $$file $< ) \ + || echo "$$file is not writable" .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \