Added gedcom-parse as a submodule. Added automatic copying of m4 file in autogen.
[familia.git] / Makefile.am
1 AUTOMAKE_OPTIONS = gnu subdir-objects
2 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
3 SUBDIRS = po
4
5 EXTRA_DIST = \
6         config.rpath \
7         data/gui.glade \
8         src/gettext.h \
9         doc/CodingStyle
10
11 MAINTAINERCLEANFILES = \
12         aclocal.m4 \
13         config.h.in \
14         config.log \
15         config.status \
16         configure \
17         configure.files \
18         stamp-h.in \
19         depcomp \
20         install-sh \
21         missing
22
23
24 CLEANFILES = \
25         %.o \
26         %.bak \
27         %~ \
28         doxyfile.stamp
29
30 bin_PROGRAMS = bin/familia
31 noinst_HEADERS = src/i18n.h
32 dist_noinst_SCRIPTS = autogen.sh
33
34 bin_familia_SOURCES = \
35         src/dialogs/about_dialog.c \
36         src/dialogs/openfile_dialog.c \
37         src/viewport/drawing_area.c \
38         src/storage/storage.c \
39         src/storage/individual.c \
40         src/storage/family.c \
41         src/gedcom/familia_gedcom.c \
42         src/memory_stack.c \
43         src/gui.c \
44         src/main.c \
45         src/debug.c \
46         src/commandline.c
47
48 bin_familia_CPPFLAGS = \
49         $(bin_familia_CFLAGS) \
50         -Wall -pedantic -Wextra \
51         @GEDCOM_CFLAGS@ \
52         -I$(top_srcdir)/src \
53         -Wl,--export-dynamic
54
55 bin_familia_LDADD = \
56         $(bin_familia_LIBS) \
57         @GEDCOM_LIBS@ \
58         -L/usr/lib \
59         -lzip
60
61 bin_familia_LDFLAGS = $(LTLIBINTL)
62
63 localedir = $(datadir)/locale
64
65 DEFS = -DLOCALEDIR=\"$(localedir)\" \
66          -DDATADIR=\"$(pkgdatadir)\" \
67         @DEFS@
68
69 all-local: doxyfile.stamp
70         test -d bin/data || mkdir bin/data
71         cp data/gui.glade bin/data/
72         cp -r data/pixmaps bin/data/
73
74 # Documentation
75
76 if HAVE_DOXYGEN
77
78 directory = $(top_srcdir)/doc/man/man3
79
80 doxyfile.stamp:
81         $(DOXYGEN) Doxyfile
82         echo Timestamp > doxyfile.stamp
83
84 #all-local: doxyfile.stamp
85
86 clean-local:
87         rm -rf $(top_srcdir)/doc/man
88
89 endif
90
91 # Localization
92
93 check-gettext:
94         @if test x$(USE_NLS) != "xyes" ; then echo "Missing gettext. Rerun configure and check for" \
95         "'checking whether to use NLS... yes'!" ; exit 1 ; fi
96
97 update-po: check-gettext
98         @find $(srcdir)/src $(srcdir)/data -name '*[glade|c|h]' -type f -print | sort > $(srcdir)/po/POTFILES.in.2 ; \
99         if diff $(srcdir)/po/POTFILES.in $(srcdir)/po/POTFILES.in.2 >/dev/null 2>&1 ; then \
100                 rm -f $(srcdir)/po/POTFILES.in.2 ; \
101         else \
102                 mv $(srcdir)/po/POTFILES.in.2 $(srcdir)/po/POTFILES.in ; \
103         fi
104         cd po && $(MAKE) $(AM_MAKEFLAGS) update-po
105
106 update-gmo: check-gettext
107         cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo
108
109 force-update-gmo: check-gettext
110         touch po/*.po
111         cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo
112
113 force-update-gmo-%: check-gettext
114         @language=`echo $@ | sed s/force-update-gmo-//` ; \
115         if test ! -f po/$$language.po ; then echo "file po/$$language.po does not exist" ; exit 1 ; fi ; \
116         touch po/$$language.po ; \
117         cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo
118
119 .PHONY: check-gettext update-po update-gmo force-update-gmo