source: Makefile.am @ fe73d0c

release-1.8release-1.9
Last change on this file since fe73d0c was 3535a6e, checked in by David Benjamin <davidben@mit.edu>, 10 years ago
First go at sigwait-based signal handling Instead of relying on pselect and signal masking to listen for signals, which glib doesn't support, we spawn a dedicated signal thread that loops in sigwait. These signals are posted back to the main message loop which may handle them at will. This avoids the need for complex reentrant code and sig_atomic_t. This removes the final pre-select action. SIGINT doesn't quite work right yet because we can no longer take it in the middle of an event loop iteration.
  • Property mode set to 100644
File size: 2.6 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=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \
41     commands.c global.c text.c fmtext.c editwin.c util.c logging.c \
42     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
43     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
44     keypress.c keymap.c keybinding.c cmd.c context.c \
45     aim.c buddy.c buddylist.c style.c errqueue.c \
46     zbuddylist.c popexec.c select.c wcwidth.c \
47     glib_compat.c mainpanel.c msgwin.c sepbar.c editcontext.c signal.c
48
49NORMAL_SRCS = filterproc.c window.c windowcb.c
50
51BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS)
52
53GEN_C = varstubs.c perlglue.c
54GEN_H = owl_prototypes.h
55
56BUILT_SOURCES = $(GEN_C) $(GEN_H)
57
58# Only copy file into place if file.new is different
59%: %.new
60        @diff -U0 $@ $< || { \
61         test -f $@ && echo '$@ changed!'; \
62         echo cp -f $< $@; \
63              cp -f $< $@; }
64
65proto: owl_prototypes.h
66
67perlglue.c: perlglue.xs $(TYPEMAP)
68        $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
69
70varstubs.c: stubgen.pl variable.c
71        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
72
73owl_prototypes.h.new: codelist.pl varstubs.c $(CODELIST_SRCS)
74        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
75
76# For emacs flymake-mode
77check-syntax: proto
78        $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
79
80install-data-local:
81        $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib
82        (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - )
83
84do_transform = $(shell echo '$(1)' | sed '$(transform)')
85install-exec-hook:
86        mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \
87              $(DESTDIR)$(bindir)/$(call do_transform,barnowl)
88
89SUBDIRS = compat libfaim perl
Note: See TracBrowser for help on using the repository browser.