Do not attempt to create a .gmo file if the sources are read-only.
authorNick Clifton <nickc@redhat.com>
Thu, 2 May 2002 08:15:00 +0000 (08:15 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 2 May 2002 08:15:00 +0000 (08:15 +0000)
gprof/ChangeLog
gprof/po/Make-in

index 84f2b3deecacb3fc118953fd7729f59e0ff00357..079f34abfb0b940d5c6d61232afe1d9eb870578d 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-02  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * po/Make-in (.po.gmo): Do not attempt to create a .gmo file if
+       the sources are read-only.
+
 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
 
        * dep-in.sed: Cope with absolute paths.
index 0552db1feef388210a3f190b9a5eb8a1524ce049..833d418224cbb413a2dfee64c8a73ead10369e8b 100644 (file)
@@ -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 \