~ubuntu-branches/ubuntu/edgy/libxfce4util/edgy

« back to all changes in this revision

Viewing changes to libxfce4util/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez
  • Date: 2005-11-27 12:08:34 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051127120834-uq5ptp5p6fyipwkt
Tags: 4.2.3.2-1
* Yves-Alexis Perez
 * New Upstream Release
* Simon Huggins
 * Configure sysconfdir correctly                             closes: #329139
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
libxfce4utilincludedir = $(includedir)/xfce4/libxfce4util
16
16
 
 
17
util_headers = xfce-resource.h
 
18
util_built_headers = util-enum-types.h
 
19
util_built_sources = $(util_built_headers) util-enum-types.c
 
20
 
17
21
libxfce4utilinclude_HEADERS =                                           \
18
22
        debug.h                                                         \
19
23
        i18n.h                                                          \
27
31
        xfce-kiosk.h                                                    \
28
32
        xfce-miscutils.h                                                \
29
33
        xfce-rc.h                                                       \
30
 
        xfce-resource.h
 
34
        $(util_headers)                                                 \
 
35
        $(util_built_headers)
31
36
 
32
37
libxfce4util_la_SOURCES =                                               \
33
38
        debug.h                                                         \
51
56
        xfce-rc-private.h                                               \
52
57
        xfce-rc-simple.c                                                \
53
58
        xfce-resource.c                                                 \
54
 
        xfce-resource.h
 
59
        xfce-resource.h                                                 \
 
60
        $(util_built_headers)
55
61
 
56
62
libxfce4util_la_LDFLAGS =                                       \
57
63
        -export-dynamic                                         \
69
75
        -I$(top_srcdir)                                         \
70
76
        @GOBJECT_CFLAGS@
71
77
 
 
78
##
 
79
## Rules to auto-generate built sources
 
80
##
 
81
## This is a bit tricky with automake, and non-trivial to implement. The 
 
82
## rules below seem to work fine and don't seem to break the build, but  
 
83
## they are only enabled in maintainer mode, so arbitrary users don't get
 
84
## trapped in automake's oddities. Therefore we ship the autogenerated   
 
85
## files as part of the dist tarball.
 
86
##
 
87
if MAINTAINER_MODE
 
88
CLEANFILES =                                                            \
 
89
        xgen-utilc \
 
90
        xgen-utilh
 
91
 
 
92
DISTCLEANFILES =                                                        \
 
93
        stamp-util-enum-types.h \
 
94
        $(util_built_sources)
 
95
 
 
96
BUILT_SOURCES = \
 
97
        $(util_built_sources)
 
98
 
 
99
util-enum-types.h: stamp-util-enum-types.h
 
100
        @true
 
101
stamp-util-enum-types.h: $(util_headers) Makefile
 
102
        ( cd $(srcdir) && glib-mkenums \
 
103
                --fhead "#ifndef __XFCE_UTIL_ENUM_TYPES_H__\n#define __XFCE_UTIL_ENUM_TYPES_H__\n" \
 
104
                --fprod "/* enumerations from \"@filename@\" */\n" \
 
105
                --vhead "GType @enum_name@_get_type (void);\n#define XFCE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
 
106
                --ftail "#endif /* __XFCE_UTIL_ENUM_TYPES_H__ */" \
 
107
                $(util_headers) ) > xgen-utilh \
 
108
        && (cmp -s xgen-utilh util-enum-types.h || cp xgen-utilh util-enum-types.h) \
 
109
        && rm -f xgen-utilh \
 
110
        && echo timestamp > $(@F)
 
111
 
 
112
util-enum-types.c: $(util_headers) Makefile
 
113
        ( cd $(srcdir) && glib-mkenums \
 
114
                --fhead "#include <libxfce4util/libxfce4util.h>\n#include <libxfce4util/util-enum-types.h>\n" \
 
115
                --fprod "\n/* enumerations from \"@filename@\" */" \
 
116
                --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[] = {" \
 
117
                --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
 
118
                --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
 
119
                $(util_headers) ) >> xgen-utilc \
 
120
        && cp xgen-utilc util-enum-types.c \
 
121
        && rm -f xgen-utilc
 
122
 
 
123
endif
 
124
                                
72
125
pkgconfigdir = $(libdir)/pkgconfig
73
126
pkgconfig_DATA = libxfce4util-1.0.pc
74
127