]> git.draconx.ca Git - gob-dx.git/blob - Makefile.am
Build with libtool.
[gob-dx.git] / Makefile.am
1 # Copyright © 2019 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
10
11 AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src \
12               -I$(builddir) -I$(srcdir) -DPKGDATADIR=\"$(pkgdatadir)\"
13 AM_CFLAGS = $(GLIB_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
25 CLEANFILES =
26 DISTCLEANFILES =
27 MAINTAINERCLEANFILES = src/treefuncs.c src/treefuncs.h src/treefuncs.stamp
28
29 EXTRA_PROGRAMS = parser-rdeps
30 parser_rdeps_SOURCES = src/main.c src/lexer.l
31 $(parser_rdeps_OBJECTS): src/parse.h
32
33 noinst_HEADERS = src/main.h src/treefuncs.h src/out.h src/util.h src/checks.h
34
35 gob2_SOURCES = src/main.c src/main.h src/treefuncs.c src/out.c src/util.c \
36                src/checks.c src/parse.y src/lexer.l
37 gob2_LDADD = $(GLIB_LIBS) @LEXLIB@
38 $(gob2_OBJECTS): src/treefuncs.h
39
40 man_MANS = doc/gob2.1
41 EXTRA_DIST += doc/makehtml.pl
42
43 PERL_ERROR = @:; { \
44           printf '%s: ERROR: perl was not available at configure time.\n' "$@"; \
45           printf '%s: If perl is installed but was not detected by configure,\n' "$@"; \
46           printf '%s: consider setting PERL and re-running configure.\n' "$@"; \
47         } 1>&2; false
48
49 src/treefuncs.stamp: src/generate_treefuncs.pl src/treefuncs.def
50 if !HAVE_PERL
51         $(PERL_ERROR)
52 endif
53         $(AM_V_at) $(MKDIR_P) $(@D)
54         $(AM_V_GEN) (cd $(@D) && \
55           $(PERL) $(abs_srcdir)/src/generate_treefuncs.pl \
56                   $(abs_srcdir)/src/treefuncs.def; )
57         $(AM_V_at) touch $@
58
59 .stamp.c:
60         @test -f $@ || { rm -f $<; $(MAKE) $(AM_MAKEFLAGS) $<; }
61 .stamp.h:
62         @test -f $@ || { rm -f $<; $(MAKE) $(AM_MAKEFLAGS) $<; }
63
64 html-local: doc/gob2.html
65 doc/gob2.html: doc/gob2.1
66 if !HAVE_PERL
67         $(PERL_ERROR)
68 endif
69         $(AM_V_GEN) $(PERL) $(top_srcdir)/doc/makehtml.pl <doc/gob2.1 >$@.tmp
70         $(AM_V_at) mv -f $@.tmp $@
71 CLEANFILES += doc/gob2.html
72
73 install-html-local: install-gob2-html
74 install-gob2-html: doc/gob2.html
75         $(MKDIR_P) "$(DESTDIR)$(docdir)"
76         $(INSTALL_DATA) doc/gob2.html "$(DESTDIR)$(docdir)/gob2.html"
77 .PHONY: install-gob2-html
78
79 uninstall-local: uninstall-gob2-html
80 uninstall-gob2-html:
81         test ! -d "$(DESTDIR)$(docdir)" || \
82           cd "$(DESTDIR)$(docdir)" && rm -f gob2.html
83 .PHONY: uninstall-gob2-html
84
85 m4dir = $(datadir)/aclocal
86 dist_m4_DATA = gob2.m4