Add some more cases to the app-id unit tests
[glib.git] / glib / Makefile.am
blobd7558533b2a703ad8ffa109acf09ba61a5bf036a
1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/glib.mk
5 # Generate glibconfig.h
7 # The timestamp of the stamp file is used to indicate if glibconfig.h is
8 # up to date with respect to config.status.  In the usual case, changes
9 # to config.status will not result in changes to glibconfig.h so we
10 # avoid touching its timestamp (in order not to rebuild the whole tree).
12 DISTCLEANFILES += glibconfig-stamp glibconfig.h glibconfig.h.win32
13 BUILT_SOURCES += glibconfig-stamp
14 configexecincludedir = $(libdir)/glib-2.0/include
15 nodist_configexecinclude_HEADERS = glibconfig.h
16 glibconfig-stamp: ../config.status
17         $(AM_V_GEN) cd $(top_builddir) && \
18           $(SHELL) ./config.status glib/glibconfig.h
19         $(AM_V_GEN) cd $(top_builddir) && \
20           $(SHELL) ./config.status glib/glibconfig.h.win32
21         @touch glibconfig-stamp
25 if HAVE_GOOD_PRINTF
26 else
27 PRINTF_SUBDIR = gnulib
28 printf_la = gnulib/libgnulib.la
29 endif 
31 if USE_SYSTEM_PCRE
32 else
33 MAYBE_PCRE = pcre 
34 endif
36 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
37 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
39 AM_CPPFLAGS =                           \
40         $(glib_INCLUDES)                \
41         $(pcre_inc)                     \
42         -DG_LOG_DOMAIN=\"GLib\"         \
43         $(GLIB_DEBUG_FLAGS)             \
44         -DGLIB_COMPILATION              \
45         -DPCRE_STATIC
47 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
49 MIRRORING_TAB_SOURCE =                          \
50         glib-mirroring-tab/Makefile             \
51         glib-mirroring-tab/gen-mirroring-tab.c  \
52         glib-mirroring-tab/packtab.h            \
53         glib-mirroring-tab/packtab.c
55 # The compilation of GRegex can be disabled, but the source files must
56 # be distributed.
57 EXTRA_DIST +=                   \
58         makefile.msc.in         \
59         glib.rc.in              \
60         gen-unicode-tables.pl   \
61         glibconfig.h.win32.in   \
62         gregex.c                \
63         gregex.h                \
64         win_iconv.c             \
65         libglib-gdb.py.in       \
66         docs.c                  \
67         gconstructor.h          \
68         $(MIRRORING_TAB_SOURCE)
70 CLEANFILES += libglib-gdb.py
72 # These may be in the builddir too
73 BUILT_EXTRA_DIST +=             \
74         makefile.msc            \
75         glibconfig.h.win32      \
76         glib.rc
78 lib_LTLIBRARIES = libglib-2.0.la
80 if OS_WIN32_AND_DLL_COMPILATION
81 if MS_LIB_AVAILABLE
82 noinst_DATA += glib-2.0.lib
84 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
85 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
86 endif
87 endif
89 install-ms-lib:
90         $(install_ms_lib_cmd)
92 uninstall-ms-lib:
93         $(uninstall_ms_lib_cmd)
95 deprecated_sources = \
96         deprecated/gallocator.c         \
97         deprecated/gcache.c             \
98         deprecated/gcompletion.c        \
99         deprecated/grel.c               \
100         deprecated/gthread-deprecated.c
102 libglib_2_0_la_SOURCES =        \
103         $(deprecated_sources)   \
104         glib_probes.d           \
105         garray.c                \
106         gasyncqueue.c           \
107         gasyncqueueprivate.h    \
108         gatomic.c               \
109         gbacktrace.c            \
110         gbase64.c               \
111         gbitlock.c              \
112         gbookmarkfile.c         \
113         gbsearcharray.h         \
114         gbytes.c                \
115         gbytes.h                \
116         gcharset.c              \
117         gcharsetprivate.h       \
118         gchecksum.c             \
119         gconvert.c              \
120         gdataset.c              \
121         gdatasetprivate.h       \
122         gdate.c                 \
123         gdatetime.c             \
124         gdir.c                  \
125         genviron.c              \
126         gerror.c                \
127         gfileutils.c            \
128         ggettext.c              \
129         ghash.c                 \
130         ghmac.c                 \
131         ghook.c                 \
132         ghostutils.c            \
133         giochannel.c            \
134         gkeyfile.c              \
135         glibintl.h              \
136         glib_trace.h            \
137         glib-init.h             \
138         glib-init.c             \
139         glib-private.h          \
140         glib-private.c          \
141         glist.c                 \
142         gmain-internal.h        \
143         gmain.c                 \
144         gmappedfile.c           \
145         gmarkup.c               \
146         gmem.c                  \
147         gmessages.c             \
148         gmirroringtable.h       \
149         gnode.c                 \
150         goption.c               \
151         gpattern.c              \
152         gpoll.c                 \
153         gprimes.c               \
154         gqsort.c                \
155         gquark.c                \
156         gqueue.c                \
157         grand.c                 \
158         gregex.c                \
159         gscanner.c              \
160         gscripttable.h          \
161         gsequence.c             \
162         gshell.c                \
163         gslice.c                \
164         gslist.c                \
165         gstdio.c                \
166         gstrfuncs.c             \
167         gstring.c               \
168         gstringchunk.c          \
169         gtestutils.c            \
170         gthread.c               \
171         gthreadprivate.h        \
172         gthreadpool.c           \
173         gtimer.c                \
174         gtimezone.c             \
175         gtranslit.c             \
176         gtranslit-data.h        \
177         gtrashstack.c           \
178         gtree.c                 \
179         guniprop.c              \
180         gutf8.c                 \
181         gunibreak.h             \
182         gunibreak.c             \
183         gunichartables.h        \
184         gunicollate.c           \
185         gunicomp.h              \
186         gunidecomp.h            \
187         gunidecomp.c            \
188         gunicodeprivate.h       \
189         gurifuncs.c             \
190         gutils.c                \
191         guuid.c                 \
192         gvariant.h              \
193         gvariant.c              \
194         gvariant-core.h         \
195         gvariant-core.c         \
196         gvariant-internal.h     \
197         gvariant-parser.c       \
198         gvariant-serialiser.h   \
199         gvariant-serialiser.c   \
200         gvarianttypeinfo.h      \
201         gvarianttypeinfo.c      \
202         gvarianttype.c          \
203         gversion.c              \
204         gwakeup.h               \
205         gwakeup.c               \
206         gprintf.c               \
207         gprintfint.h            \
208         valgrind.h
210 if OS_UNIX
211 libglib_2_0_la_SOURCES += glib-unix.c
212 endif
214 if THREADS_WIN32
215 libglib_2_0_la_SOURCES += gthread-win32.c
216 else
217 if THREADS_POSIX
218 libglib_2_0_la_SOURCES += gthread-posix.c
219 endif
220 endif
222 EXTRA_libglib_2_0_la_SOURCES = \
223         giounix.c       \
224         giowin32.c      \
225         gspawn.c        \
226         gspawn-win32.c  \
227         gwin32.c
229 glibincludedir=$(includedir)/glib-2.0
230 glibinclude_HEADERS =   \
231         glib-unix.h     \
232         glib-object.h   \
233         glib.h
235 deprecatedincludedir=$(includedir)/glib-2.0/glib/deprecated
236 deprecatedinclude_HEADERS = \
237         deprecated/gallocator.h         \
238         deprecated/gcache.h             \
239         deprecated/gcompletion.h        \
240         deprecated/gmain.h              \
241         deprecated/grel.h               \
242         deprecated/gthread.h
244 glibsubincludedir=$(includedir)/glib-2.0/glib
245 glibsubinclude_HEADERS = \
246         glib-autocleanups.h     \
247         galloca.h       \
248         garray.h        \
249         gasyncqueue.h   \
250         gatomic.h       \
251         gbacktrace.h    \
252         gbase64.h       \
253         gbitlock.h      \
254         gbookmarkfile.h \
255         gbytes.h        \
256         gcharset.h      \
257         gchecksum.h     \
258         gconvert.h      \
259         gdataset.h      \
260         gdate.h         \
261         gdatetime.h     \
262         gdir.h          \
263         genviron.h      \
264         gerror.h        \
265         gfileutils.h    \
266         ggettext.h      \
267         ghash.h         \
268         ghmac.h         \
269         ghook.h         \
270         ghostutils.h    \
271         gi18n.h         \
272         gi18n-lib.h     \
273         giochannel.h    \
274         gkeyfile.h      \
275         glist.h         \
276         gmacros.h       \
277         gmain.h         \
278         gmappedfile.h   \
279         gmarkup.h       \
280         gmem.h          \
281         gmessages.h     \
282         gnode.h         \
283         goption.h       \
284         gpattern.h      \
285         gpoll.h         \
286         gprimes.h       \
287         gqsort.h        \
288         gquark.h        \
289         gqueue.h        \
290         grand.h         \
291         gregex.h        \
292         gscanner.h      \
293         gsequence.h     \
294         gshell.h        \
295         gslice.h        \
296         gslist.h        \
297         gspawn.h        \
298         gstdio.h        \
299         gstrfuncs.h     \
300         gtestutils.h    \
301         gstring.h       \
302         gstringchunk.h  \
303         gthread.h       \
304         gthreadpool.h   \
305         gtimer.h        \
306         gtimezone.h     \
307         gtrashstack.h   \
308         gtree.h         \
309         gtypes.h        \
310         gunicode.h      \
311         gurifuncs.h     \
312         gutils.h        \
313         guuid.h         \
314         gvarianttype.h  \
315         gvariant.h      \
316         gversion.h      \
317         gversionmacros.h \
318         gwin32.h        \
319         gprintf.h
321 # This is read by gobject-introspection/misc/ and gtk-doc
322 glib-public-headers.txt: Makefile
323         $(AM_V_GEN) echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
325 CLEANFILES += glib-public-headers.txt
327 all-local: glib-public-headers.txt
329 install-data-local: install-ms-lib
330         @if test -f $(glibincludedir)/glist.h ; then                                    \
331           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
332           echo "*** contents of this directory and type 'make install' again." ;        \
333           false ;                                                                       \
334         fi
336 uninstall-local: uninstall-ms-lib uninstall-gdb
338 if PLATFORM_WIN32
339 no_undefined = -no-undefined
340 endif
342 if OS_WIN32_AND_DLL_COMPILATION
343 glib_win32_res = glib-win32-res.o
344 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
345 endif
347 if USE_SYSTEM_PCRE
348 pcre_lib = $(PCRE_LIBS)
349 pcre_inc = $(PCRE_CFLAGS)
350 else
351 pcre_lib = pcre/libpcre.la
352 pcre_inc =
353 endif
355 libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) $(LIBSYSTEMD_CFLAGS)
356 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(LIBSYSTEMD_LIBS)
357 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
359 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
360          $(glib_win32_res_ldflag) \
361         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
362         -export-dynamic $(no_undefined)
364 INSTALL_PROGS=
366 if ENABLE_DTRACE
367 glib_probes.h: glib_probes.d
368         $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
369         @$(SED) \
370                 -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \
371                 -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \
372                 < $@.tmp > $@ && rm -f $@.tmp
374 glib_probes.lo: glib_probes.d
375         $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@
377 BUILT_SOURCES += glib_probes.h glib_probes.lo
378 CLEANFILES += glib_probes.h glib_probes.h.tmp
379 libglib_2_0_la_LIBADD += glib_probes.lo
380 endif
382 tapsetdir   = @ABS_TAPSET_DIR@
383 EXTRA_DIST += glib.stp.in
385 if ENABLE_SYSTEMTAP
386 tapset_DATA = libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@.stp
387 CLEANFILES += $(tapset_DATA)
389 $(tapset_DATA): glib.stp.in Makefile
390         $(AM_V_GEN)$(SED) \
391                 -e 's|[@]ABS_GLIB_RUNTIME_LIBDIR[@]|$(ABS_GLIB_RUNTIME_LIBDIR)|g' \
392                 -e 's|[@]LT_CURRENT[@]|$(LT_CURRENT)|g' \
393                 -e 's|[@]LT_REVISION[@]|$(LT_REVISION)|g' \
394                 $< > $@
395 endif
397 gspawn-win32-helper-console.c:
398         echo '#define HELPER_CONSOLE' >$@
399         echo '#include "gspawn-win32-helper.c"' >>$@
401 gspawn-win64-helper.c:
402         echo '#include "gspawn-win32-helper.c"' >$@
404 gspawn-win64-helper-console.c:
405         echo '#define HELPER_CONSOLE' >$@
406         echo '#include "gspawn-win32-helper.c"' >>$@
409 if OS_WIN32
410 if OS_WIN32_X64
411 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
412 gspawn_win64_helper_LDADD = libglib-2.0.la
413 gspawn_win64_helper_LDFLAGS = -mwindows
414 gspawn_win64_helper_console_LDADD = libglib-2.0.la
415 else
416 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
417 gspawn_win32_helper_LDADD = libglib-2.0.la
418 gspawn_win32_helper_LDFLAGS = -mwindows
419 gspawn_win32_helper_console_LDADD = libglib-2.0.la
420 endif
421 endif
423 glib-win32-res.o: glib.rc
424         $(WINDRES) glib.rc $@
426 bin_PROGRAMS     = ${INSTALL_PROGS}
428 if OS_UNIX
430 INSTALL_PROGS   += gtester
431 gtester_SOURCES  = gtester.c
432 gtester_LDADD    = libglib-2.0.la 
434 auto_config_binscripts = gtester-report
435 bin_SCRIPTS = ${auto_config_binscripts}
436 EXTRA_DIST += ${auto_config_binscripts}
438 CONFIGVARS = \
439         "bindir"        : "${bindir}",          \
440         "glib-version"  : "${GLIB_VERSION}"
442 install-exec-hook:
443         for sf in ${auto_config_binscripts} ; do \
444           mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
445           && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
446             -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@|  ${CONFIGVARS}|' \
447             -e '1,1s|#! /usr/bin/env python.*|#!${PYTHON}|' \
448           || exit $$? ; \
449           chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
450           rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
451         done
453 endif
455 glib.def: libglib-2.0.la
456         $(AM_V_GEN) dumpbin.exe -exports .libs/libglib-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > glib.def.tmp && mv glib.def.tmp glib.def
458 glib-2.0.lib: libglib-2.0.la glib.def
459         $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/glib.def -out:$@
461 # ------ MSVC Project File Generation ------
462 MSVCPROJS = glib
464 glib_FILES = $(libglib_2_0_la_SOURCES)
465 glib_EXCLUDES = *-unix.c|gthread-*.c
467 glib_HEADERS_DIR = $(glibsubincludedir)
468 glib_HEADERS_INST = $(deprecatedinclude_HEADERS) $(glibsubinclude_HEADERS)
469 glib_HEADERS_EXCLUDES = dummy
471 include $(top_srcdir)/win32/Makefile.msvcproj
473 dist-hook: $(BUILT_EXTRA_DIST) $(top_builddir)/win32/vs9/glib.vcproj $(top_builddir)/win32/vs9/glib.headers
474         files='$(BUILT_EXTRA_DIST)'; \
475         for f in $$files; do \
476           if test -f $$f; then d=.; else d=$(srcdir); fi; \
477           cp $$d/$$f $(distdir) || exit 1; done
479 # install gdb scripts
480 gdbdir = $(datadir)/glib-2.0/gdb
481 dist_gdb_DATA = glib_gdb.py
483 libglib-gdb.py: libglib-gdb.py.in
484         $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
486 if HAVE_GLIB_RUNTIME_LIBDIR
487 ABS_GLIB_RUNTIME_LIBDIR = $(realpath $(libdir)/$(GLIB_RUNTIME_LIBDIR))
488 else
489 ABS_GLIB_RUNTIME_LIBDIR = $(libdir)
490 endif
492 install-data-hook: libglib-gdb.py
493         mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
494         $(INSTALL) $(builddir)/libglib-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
495 if HAVE_GLIB_RUNTIME_LIBDIR
496         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
497         mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
498         mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
499         rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
500         ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so
501 endif
503 uninstall-gdb:
504         -rm -r $(DESTDIR)$(datadir)/gdb