thread safety
[hildon] / hildon-widgets / Makefile.am
index ee0f0a7..39c17a3 100644 (file)
@@ -91,6 +91,8 @@ libhildonwidgets_la_SOURCES = \
        hildon-find-toolbar.h \
        gtk-infoprint.c \
        gtk-infoprint.h \
+       hildon-banner.c \
+       hildon-banner.h \
        hildon-input-mode-hint.h \
        hildon-app-private.h \
        hildon-caption.c \
@@ -99,7 +101,11 @@ libhildonwidgets_la_SOURCES = \
        hildon-window.h \
        hildon-window-private.h \
        hildon-program.c \
-       hildon-program.h
+       hildon-program.h \
+       hildon-code-dialog.c \
+       hildon-code-dialog.h \
+       $(hildonlibs_built_headers) \
+       $(hildonlibs_built_cfiles)
 
 
 hildon-marshalers.h: hildon-marshalers.list
@@ -107,7 +113,7 @@ hildon-marshalers.h: hildon-marshalers.list
                        hildon-marshalers.list >hildon-marshalers.h
 
 hildon-marshalers.c: hildon-marshalers.list hildon-marshalers.h
-       echo '#include "hildon-marshalers.h"' >hildon-marshalers.c
+       echo '#include <hildon-widgets/hildon-marshalers.h>' >hildon-marshalers.c
        glib-genmarshal --prefix _hildon_marshal --body \
                        hildon-marshalers.list >>hildon-marshalers.c
 
@@ -149,9 +155,48 @@ hildonwidgetsincludeinst_DATA = \
        hildon-appview.h \
        hildon-find-toolbar.h \
        gtk-infoprint.h \
+       hildon-banner.h \
        hildon-input-mode-hint.h \
        hildon-app-private.h \
        hildon-caption.h \
        hildon-window.h \
        hildon-program.h \
-       hildon-window-private.h
+       hildon-window-private.h \
+       hildon-code-dialog.h
+
+headers_to_scan_for_enums = $(hildonwidgetsincludeinst_DATA)
+# Generate the enums source code, with glib-mkenums:
+# This is based on the same Makefile.am stuff in pango:
+hildonlibs_built_headers = hildon-libs-enum-types.h
+hildonlibs_built_cfiles = hildon-libs-enum-types.c
+# Don't build the library until we have built the header that it needs:
+$(OBJECTS) $(libhildonwidgets_la_OBJECTS): $(hildonlibs_built_headers)
+hildon-libs-enum-types.h: @REBUILD@ $(headers_to_scan_for_enums) Makefile
+       (cd $(srcdir) && glib-mkenums \
+                       --fhead "#ifndef __HILDON_LIBS_ENUM_TYPES_H__\n#define __HILDON_LIBS_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+                       --fprod "/* enumerations from \"@filename@\" */\n" \
+                       --vhead "GType @enum_name@_get_type (void);\n#define HILDON_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"        \
+                       --ftail "G_END_DECLS\n\n#endif /* __HILDON_LIBS_ENUM_TYPES_H__ */" \
+               $(headers_to_scan_for_enums)) > $@
+
+#FIXME: This would be shorter if there was a hildon-libs.h file:
+hildon-libs-enum-types.c: @REBUILD@ $(headers_to_scan_for_enums) Makefile
+       (cd $(srcdir) && glib-mkenums \
+                       --fhead "#include <hildon-widgets/hildon-app.h>\n" \
+                       --fhead "#include <hildon-widgets/hildon-input-mode-hint.h>\n" \
+                       --fhead "#include <hildon-widgets/hildon-caption.h>\n" \
+                       --fhead "#include <hildon-widgets/hildon-date-editor.h>\n" \
+                       --fhead "#include <hildon-widgets/hildon-number-editor.h>\n" \
+                       --fhead "#include <hildon-widgets/hildon-telephone-editor.h>\n" \
+                       --fhead "#include <hildon-widgets/hildon-note.h>\n" \
+                       --fhead "#include <hildon-widgets/hildon-grid.h>\n" \
+                       --fhead '#include "hildon-libs-enum-types.h"\n' \
+                       --fhead "#include <glib-object.h>" \
+                       --fprod "\n/* enumerations from \"@filename@\" */" \
+                       --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"     \
+                       --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+                       --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
+               $(headers_to_scan_for_enums)) > $@