]> git.draconx.ca Git - gob-dx.git/blob - Makefile.am
Replace GOB2_CHECK with the version from dxcommon.
[gob-dx.git] / Makefile.am
1 # Copyright © 2019-2020 Nick Bowler
2 #
3 # Based on original work Copyright © 1999-2013 Jiri (George) Lebl.
4 #
5 # License GPLv2+: GNU General Public License version 2 or any later version.
6 # This is free software: you are free to change and redistribute it.
7 # There is NO WARRANTY, to the extent permitted by law.
8
9 ACLOCAL_AMFLAGS = -I m4 -I common/m4
10
11 AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src \
12               -I$(builddir) -I$(srcdir) -DPKGDATADIR=\"$(pkgdatadir)\"
13 AM_CFLAGS = $(LIBGLIB_CFLAGS)
14 AM_YFLAGS = -d -t
15
16 bin_PROGRAMS = gob2
17
18 EXTRA_DIST = COPYING.generated-code examples/GNOME_Foo_SomeInterface.idl \
19              examples/README examples/foo-some-interface.gob \
20              examples/gtk-button-count.gob examples/my-glade-main.c \
21              examples/my-glade.glade examples/my-glade.gob gob2.spec \
22              src/treefuncs.c src/treefuncs.h src/treefuncs.stamp \
23              src/treefuncs.def src/generate_treefuncs.pl \
24              t/test.gob t/str.gob
25
26 CLEANFILES =
27 DISTCLEANFILES =
28 MAINTAINERCLEANFILES = src/treefuncs.c src/treefuncs.h src/treefuncs.stamp
29
30 EXTRA_PROGRAMS = parser-rdeps
31 parser_rdeps_SOURCES = src/main.c src/lexer.l
32 $(parser_rdeps_OBJECTS): src/parse.h
33
34 noinst_HEADERS = src/main.h src/treefuncs.h src/out.h src/util.h src/checks.h
35
36 gob2_SOURCES = src/main.c src/main.h src/treefuncs.c src/out.c src/util.c \
37                src/checks.c src/parse.y src/lexer.l
38 gob2_LDADD = $(LIBGLIB_LIBS) @LEXLIB@
39 $(gob2_OBJECTS): src/treefuncs.h
40
41 man_MANS = doc/gob2.1
42 EXTRA_DIST += doc/makehtml.pl
43
44 PERL_ERROR = @:; { \
45           printf '%s: ERROR: perl was not available at configure time.\n' "$@"; \
46           printf '%s: If perl is installed but was not detected by configure,\n' "$@"; \
47           printf '%s: consider setting PERL and re-running configure.\n' "$@"; \
48         } 1>&2; false
49
50 src/treefuncs.stamp: src/generate_treefuncs.pl src/treefuncs.def
51 if !HAVE_PERL
52         $(PERL_ERROR)
53 endif
54         $(AM_V_at) $(MKDIR_P) $(@D)
55         $(AM_V_GEN) (cd $(@D) && \
56           $(PERL) $(abs_srcdir)/src/generate_treefuncs.pl \
57                   $(abs_srcdir)/src/treefuncs.def; )
58         $(AM_V_at) touch $@
59
60 .stamp.c:
61         @test -f $@ || { rm -f $<; $(MAKE) $(AM_MAKEFLAGS) $<; }
62 .stamp.h:
63         @test -f $@ || { rm -f $<; $(MAKE) $(AM_MAKEFLAGS) $<; }
64
65 html-local: doc/gob2.html
66 doc/gob2.html: doc/gob2.1
67 if !HAVE_PERL
68         $(PERL_ERROR)
69 endif
70         $(AM_V_GEN) $(PERL) $(top_srcdir)/doc/makehtml.pl <doc/gob2.1 >$@.tmp
71         $(AM_V_at) mv -f $@.tmp $@
72 CLEANFILES += doc/gob2.html
73
74 install-html-local: install-gob2-html
75 install-gob2-html: doc/gob2.html
76         $(MKDIR_P) "$(DESTDIR)$(docdir)"
77         $(INSTALL_DATA) doc/gob2.html "$(DESTDIR)$(docdir)/gob2.html"
78 .PHONY: install-gob2-html
79
80 uninstall-local: uninstall-gob2-html
81 uninstall-gob2-html:
82         test ! -d "$(DESTDIR)$(docdir)" || \
83           cd "$(DESTDIR)$(docdir)" && rm -f gob2.html
84 .PHONY: uninstall-gob2-html
85
86 m4dir = $(datadir)/aclocal
87 m4_DATA = gob2.m4
88
89 gob2.m4: $(top_srcdir)/common/m4/gob2.m4
90         $(AM_V_GEN) $(SED) 's/DX_PROG_GOB2/GOB2_CHECK/g' \
91           $(top_srcdir)/common/m4/gob2.m4 >$@.tmp
92         $(AM_V_at) mv -f $@.tmp $@
93 DISTCLEANFILES += gob2.m4
94 EXTRA_DIST += common/m4/gob2.m4
95
96 include $(top_srcdir)/common/snippet/autotest.mk