# Makefile for PO directory in any package using GNU gettext.
# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without any warranty.
#
# Origin: gettext-0.19.8
#
PACKAGE = flex
VERSION = 2.6.4
PACKAGE_BUGREPORT = flex-help@lists.sourceforge.net
SED = /usr/bin/sed
SHELL = /bin/sh
srcdir = .
top_srcdir = ..

prefix = /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/per-package/host-flex/host
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
localedir = ${datarootdir}/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
mkinstalldirs = $(SHELL) ${SHELL} /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/build/host-flex-2.6.4/build-aux/install-sh -d
install_sh = $(SHELL) ${SHELL} /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/build/host-flex-2.6.4/build-aux/install-sh
MKDIR_P = /usr/bin/mkdir -p
mkdir_p = $(MKDIR_P)
CROSS_COMPILING = @CROSS_COMPILING@
GMSGFMT_ = /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/per-package/host-flex/host/bin/msgfmt
GMSGFMT_no = /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/per-package/host-flex/host/bin/msgfmt
GMSGFMT_yes = /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/per-package/host-flex/host/bin/msgfmt
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
MSGFMT_ = /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/per-package/host-flex/host/bin/msgfmt
MSGFMT_no = /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/per-package/host-flex/host/bin/msgfmt
MSGFMT_yes = /home/ubuntu/demo.zhiyu.school/RV06_03_Linux_SDK/sysdrv/source/buildroot/buildroot-2024.02.10/output/per-package/host-flex/host/bin/msgfmt
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))

POFILES =  ca.po da.po de.po en@quot.po en@boldquot.po eo.po es.po fi.po fr.po ga.po hr.po ko.po nl.po pl.po pt_BR.po ro.po ru.po sr.po sv.po tr.po vi.po zh_CN.po zh_TW.po
GMOFILES =  ca.gmo da.gmo de.gmo en@quot.gmo en@boldquot.gmo eo.gmo es.gmo fi.gmo fr.gmo ga.gmo hr.gmo ko.gmo nl.gmo pl.gmo pt_BR.gmo ro.gmo ru.gmo sr.gmo sv.gmo tr.gmo vi.gmo zh_CN.gmo zh_TW.gmo
MOFILES = @MOFILES@

POTFILES = \
     ../src/buf.c \
     ../src/ccl.c \
     ../src/dfa.c \
     ../src/ecs.c \
     ../src/gen.c \
     ../src/libmain.c \
     ../src/libyywrap.c \
     ../src/main.c \
     ../src/misc.c \
     ../src/nfa.c \
     ../src/options.c \
     ../src/parse.y \
     ../src/scan.l \
     ../src/scanopt.c \
     ../src/sym.c \
     ../src/tblcmp.c \
     ../src/yylex.c

CATALOGS =  ca.gmo da.gmo de.gmo en@quot.gmo en@boldquot.gmo eo.gmo es.gmo fi.gmo fr.gmo ga.gmo hr.gmo ko.gmo nl.gmo pl.gmo pt_BR.gmo ro.gmo ru.gmo sr.gmo sv.gmo tr.gmo vi.gmo zh_CN.gmo zh_TW.gmo

# Makevars gets inserted here. (Don't remove this line!)
# Makefile variables for PO directory in any package using GNU gettext.

# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)

# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..

# These options get passed to xgettext.
XGETTEXT_OPTIONS = --language=C --keyword=_ --keyword=N_

# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
# package.  (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.)  Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright.  The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = 

# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
# Possible values are "yes", "no", or empty.  If it is empty, try to
# detect it automatically by scanning the files in $(top_srcdir) for
# "GNU packagename" string.
PACKAGE_GNU = "no"

# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
#   in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
#   understood.
# - Strings which make invalid assumptions about notation of date, time or
#   money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = flex-devel@lists.sourceforge.net

# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used.  It is usually empty.
EXTRA_LOCALE_CATEGORIES =

# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context.  Possible values are "yes" and "no".  Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no

# These options get passed to msgmerge.
# Useful options are in particular:
#   --previous            to keep previous msgids of translated messages,
#   --quiet               to reduce the verbosity.
MSGMERGE_OPTIONS =

# These options get passed to msginit.
# If you want to disable line wrapping when writing PO files, add
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
# MSGINIT_OPTIONS.
MSGINIT_OPTIONS =

# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
# has changed.  Possible values are "yes" and "no".  Set this to no if
# the POT file is checked in the repository and the version control
# program ignores timestamps.
PO_DEPENDS_ON_POT = yes

# This tells whether or not to forcibly update $(DOMAIN).pot and
# regenerate PO files on "make dist".  Possible values are "yes" and
# "no".  Set this to no if the POT file and PO files are maintained
# externally.
DIST_DEPENDS_ON_UPDATE_PO = no

.SUFFIXES:
.SUFFIXES: .po .gmo .mo
.PHONY: all

all: all-no

all-yes: update-po update-mo

all-no:

.po.mo:
	@echo "$(MSGFMT) -c -o $@ $<"; \
	$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@

.po.gmo:
	@lang=`echo $* | sed -e 's,.*/,,'`; \
	echo "cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
	cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo

$(srcdir)/$(DOMAIN).pot:
	test -f $(srcdir)/$(DOMAIN).pot || touch $(srcdir)/$(DOMAIN).pot;

.po: $(srcdir)/$(DOMAIN).pot
	@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
	if test -f "$(srcdir)/$${lang}.po"; then \
		echo "cd $(srcdir) && $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
		cd $(srcdir) && $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot; \
	else \
		echo "po file does not exist"; \
		exit 1; \
	fi

update-gmo update-mo:
	if test -n "$(GMOFILES)"; then \
		$(MAKE) $(GMOFILES); \
	else \
		test "$(MOFILES)" = "@MOFILES@" || $(MAKE) $(MOFILES); \
	fi

update-po:
	test -z "$(POFILES)" || $(MAKE) $(POFILES)

install: install-no
install-strip: install
install-no:
install-yes: all
	@catalogs='$(CATALOGS)'; \
	for cat in $$catalogs; do \
	  cat=`basename $$cat`; \
	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
	  dir=$(localedir)/$$lang/LC_MESSAGES; \
	  $(mkdir_p) $(DESTDIR)$$dir; \
	  if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
	  $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
	  echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
	    if test -n "$$lc"; then \
	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
	         for file in *; do \
	           if test -f $$file; then \
	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
	           fi; \
	         done); \
	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
	      else \
	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
	          :; \
	        else \
	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
	        fi; \
	      fi; \
	      rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
	      ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
	      ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
	      cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
	      echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
	    fi; \
	  done; \
	done


installdirs: installdirs-no
installdirs-no:
installdirs-yes:
	@catalogs='$(CATALOGS)'; \
	for cat in $$catalogs; do \
	  cat=`basename $$cat`; \
	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
	  dir=$(localedir)/$$lang/LC_MESSAGES; \
	  $(mkdir_p) $(DESTDIR)$$dir; \
	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
	    if test -n "$$lc"; then \
	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
	         for file in *; do \
	           if test -f $$file; then \
	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
	           fi; \
	         done); \
	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
	      else \
	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
	          :; \
	        else \
	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
	        fi; \
	      fi; \
	    fi; \
	  done; \
	done

installcheck:

uninstall: uninstall-no
uninstall-no:
uninstall-yes:
	catalogs='$(CATALOGS)'; \
	for cat in $$catalogs; do \
	  cat=`basename $$cat`; \
	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
	  for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
	    rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
	  done; \
	done

check: all

info dvi ps pdf html tags TAGS ctags CTAGS ID:

install-dvi install-ps install-pdf install-html:

distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po update-mo
	$(mkdir_p) $(distdir); \
	if test -n "$(GMOFILES)"; then \
		dists="$(POFILES) $(GMOFILES)"; \
	else \
		dists="$(POFILES) $(MOFILES)"; \
	fi; \
	if test "$(PACKAGE)" = "gettext-tools"; then \
		dists="$$dists Makevars.template"; \
	fi; \
	if test -f $(srcdir)/POTFILES.in; then \
		dists="$$dists POTFILES.in"; \
	fi; \
	if test -f $(srcdir)/Makefile.in.in; then \
		dists="$$dists Makefile.in.in"; \
	fi; \
	if test -f $(srcdir)/Makevars; then \
		dists="$$dists Makevars"; \
	fi; \
	if test -f $(srcdir)/$(DOMAIN).pot; then \
		dists="$$dists $(DOMAIN).pot"; \
	fi; \
	if test -f $(srcdir)/ChangeLog; then \
		dists="$$dists ChangeLog"; \
	fi; \
	for i in 0 1 2 3 4 5 6 7 8 9; do \
		if test -f $(srcdir)/ChangeLog.$$i; then \
			dists="$$dists ChangeLog.$$i"; \
		fi; \
	done; \
	if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
	for file in $$dists; do \
		if test -f $$file; then \
			cp -p $$file $(distdir) || exit 1; \
		else \
			cp -p $(srcdir)/$$file $(distdir) || exit 1; \
		fi; \
	done

Makefile: Makefile.in.in Makevars $(top_builddir)/config.status
	cd $(top_builddir) && /bin/bash ./config.status $(subdir)/$@.in po-directories;

mostlyclean clean:
	rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
	rm -fr *.o

maintainer-clean distclean: clean
	rm -f Makefile Makefile.in *.mo *.gmo
# Special Makefile rules for English message catalogs with quotation marks.

DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot

.SUFFIXES: .insert-header .po-update-en

en@quot.po-create:
	$(MAKE) en@quot.po-update
en@boldquot.po-create:
	$(MAKE) en@boldquot.po-update

en@quot.po-update: en@quot.po-update-en
en@boldquot.po-update: en@boldquot.po-update-en

.insert-header.po-update-en:
	@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
	if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
	tmpdir=`pwd`; \
	echo "$$lang:"; \
	ll=`echo $$lang | sed -e 's/@.*//'`; \
	LC_ALL=C; export LC_ALL; \
	cd $(srcdir); \
	if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
	    rm -f $$tmpdir/$$lang.new.po; \
	  else \
	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
	      :; \
	    else \
	      echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
	      exit 1; \
	    fi; \
	  fi; \
	else \
	  echo "creation of $$lang.po failed!" 1>&2; \
	  rm -f $$tmpdir/$$lang.new.po; \
	fi

en@quot.insert-header: insert-header.sin
	sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header

en@boldquot.insert-header: insert-header.sin
	sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header

mostlyclean: mostlyclean-quot
mostlyclean-quot:
	rm -f *.insert-header
