This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix broken 'make install-po'. Fixes PR other/7727
- From: Josh Martin <Josh dot Martin at abq dot sc dot philips dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Aug 2002 16:55:45 -0600
- Subject: [PATCH] Fix broken 'make install-po'. Fixes PR other/7727
- Organization: Philips Semiconductors
This patch fixes the broken 'make install-po' in gcc/Makefile.in for
GCC version 3.2 described by PR other/7727. When installing gcc with
NLS enabled 'make install-po' will break if there are no localization
files to install. The 'for' statement breaks because the 'in' list
($CATALOGS) is empty. I changed the loop so that if $CATALOGS is empty
the for loop still works.
This is a platform independant-ish problem, but my patch successfully
bootstraps with no test regressions for hppa64-hp-hpux11.00.
What follows is the ChangeLog followed by the diff patch.
- Josh Martin
------------------------------
-- ChangeLog
2002-08-28 Josh Martin <timeslice@iname.com>
* gcc/Makefile.in (install-po): Changed to correctly handle no
localization files to be installed ($CATALOGS is empty).
Fixes PR other/7727.
------------------------------
-- gcc/Makefile.in.diff
--- Makefile.in.old Wed Aug 28 15:22:42 2002
+++ Makefile.in.new Wed Aug 28 16:03:10 2002
@@ -3425,7 +3425,7 @@ update-po: $(CATALOGS:.gmo=.pox)
# with the distribution.
install-po:
$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
- for cat in $(CATALOGS); do \
+ for cat in $(CATALOGS) ..; do if [ x$$cat != x.. ]; then\
lang=`basename $$cat | sed 's/\.gmo$$//'`; \
if [ -f $$cat ]; then :; \
elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
@@ -3436,7 +3436,7 @@ install-po:
$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$$dir || exit 1; \
echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
- done
+ fi; done
# Rule for regenerating the message template (gcc.pot).
# Instead of forcing everyone to edit POTFILES.in, which proved
impractical,