summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf.d/Makefile.am10
-rw-r--r--fc-lang/Makefile.am15
2 files changed, 24 insertions, 1 deletions
diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am
index d0f3f26..3bb92dd 100644
--- a/conf.d/Makefile.am
+++ b/conf.d/Makefile.am
@@ -21,7 +21,11 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-BUILT_SOURCES = README
+NULL =
+BUILT_SOURCES = \
+ README \
+ 35-lang-normalize.conf \
+ $(NULL)
DOC_SOURCES = README.in
DOC_FILES = $(DOC_SOURCES:.in=)
@@ -71,6 +75,7 @@ template_DATA = \
20-unhint-small-vera.conf \
25-unhint-nonlatin.conf \
30-metric-aliases.conf \
+ 35-lang-normalize.conf \
40-nonlatin.conf \
45-generic.conf \
45-latin.conf \
@@ -91,6 +96,9 @@ template_DATA = \
README: $(srcdir)/README.in
sed "s|\@TEMPLATEDIR\@|$(templatedir)|" $< > $@
+35-lang-normalize.conf: ../fc-lang/Makefile.am
+ cd ../fc-lang && $(MAKE) $(AM_MAKEFLAGS) $(top_builddir)/conf.d/35-lang-normalize.conf
+
install-data-hook:
mkdir -p $(DESTDIR)$(configdir)
@(echo cd $(DESTDIR)$(configdir); \
diff --git a/fc-lang/Makefile.am b/fc-lang/Makefile.am
index 5fdccea..f8a9503 100644
--- a/fc-lang/Makefile.am
+++ b/fc-lang/Makefile.am
@@ -285,4 +285,19 @@ 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 "<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