Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge custom Makefile.in.in changes from commits e97380c, d125760 and e…
…8955f3 to fix compilation from a clean target
  • Loading branch information
codereader committed Feb 2, 2017
1 parent 07cdcbf commit 2d2ea45
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions install/i18n/Makefile.in.in
Expand Up @@ -70,7 +70,7 @@ POFILES = @POFILES@
GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
DISTFILES.common = Makefile.in.in \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
Expand Down Expand Up @@ -155,7 +155,7 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# The determination of whether the package xyz is a GNU one is based on the
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in
package_gnu="$(PACKAGE_GNU)"; \
test -n "$$package_gnu" || { \
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
Expand Down Expand Up @@ -206,8 +206,8 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
rm -f $(DOMAIN).1po; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
cat < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
cat < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
Expand All @@ -227,7 +227,7 @@ $(srcdir)/$(DOMAIN).pot:

# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(POFILESDEPS)
$(POFILES): $(POFILESDEPS) gather-po-files
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
Expand Down Expand Up @@ -374,7 +374,6 @@ check: all
info dvi ps pdf html tags TAGS ctags CTAGS ID:

mostlyclean:
rm -f remove-potcdate.sed
rm -f stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
Expand Down Expand Up @@ -419,6 +418,16 @@ dist2: stamp-po $(DISTFILES)
fi; \
done

# Custom target added to gather the .po files in the top-level directory and
# with the correct names. The Win32 gettext implementation keeps them next to
# the .mo files.
gather-po-files:
for dir in *; do \
if test -d $${dir}; then \
cp $${dir}/LC_MESSAGES/darkradiant.po $${dir}.po; \
fi; \
done

update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
Expand Down Expand Up @@ -465,7 +474,7 @@ update-po: Makefile

$(DUMMYPOFILES):

update-gmo: Makefile $(GMOFILES)
update-gmo: Makefile gather-po-files $(GMOFILES)
@:

# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
Expand Down

0 comments on commit 2d2ea45

Please sign in to comment.