[gimp] enums: don't use comments in generated enum recipes



commit 3ca48a0b30a85cfc8a63912906dd483208c342fb
Author: Ell <ell_se yahoo com>
Date:   Fri Jun 2 10:53:44 2017 -0400

    enums: don't use comments in generated enum recipes
    
    Works in bash, but apparently not portable.

 app/config/Makefile.am     |    7 ++++---
 app/core/Makefile.am       |    7 ++++---
 app/display/Makefile.am    |    7 ++++---
 app/gegl/Makefile.am       |    7 ++++---
 app/operations/Makefile.am |    7 ++++---
 app/paint/Makefile.am      |    7 ++++---
 app/plug-in/Makefile.am    |    7 ++++---
 app/text/Makefile.am       |    7 ++++---
 app/tools/Makefile.am      |    7 ++++---
 app/widgets/Makefile.am    |    7 ++++---
 libgimpbase/Makefile.am    |   14 ++++++++------
 libgimpconfig/Makefile.am  |    7 ++++---
 libgimpwidgets/Makefile.am |    7 ++++---
 13 files changed, 56 insertions(+), 42 deletions(-)
---
diff --git a/app/config/Makefile.am b/app/config/Makefile.am
index 588fa9f..97bc714 100644
--- a/app/config/Makefile.am
+++ b/app/config/Makefile.am
@@ -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
diff --git a/app/core/Makefile.am b/app/core/Makefile.am
index 9e5a679..b17abbf 100644
--- a/app/core/Makefile.am
+++ b/app/core/Makefile.am
@@ -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
diff --git a/app/display/Makefile.am b/app/display/Makefile.am
index c9a9300..04d7ff9 100644
--- a/app/display/Makefile.am
+++ b/app/display/Makefile.am
@@ -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
diff --git a/app/gegl/Makefile.am b/app/gegl/Makefile.am
index 2eb150d..28db805 100644
--- a/app/gegl/Makefile.am
+++ b/app/gegl/Makefile.am
@@ -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
diff --git a/app/operations/Makefile.am b/app/operations/Makefile.am
index 5eef0a3..748b9ad 100644
--- a/app/operations/Makefile.am
+++ b/app/operations/Makefile.am
@@ -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
diff --git a/app/paint/Makefile.am b/app/paint/Makefile.am
index f93619f..cf67fd1 100644
--- a/app/paint/Makefile.am
+++ b/app/paint/Makefile.am
@@ -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
diff --git a/app/plug-in/Makefile.am b/app/plug-in/Makefile.am
index 208adea..cde8260 100644
--- a/app/plug-in/Makefile.am
+++ b/app/plug-in/Makefile.am
@@ -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
diff --git a/app/text/Makefile.am b/app/text/Makefile.am
index c0a5a91..f2fdd34 100644
--- a/app/text/Makefile.am
+++ b/app/text/Makefile.am
@@ -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
diff --git a/app/tools/Makefile.am b/app/tools/Makefile.am
index 3748f8a..6f9b7c5 100644
--- a/app/tools/Makefile.am
+++ b/app/tools/Makefile.am
@@ -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
diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am
index 8eb0df7..625bdee 100644
--- a/app/widgets/Makefile.am
+++ b/app/widgets/Makefile.am
@@ -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
diff --git a/libgimpbase/Makefile.am b/libgimpbase/Makefile.am
index 12bcfd6..a1a6719 100644
--- a/libgimpbase/Makefile.am
+++ b/libgimpbase/Makefile.am
@@ -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
diff --git a/libgimpconfig/Makefile.am b/libgimpconfig/Makefile.am
index 9c052c9..801b91a 100644
--- a/libgimpconfig/Makefile.am
+++ b/libgimpconfig/Makefile.am
@@ -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
diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am
index dd7b855..8d8d29c 100644
--- a/libgimpwidgets/Makefile.am
+++ b/libgimpwidgets/Makefile.am
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]