2003-01-29 14:20:09 -08:00
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
2013-06-05 11:48:37 -07:00
-DG_LOG_DOMAIN=\"Gimp-Text\" \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GEGL_CFLAGS) \
$(PANGOCAIRO_CFLAGS) \
2014-05-02 11:31:07 -07:00
$(HARFBUZZ_CFLAGS) \
2013-06-05 11:48:37 -07:00
$(GDK_PIXBUF_CFLAGS) \
2003-01-29 14:20:09 -08:00
-I$(includedir)
noinst_LIBRARIES = libapptext.a
2003-02-05 00:29:12 -08:00
libapptext_a_sources = \
2003-08-15 12:45:41 -07:00
text-types.h \
text-enums.h \
gimpfont.c \
gimpfont.h \
2018-06-02 12:54:34 -07:00
gimpfontfactory.c \
gimpfontfactory.h \
2003-08-15 12:45:41 -07:00
gimptext.c \
gimptext.h \
gimptext-compat.c \
gimptext-compat.h \
gimptext-parasite.c \
gimptext-parasite.h \
gimptext-vectors.c \
gimptext-vectors.h \
gimptext-xlfd.c \
gimptext-xlfd.h \
gimptextlayer.c \
gimptextlayer.h \
gimptextlayer-transform.c \
gimptextlayer-transform.h \
2003-10-27 13:50:41 -08:00
gimptextlayer-xcf.c \
gimptextlayer-xcf.h \
2003-08-15 12:45:41 -07:00
gimptextlayout.c \
gimptextlayout.h \
gimptextlayout-render.c \
2004-03-21 15:14:21 -08:00
gimptextlayout-render.h \
gimptextundo.c \
gimptextundo.h
2003-01-29 14:20:09 -08:00
2003-02-05 00:29:12 -08:00
libapptext_a_built_sources = text-enums.c
2003-01-29 14:20:09 -08:00
2003-02-05 00:29:12 -08:00
libapptext_a_SOURCES = $(libapptext_a_built_sources) $(libapptext_a_sources)
#
# rules to generate built sources
#
# setup autogeneration dependencies
gen_sources = xgen-tec
CLEANFILES = $(gen_sources)
2017-05-22 14:19:17 -07:00
xgen-tec: $(srcdir)/text-enums.h $(GIMP_MKENUMS) Makefile.am
2017-05-22 17:12:50 -07:00
$(AM_V_GEN) $(GIMP_MKENUMS) \
2013-10-14 16:58:39 -07:00
--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include \"libgimpbase/gimpbase.h\"\n#include \"text-enums.h\"\n#include \"gimp-intl.h\"" \
2017-05-22 17:12:50 -07:00
--fprod "\n/* enumerations from \"@basename@\" */" \
2004-07-28 04:50:20 -07:00
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
2004-10-25 10:55:25 -07:00
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
2017-11-29 13:27:59 -08:00
--dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \
2008-11-06 00:28:28 -08:00
--dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \
2017-05-22 17:12:50 -07:00
$< > $@
2017-05-22 14:19:17 -07:00
2017-06-02 07:53:44 -07:00
# copy the generated enum file back to the source directory only if it's
# changed; otherwise, only update its timestamp, so that the recipe isn't
# executed again on the next build, however, allow this to (harmlessly) fail,
# to support building from a read-only source tree.
2017-05-22 14:19:17 -07:00
$(srcdir)/text-enums.c: xgen-tec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
touch $@ 2> /dev/null \
|| true; \
fi