Commit 3ca48a0b authored by Ell's avatar Ell

enums: don't use comments in generated enum recipes

Works in bash, but apparently not portable.
parent fcc52da9
......@@ -147,13 +147,14 @@ xgen-cec: $(srcdir)/config-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/config-enums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -462,13 +462,14 @@ xgen-cec: $(srcdir)/core-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/core-enums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -190,13 +190,14 @@ xgen-dec: $(srcdir)/display-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/display-enums.c: xgen-dec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -64,13 +64,14 @@ xgen-ggec: $(srcdir)/gimp-gegl-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/gimp-gegl-enums.c: xgen-ggec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -123,13 +123,14 @@ xgen-oec: $(srcdir)/operations-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/operations-enums.c: xgen-oec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -110,13 +110,14 @@ xgen-pec: $(srcdir)/paint-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/paint-enums.c: xgen-pec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -93,13 +93,14 @@ xgen-pec: $(srcdir)/plug-in-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/plug-in-enums.c: xgen-pec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -69,13 +69,14 @@ xgen-tec: $(srcdir)/text-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/text-enums.c: xgen-tec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -246,13 +246,14 @@ xgen-tec: $(srcdir)/tools-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/tools-enums.c: xgen-tec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -474,13 +474,14 @@ xgen-wec: $(srcdir)/widgets-enums.h $(GIMP_MKENUMS) Makefile.am
--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" \
$< > $@
# 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.
$(srcdir)/widgets-enums.c: xgen-wec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -213,13 +213,14 @@ xgen-bec: $(srcdir)/gimpbaseenums.h $(GIMP_MKENUMS) Makefile.am
--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_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \
$< > $@
# 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.
$(srcdir)/gimpbaseenums.c: xgen-bec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -236,13 +237,14 @@ xgen-cec: $(srcdir)/gimpcompatenums.h $(GIMP_MKENUMS) Makefile.am
--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_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \
$< > $@
# 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.
$(srcdir)/gimpcompatenums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......
......@@ -150,13 +150,14 @@ xgen-cec: $(srcdir)/gimpconfigenums.h $(GIMP_MKENUMS) Makefile.am
--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_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \
$< > $@
# 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.
$(srcdir)/gimpconfigenums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......@@ -319,13 +319,14 @@ xgen-wec: $(srcdir)/gimpwidgetsenums.h $(GIMP_MKENUMS) Makefile.am
--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_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \
$< > $@
# 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.
$(srcdir)/gimpwidgetsenums.c: xgen-wec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
# if the file hasn't changed, only update its timestamp, so that \
# the receipe doesn't get executed again next time, but allow this \
# to fail (e.g., when using a read-only source directory). \
touch $@ 2> /dev/null \
|| true; \
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment