docs: Fix a minor syntax error in a documentation comment
[glib.git] / glib / Makefile.am
blobd969e1035788240fa05b663d805b9ff0fee2c793
1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/glib.mk
4 bin_PROGRAMS =
7 # Generate glibconfig.h
9 # The timestamp of the stamp file is used to indicate if glibconfig.h is
10 # up to date with respect to config.status.  In the usual case, changes
11 # to config.status will not result in changes to glibconfig.h so we
12 # avoid touching its timestamp (in order not to rebuild the whole tree).
14 DISTCLEANFILES += glibconfig-stamp glibconfig.h
15 BUILT_SOURCES += glibconfig-stamp
16 configexecincludedir = $(libdir)/glib-2.0/include
17 nodist_configexecinclude_HEADERS = glibconfig.h
18 glibconfig-stamp: ../config.status
19         $(AM_V_GEN) cd $(top_builddir) && \
20           $(SHELL) ./config.status glib/glibconfig.h
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         glib.rc.in              \
59         gen-unicode-tables.pl   \
60         gregex.c                \
61         gregex.h                \
62         win_iconv.c             \
63         libglib-gdb.py.in       \
64         docs.c                  \
65         gconstructor.h          \
66         $(MIRRORING_TAB_SOURCE)
68 CLEANFILES += libglib-gdb.py
70 # These may be in the builddir too
71 BUILT_EXTRA_DIST +=             \
72         glib.rc
74 lib_LTLIBRARIES = libglib-2.0.la
76 if OS_WIN32_AND_DLL_COMPILATION
77 if MS_LIB_AVAILABLE
78 noinst_DATA += glib-2.0.lib
80 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
81 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
82 endif
83 endif
85 install-ms-lib:
86         $(install_ms_lib_cmd)
88 uninstall-ms-lib:
89         $(uninstall_ms_lib_cmd)
91 deprecated_sources = \
92         deprecated/gallocator.c         \
93         deprecated/gcache.c             \
94         deprecated/gcompletion.c        \
95         deprecated/grel.c               \
96         deprecated/gthread-deprecated.c
98 libglib_2_0_la_SOURCES =        \
99         $(deprecated_sources)   \
100         glib_probes.d           \
101         garcbox.c               \
102         garray.c                \
103         gasyncqueue.c           \
104         gasyncqueueprivate.h    \
105         gatomic.c               \
106         gbacktrace.c            \
107         gbase64.c               \
108         gbitlock.c              \
109         gbookmarkfile.c         \
110         gbsearcharray.h         \
111         gbytes.c                \
112         gbytes.h                \
113         gcharset.c              \
114         gcharsetprivate.h       \
115         gchecksum.c             \
116         gconvert.c              \
117         gdataset.c              \
118         gdatasetprivate.h       \
119         gdate.c                 \
120         gdatetime.c             \
121         gdir.c                  \
122         genviron.c              \
123         gerror.c                \
124         gfileutils.c            \
125         ggettext.c              \
126         ghash.c                 \
127         ghmac.c                 \
128         ghook.c                 \
129         ghostutils.c            \
130         giochannel.c            \
131         gkeyfile.c              \
132         glibintl.h              \
133         glib_trace.h            \
134         glib-init.h             \
135         glib-init.c             \
136         glib-private.h          \
137         glib-private.c          \
138         glist.c                 \
139         gmain-internal.h        \
140         gmain.c                 \
141         gmappedfile.c           \
142         gmarkup.c               \
143         gmem.c                  \
144         gmessages.c             \
145         gmirroringtable.h       \
146         gnode.c                 \
147         goption.c               \
148         gpattern.c              \
149         gpoll.c                 \
150         gprimes.c               \
151         gqsort.c                \
152         gquark.c                \
153         gqueue.c                \
154         grand.c                 \
155         grcbox.c                \
156         grcboxprivate.h         \
157         grefcount.c             \
158         grefstring.c            \
159         gregex.c                \
160         gscanner.c              \
161         gscripttable.h          \
162         gsequence.c             \
163         gshell.c                \
164         gslice.c                \
165         gslist.c                \
166         gstdio.c                \
167         gstdioprivate.h         \
168         gstrfuncs.c             \
169         gstring.c               \
170         gstringchunk.c          \
171         gtestutils.c            \
172         gthread.c               \
173         gthreadprivate.h        \
174         gthreadpool.c           \
175         gtimer.c                \
176         gtimezone.c             \
177         gtranslit.c             \
178         gtranslit-data.h        \
179         gtrashstack.c           \
180         gtree.c                 \
181         guniprop.c              \
182         gutf8.c                 \
183         gunibreak.h             \
184         gunibreak.c             \
185         gunichartables.h        \
186         gunicollate.c           \
187         gunicomp.h              \
188         gunidecomp.h            \
189         gunidecomp.c            \
190         gunicodeprivate.h       \
191         gurifuncs.c             \
192         gutils.c                \
193         guuid.c                 \
194         gvalgrind.h             \
195         gvariant.h              \
196         gvariant.c              \
197         gvariant-core.h         \
198         gvariant-core.c         \
199         gvariant-internal.h     \
200         gvariant-parser.c       \
201         gvariant-serialiser.h   \
202         gvariant-serialiser.c   \
203         gvarianttypeinfo.h      \
204         gvarianttypeinfo.c      \
205         gvarianttype.c          \
206         gversion.c              \
207         gwakeup.h               \
208         gwakeup.c               \
209         gprintf.c               \
210         gprintfint.h            \
211         valgrind.h
213 if OS_UNIX
214 libglib_2_0_la_SOURCES += glib-unix.c
215 endif
217 if THREADS_WIN32
218 libglib_2_0_la_SOURCES += gthread-win32.c
219 else
220 if THREADS_POSIX
221 libglib_2_0_la_SOURCES += gthread-posix.c
222 endif
223 endif
225 EXTRA_libglib_2_0_la_SOURCES = \
226         giounix.c       \
227         giowin32.c      \
228         gspawn.c        \
229         gspawn-private.h \
230         gspawn-win32.c  \
231         gwin32.c
233 glibincludedir=$(includedir)/glib-2.0
234 glibinclude_HEADERS =   \
235         glib-unix.h     \
236         glib-object.h   \
237         glib.h
239 deprecatedincludedir=$(includedir)/glib-2.0/glib/deprecated
240 deprecatedinclude_HEADERS = \
241         deprecated/gallocator.h         \
242         deprecated/gcache.h             \
243         deprecated/gcompletion.h        \
244         deprecated/gmain.h              \
245         deprecated/grel.h               \
246         deprecated/gthread.h
248 glibsubincludedir=$(includedir)/glib-2.0/glib
249 glibsubinclude_HEADERS = \
250         glib-autocleanups.h     \
251         galloca.h       \
252         garray.h        \
253         gasyncqueue.h   \
254         gatomic.h       \
255         gbacktrace.h    \
256         gbase64.h       \
257         gbitlock.h      \
258         gbookmarkfile.h \
259         gbytes.h        \
260         gcharset.h      \
261         gchecksum.h     \
262         gconvert.h      \
263         gdataset.h      \
264         gdate.h         \
265         gdatetime.h     \
266         gdir.h          \
267         genviron.h      \
268         gerror.h        \
269         gfileutils.h    \
270         ggettext.h      \
271         ghash.h         \
272         ghmac.h         \
273         ghook.h         \
274         ghostutils.h    \
275         gi18n.h         \
276         gi18n-lib.h     \
277         giochannel.h    \
278         gkeyfile.h      \
279         glist.h         \
280         gmacros.h       \
281         gmain.h         \
282         gmappedfile.h   \
283         gmarkup.h       \
284         gmem.h          \
285         gmessages.h     \
286         gnode.h         \
287         goption.h       \
288         gpattern.h      \
289         gpoll.h         \
290         gprimes.h       \
291         gqsort.h        \
292         gquark.h        \
293         gqueue.h        \
294         grand.h         \
295         grcbox.h        \
296         grefcount.h     \
297         grefstring.h    \
298         gregex.h        \
299         gscanner.h      \
300         gsequence.h     \
301         gshell.h        \
302         gslice.h        \
303         gslist.h        \
304         gspawn.h        \
305         gstdio.h        \
306         gstrfuncs.h     \
307         gtestutils.h    \
308         gstring.h       \
309         gstringchunk.h  \
310         gthread.h       \
311         gthreadpool.h   \
312         gtimer.h        \
313         gtimezone.h     \
314         gtrashstack.h   \
315         gtree.h         \
316         gtypes.h        \
317         gunicode.h      \
318         gurifuncs.h     \
319         gutils.h        \
320         guuid.h         \
321         gvarianttype.h  \
322         gvariant.h      \
323         gversion.h      \
324         gversionmacros.h \
325         gwin32.h        \
326         gprintf.h
328 # This is read by gobject-introspection/misc/ and gtk-doc
329 glib-public-headers.txt: Makefile
330         $(AM_V_GEN) echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
332 CLEANFILES += glib-public-headers.txt
334 all-local: glib-public-headers.txt
336 install-data-local: install-ms-lib
337         @if test -f $(glibincludedir)/glist.h ; then                                    \
338           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
339           echo "*** contents of this directory and type 'make install' again." ;        \
340           false ;                                                                       \
341         fi
343 uninstall-local: uninstall-ms-lib uninstall-gdb
345 if PLATFORM_WIN32
346 no_undefined = -no-undefined
347 endif
349 if OS_WIN32_AND_DLL_COMPILATION
350 glib_win32_res = glib-win32-res.o
351 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
352 endif
354 if USE_SYSTEM_PCRE
355 pcre_lib = $(PCRE_LIBS)
356 pcre_inc = $(PCRE_CFLAGS)
357 else
358 pcre_lib = pcre/libpcre.la
359 pcre_inc =
360 endif
362 libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) $(LIBSYSTEMD_CFLAGS)
363 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)
364 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
366 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
367          $(glib_win32_res_ldflag) \
368         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
369         -export-dynamic $(no_undefined)
371 if ENABLE_DTRACE
372 glib_probes.h: glib_probes.d
373         $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
374         @$(SED) \
375                 -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \
376                 -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \
377                 < $@.tmp > $@ && rm -f $@.tmp
379 glib_probes.lo: glib_probes.d
380         $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@
382 BUILT_SOURCES += glib_probes.h glib_probes.lo
383 CLEANFILES += glib_probes.h glib_probes.h.tmp
384 libglib_2_0_la_LIBADD += glib_probes.lo
385 endif
387 tapsetdir   = @ABS_TAPSET_DIR@
388 EXTRA_DIST += glib.stp.in
390 if ENABLE_SYSTEMTAP
391 tapset_DATA = libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@.stp
392 CLEANFILES += $(tapset_DATA)
394 $(tapset_DATA): glib.stp.in Makefile
395         $(AM_V_GEN)$(SED) \
396                 -e 's|[@]ABS_GLIB_RUNTIME_LIBDIR[@]|$(ABS_GLIB_RUNTIME_LIBDIR)|g' \
397                 -e 's|[@]LT_CURRENT[@]|$(LT_CURRENT)|g' \
398                 -e 's|[@]LT_REVISION[@]|$(LT_REVISION)|g' \
399                 $< > $@
400 endif
402 gspawn-win32-helper-console.c:
403         echo '#define HELPER_CONSOLE' >$@
404         echo '#include "gspawn-win32-helper.c"' >>$@
406 gspawn-win64-helper.c:
407         echo '#include "gspawn-win32-helper.c"' >$@
409 gspawn-win64-helper-console.c:
410         echo '#define HELPER_CONSOLE' >$@
411         echo '#include "gspawn-win32-helper.c"' >>$@
413 nodist_win_helper_sources = \
414         gspawn-win32-helper-console.c \
415         gspawn-win64-helper.c \
416         gspawn-win64-helper-console.c \
417         $(NULL)
419 BUILT_SOURCES += $(nodist_win_helper_sources)
420 CLEANFILES += $(nodist_win_helper_sources)
422 if OS_WIN32
423 if OS_WIN32_X64
424 bin_PROGRAMS += gspawn-win64-helper gspawn-win64-helper-console
425 nodist_gspawn_win64_helper_SOURCES = gspawn-win64-helper.c
426 nodist_gspawn_win64_helper_console_SOURCES = gspawn-win64-helper-console.c
427 gspawn_win64_helper_LDADD = libglib-2.0.la
428 gspawn_win64_helper_LDFLAGS = -mwindows
429 gspawn_win64_helper_console_LDADD = libglib-2.0.la
430 else
431 bin_PROGRAMS += gspawn-win32-helper gspawn-win32-helper-console
432 nodist_gspawn_win32_helper_console_SOURCES = gspawn-win32-helper-console.c
433 gspawn_win32_helper_LDADD = libglib-2.0.la
434 gspawn_win32_helper_LDFLAGS = -mwindows
435 gspawn_win32_helper_console_LDADD = libglib-2.0.la
436 endif
437 endif
439 glib-win32-res.o: glib.rc
440         $(WINDRES) glib.rc $@
442 if OS_UNIX
444 bin_PROGRAMS += gtester
445 gtester_SOURCES  = gtester.c
446 gtester_LDADD    = libglib-2.0.la 
448 auto_config_binscripts = gtester-report
449 bin_SCRIPTS = ${auto_config_binscripts}
450 EXTRA_DIST += ${auto_config_binscripts}
452 CONFIGVARS = \
453         "bindir"        : "${bindir}",          \
454         "glib-version"  : "${GLIB_VERSION}"
456 install-exec-hook:
457         for sf in ${auto_config_binscripts} ; do \
458           mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
459           && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
460             -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@|  ${CONFIGVARS}|' \
461             -e '1,1s|#! /usr/bin/env python.*|#!${PYTHON}|' \
462           || exit $$? ; \
463           chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
464           rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
465         done
467 endif
469 glib.def: libglib-2.0.la
470         $(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
472 glib-2.0.lib: libglib-2.0.la glib.def
473         $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/glib.def -out:$@
475 dist-hook: $(BUILT_EXTRA_DIST)
476         files='$(BUILT_EXTRA_DIST)'; \
477         for f in $$files; do \
478           if test -f $$f; then d=.; else d=$(srcdir); fi; \
479           cp $$d/$$f $(distdir) || exit 1; done
481 # install gdb scripts
482 gdbdir = $(datadir)/glib-2.0/gdb
483 dist_gdb_DATA = glib_gdb.py
485 all-local: libglib-gdb.py
486 libglib-gdb.py: libglib-gdb.py.in
487         $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
489 if HAVE_GLIB_RUNTIME_LIBDIR
490 ABS_GLIB_RUNTIME_LIBDIR = $(realpath $(libdir)/$(GLIB_RUNTIME_LIBDIR))
491 else
492 ABS_GLIB_RUNTIME_LIBDIR = $(libdir)
493 endif
495 install-data-hook: libglib-gdb.py
496         mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
497         $(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
498 if HAVE_GLIB_RUNTIME_LIBDIR
499         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
500         mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
501         mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
502         rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
503         ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so
504 endif
506 uninstall-gdb:
507         -rm -r $(DESTDIR)$(datadir)/gdb