Imported Upstream version 2.14.2
[platform/upstream/fontconfig.git] / fc-lang / Makefile.am
index d2eca5b..eaa5249 100644 (file)
@@ -1,8 +1,7 @@
 # -*- encoding: utf-8 -*-
 #
-# $Id $
-#
-# Copyright © 2003 Keith Packard
+# Copyright © 2003  Keith Packard
+# Copyright © 2013  Google, Inc.
 #
 # Permission to use, copy, modify, distribute, and sell this software and its
 # documentation for any purpose is hereby granted without fee, provided that
 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 #
+# Google Author(s): Behdad Esfahbod
 
-INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
-
-TMPL=fclang.tmpl.h
-STMPL=${top_srcdir}/fc-lang/fclang.tmpl.h
-TARG=fclang.h
-
-noinst_PROGRAMS=fc-lang
-
-noinst_MANS=fc-lang.man
-
-EXTRA_DIST = $(TARG) $(TMPL) $(ORTH)
-
-if CROSS_COMPILING
-$(TARG):$(ORTH) fc-lang.c $(STMPL)
-       @echo Warning: cannot rebuild $(TARG) when cross-compiling
-else
-$(TARG):$(ORTH) fc-lang${EXEEXT} $(STMPL)
-       $(AM_V_GEN) $(RM) $(TARG); \
-       ./fc-lang${EXEEXT} -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG).tmp && \
-       mv $(TARG).tmp $(TARG)
-endif
-
-ALIAS_FILES = fcalias.h fcaliastail.h
-
-BUILT_SOURCES = $(ALIAS_FILES) $(TARG)
+TAG = lang
+DEPS = $(ORTH)
+ARGS = --directory $(srcdir) $(ORTH)
+DIST = $(ORTH)
 
-$(ALIAS_FILES):
-       touch $(ALIAS_FILES)
-
-CLEANFILES = $(ALIAS_FILES)
-
-DISTCLEANFILES = $(TARG)
-
-MAINTAINERCLEANFILES = $(TARG)
+include $(top_srcdir)/Tools.mk
 
 # NOTE:
 #
@@ -291,6 +263,7 @@ ORTH = \
        pap_an.orth \
        pap_aw.orth \
        qu.orth \
+       quz.orth \
        rn.orth \
        rw.orth \
        sc.orth \
@@ -307,5 +280,26 @@ ORTH = \
        brx.orth \
        sat.orth \
        doi.orth \
-       mni.orth
+       mni.orth \
+       und_zsye.orth \
+       und_zmth.orth
 #      ^-------------- Add new orth files here
+
+BUILT_SOURCES += $(top_builddir)/conf.d/35-lang-normalize.conf
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+
+$(top_builddir)/conf.d/35-lang-normalize.conf: $(ORTH) Makefile
+       $(AM_V_GEN) echo "<?xml version=\"1.0\"?>" > $@ && \
+               echo "<!DOCTYPE fontconfig SYSTEM \"urn:fontconfig:fonts.dtd\">" >> $@ && \
+               echo "<fontconfig>" >> $@ && \
+       for i in `echo $(ORTH) | sed -e 's/ /\n/g' | grep -v _ | sed -e 's/\.orth$$//g' | sort`; do \
+               echo "  <!-- $$i* -> $$i -->" >> $@; \
+               echo "  <match>" >> $@; \
+               echo "    <test name=\"lang\" compare=\"contains\"><string>$$i</string></test>" >> $@; \
+               echo "    <edit name=\"lang\" mode=\"assign\" binding=\"same\"><string>$$i</string></edit>" >> $@; \
+               echo "  </match>" >> $@; \
+       done && \
+       echo "</fontconfig>" >> $@
+
+-include $(top_srcdir)/git.mk