source: Makefile.am @ 25d7236

Last change on this file since 25d7236 was 25d7236, checked in by Anders Kaseorg <andersk@mit.edu>, 9 years ago
Fix perlglue.c dependency on typemap This was broken by commit 5b3763885bc567edfd96acbeca2b7115b6c17e19. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 2.7 KB
Line 
1ACLOCAL_AMFLAGS = -I m4
2
3GIT_DESCRIPTION := $(if $(wildcard .git),$(shell git describe --match='barnowl-*' HEAD 2>/dev/null))
4GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%))
5
6bin_PROGRAMS = barnowl.bin
7if ENABLE_ZCRYPT
8bin_PROGRAMS += zcrypt
9endif
10
11zcrypt_SOURCES = zcrypt.c filterproc.c
12
13check_PROGRAMS = tester.bin
14
15barnowl_bin_SOURCES = $(BASE_SRCS) \
16     owl.h owl_perl.h config.h \
17     owl.c \
18     $(GEN_C) $(GEN_H)
19
20man_MANS = doc/barnowl.1
21doc_DATA = doc/intro.txt doc/advanced.txt
22
23barnowl_bin_LDADD = compat/libcompat.a libfaim/libfaim.a
24
25tester_bin_SOURCES = $(BASE_SRCS) \
26     owl.h owl_perl.h config.h \
27     $(GEN_C) $(GEN_H) \
28     tester.c
29
30tester_bin_LDADD = compat/libcompat.a libfaim/libfaim.a
31
32TESTS=runtests.sh
33
34AM_CPPFLAGS = -I$(top_srcdir)/ \
35           -I$(top_srcdir)/libfaim/ \
36           -DDATADIR='"$(pkgdatadir)"' \
37           -DBINDIR='"$(bindir)"' \
38           $(GIT_FLAGS)
39
40CODELIST_SRCS=message.c mainwin.c popwin.c zephyr.c messagelist.c \
41     commands.c global.c text.c fmtext.c editwin.c \
42     util.c logging.c \
43     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
44     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
45     keypress.c keymap.c keybinding.c cmd.c context.c \
46     aim.c buddy.c buddylist.c style.c errqueue.c \
47     zbuddylist.c popexec.c select.c wcwidth.c \
48     mainpanel.c msgwin.c sepbar.c editcontext.c signal.c closures.c
49
50NORMAL_SRCS = filterproc.c window.c windowcb.c
51
52BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS)
53
54GEN_C = varstubs.c perlglue.c gmarshal_funcs.c
55GEN_H = owl_prototypes.h gmarshal_funcs.h
56
57BUILT_SOURCES = $(GEN_C) $(GEN_H)
58
59# Only copy file into place if file.new is different
60%: %.new
61        @diff -U0 $@ $< || { \
62         test -f $@ && echo '$@ changed!'; \
63         echo cp -f $< $@; \
64              cp -f $< $@; }
65
66proto: owl_prototypes.h
67
68perlglue.c: perlglue.xs typemap
69        $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
70
71varstubs.c: stubgen.pl variable.c
72        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
73
74owl_prototypes.h.new: codelist.pl varstubs.c $(CODELIST_SRCS)
75        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
76
77gmarshal_funcs.h: marshal_types
78        glib-genmarshal --header $< > $@
79gmarshal_funcs.c: marshal_types
80        glib-genmarshal --body $< > $@
81
82# For emacs flymake-mode
83check-syntax: proto
84        $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
85
86install-data-local:
87        $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib
88        (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - )
89
90do_transform = $(shell echo '$(1)' | sed '$(transform)')
91install-exec-hook:
92        mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \
93              $(DESTDIR)$(bindir)/$(call do_transform,barnowl)
94
95SUBDIRS = compat libfaim perl
Note: See TracBrowser for help on using the repository browser.