summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-04-19 10:54:05 -0400
committerDan Winship <danw@gnome.org>2013-04-19 10:54:05 -0400
commit39e527cdc1af04afdf13207f5503afa7b772043e (patch)
tree603a97d6bff95227868b5ca1f6ce0b237f7b71e0
parent9b00583aabca2c7200189c8e40f34dda819c3e80 (diff)
downloadlibsoup-39e527cdc1af04afdf13207f5503afa7b772043e.tar.gz
libsoup-39e527cdc1af04afdf13207f5503afa7b772043e.tar.bz2
libsoup-39e527cdc1af04afdf13207f5503afa7b772043e.zip
build: update Makefile.glib
If a SOURCES variable changes, we need to recheck the generated files, since a file may have been removed from SOURCES, but still be referenced in a previously-generated -enum-types.c file, etc. So make these generated files depend on Makefile. Also, update spacing of silent rules to match current automake.
-rw-r--r--Makefile.glib22
1 files changed, 11 insertions, 11 deletions
diff --git a/Makefile.glib b/Makefile.glib
index 8713f9a8..c28c983b 100644
--- a/Makefile.glib
+++ b/Makefile.glib
@@ -128,7 +128,7 @@ _GLIB_DISTCLEANFILES =
_GLIB_V_GEN = $(_glib_v_gen_$(V))
_glib_v_gen_ = $(_glib_v_gen_$(AM_DEFAULT_VERBOSITY))
-_glib_v_gen_0 = @echo " GEN " $(subst .stamp,,$@);
+_glib_v_gen_0 = @echo " GEN " $(subst .stamp,,$@);
### glib-genmarshal
@@ -154,8 +154,8 @@ _glib_marshal_sources = $(filter-out %.h,$(filter-out $(GLIB_GENERATED),$($(_gli
define _glib_make_genmarshal_rules
$(if $(_glib_marshal_sources),,$(error Need to define $(_glib_marshal_sources_var) for $(1).[ch]))
-$(1).list.stamp: $(_glib_marshal_sources)
- $$(_GLIB_V_GEN) LC_ALL=C sed -ne 's/.*_$(_glib_marshal_prefix)_\([_A-Z0-9]*\).*/\1/p' $$^ | sort -u | sed -e 's/__/:/' -e 's/_/,/g' > $(1).list.tmp && \
+$(1).list.stamp: $(_glib_marshal_sources) Makefile
+ $$(_GLIB_V_GEN) LC_ALL=C sed -ne 's/.*_$(_glib_marshal_prefix)_\([_A-Z]*\).*/\1/p' $$(filter-out Makefile, $$^) | sort -u | sed -e 's/__/:/' -e 's/_/,/g' > $(1).list.tmp && \
(cmp -s $(1).list.tmp $(1).list || cp $(1).list.tmp $(1).list) && \
rm -f $(1).list.tmp && \
echo timestamp > $$@
@@ -200,7 +200,7 @@ _glib_enum_types_h_sources = $(filter %.h,$(_glib_enum_types_sources))
define _glib_make_mkenums_rules
$(if $(_glib_enum_types_sources),,$(error Need to define $(_glib_enum_types_sources_var) for $(1).[ch]))
-$(1).h.stamp: $(_glib_enum_types_h_sources)
+$(1).h.stamp: $(_glib_enum_types_h_sources) Makefile
$$(_GLIB_V_GEN) $$(GLIB_MKENUMS) \
--fhead "/* Generated by glib-mkenums. Do not edit */\n\n#ifndef $(_glib_enum_types_guard)\n#define $(_glib_enum_types_guard)\n\n" \
$$(GLIB_MKENUMS_H_FLAGS) \
@@ -208,7 +208,7 @@ $(1).h.stamp: $(_glib_enum_types_h_sources)
--fhead "#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())\n" \
--ftail "G_END_DECLS\n\n#endif /* $(_glib_enum_types_guard) */" \
- $$^ > $(1).h.tmp && \
+ $$(filter-out Makefile, $$^) > $(1).h.tmp && \
(cmp -s $(1).h.tmp $(1).h || cp $(1).h.tmp $(1).h) && \
rm -f $(1).h.tmp && \
echo timestamp > $$@
@@ -216,16 +216,16 @@ $(1).h.stamp: $(_glib_enum_types_h_sources)
$(1).h: $(1).h.stamp
@true
-$(1).c.stamp: $(_glib_enum_types_h_sources)
+$(1).c.stamp: $(_glib_enum_types_h_sources) Makefile
$$(_GLIB_V_GEN) $$(GLIB_MKENUMS) \
--fhead "/* Generated by glib-mkenums. Do not edit */\n\n#include \"$(notdir $(1)).h\"\n" \
$$(GLIB_MKENUMS_C_FLAGS) \
$$($(_glib_enum_types_prefix)_MKENUMS_C_FLAGS) \
- --fhead "$$(foreach f,$$(^F),\n#include \"$$(f)\")\n\n" \
+ --fhead "$$(foreach f,$$(filter-out Makefile,$$(^F)),\n#include \"$$(f)\")\n\n" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n\n if (g_once_init_enter (&g_define_type_id__volatile))\n {\n static const G@Type@Value values[] = {\n" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },\n" \
--vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id =\n g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n\n return g_define_type_id__volatile;\n}\n" \
- $$^ > $(1).c.tmp && \
+ $$(filter-out Makefile, $$^) > $(1).c.tmp && \
(cmp -s $(1).c.tmp $(1).c || cp $(1).c.tmp $(1).c) && \
rm -f $(1).c.tmp && \
echo timestamp > $$@
@@ -254,13 +254,13 @@ _glib_enums_xml_namespace = $(subst .enums.xml,,$(notdir $(1)))
define _glib_make_enums_xml_rule
$(if $(_glib_enums_xml_sources),,$(error Need to define $(_glib_enums_xml_sources_var) for $(1)))
-$(1): $(_glib_enums_xml_sources)
- $$(_GLIB_V_GEN) $$(GLIB_MKENUMS) --comments '<!-- @comment@ -->' --fhead "<schemalist>" --vhead " <@type@ id='$(_glib_enums_xml_namespace).@EnumName@'>" --vprod " <value nick='@valuenick@' value='@valuenum@'/>" --vtail " </@type@>" --ftail "</schemalist>" $$^ > $$@.tmp && mv $$@.tmp $$@
+$(1): $(_glib_enums_xml_sources) Makefile
+ $$(_GLIB_V_GEN) $$(GLIB_MKENUMS) --comments '<!-- @comment@ -->' --fhead "<schemalist>" --vhead " <@type@ id='$(_glib_enums_xml_namespace).@EnumName@'>" --vprod " <value nick='@valuenick@' value='@valuenum@'/>" --vtail " </@type@>" --ftail "</schemalist>" $$(filter-out Makefile, $$^) > $$@.tmp && mv $$@.tmp $$@
endef
_GLIB_V_CHECK = $(_glib_v_check_$(V))
_glib_v_check_ = $(_glib_v_check_$(AM_DEFAULT_VERBOSITY))
-_glib_v_check_0 = @echo " CHECK " $(subst .valid,.xml,$@);
+_glib_v_check_0 = @echo " CHECK " $(subst .valid,.xml,$@);
define _glib_make_schema_validate_rule
$(subst .xml,.valid,$(1)): $(_GLIB_ENUMS_XML_GENERATED) $(1)