forked from barnowl/barnowl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
120 lines (91 loc) · 3.36 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
ACLOCAL_AMFLAGS = -I m4
GIT_DESCRIPTION := $(if $(wildcard $(srcdir)/.git),$(shell cd $(srcdir) && git describe --match='barnowl-*' HEAD 2>/dev/null))
VERSION = $(if $(GIT_DESCRIPTION),$(GIT_DESCRIPTION:barnowl-%=%),@VERSION@)
-include BUILD_VERSION.mk
FORCE:
BUILD_VERSION.mk: $(if $(filter-out $(BUILD_VERSION),$(VERSION)),FORCE)
echo 'BUILD_VERSION = $(VERSION)' > $@
bin_PROGRAMS = bin/barnowl
if ENABLE_ZCRYPT
bin_PROGRAMS += zcrypt
endif
zcrypt_SOURCES = zcrypt.c filterproc.c version.c
check_PROGRAMS = bin/tester
dist_check_DATA = t
dist_check_SCRIPTS = runtests.sh
noinst_SCRIPTS = barnowl
check_SCRIPTS = tester
barnowl tester: %: barnowl-wrapper.in bin/% Makefile
sed \
-e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \
-e 's,[@]abs_builddir[@],$(abs_builddir),g' \
$< > $@
chmod +x $@
bin_barnowl_SOURCES = $(BASE_SRCS) \
owl.h owl_perl.h \
owl.c
nodist_bin_barnowl_SOURCES = $(GEN_C) $(GEN_H)
dist_man_MANS = doc/barnowl.1
dist_doc_DATA = doc/intro.txt doc/advanced.txt
bin_barnowl_LDADD = compat/libcompat.a libfaim/libfaim.a
bin_tester_SOURCES = $(BASE_SRCS) \
owl.h owl_perl.h \
tester.c
nodist_bin_tester_SOURCES = $(GEN_C) $(GEN_H)
bin_tester_LDADD = compat/libcompat.a libfaim/libfaim.a
TESTS=runtests.sh
AM_CPPFLAGS = \
-I$(top_srcdir)/libfaim/ \
-DDATADIR='"$(pkgdatadir)"' \
-DBINDIR='"$(bindir)"'
CODELIST_SRCS=message.c mainwin.c popwin.c zephyr.c messagelist.c \
commands.c global.c text.c fmtext.c editwin.c \
util.c logging.c \
perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
keypress.c keymap.c keybinding.c cmd.c context.c \
aim.c buddy.c buddylist.c style.c errqueue.c \
zbuddylist.c popexec.c select.c wcwidth.c \
mainpanel.c msgwin.c sepbar.c editcontext.c signal.c closures.c
NORMAL_SRCS = filterproc.c filterproc.h window.c window.h windowcb.c
BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS)
GEN_C = varstubs.c perlglue.c gmarshal_funcs.c version.c version.c.new
GEN_H = owl_prototypes.h owl_prototypes.h.new gmarshal_funcs.h
BUILT_SOURCES = $(GEN_H)
# Only copy file into place if file.new is different
owl_prototypes.h version.c: %: %.new
@diff -U0 $@ $< || { \
test -f $@ && echo '$@ changed!'; \
echo cp -f $< $@; \
cp -f $< $@; }
proto: owl_prototypes.h
perlglue.c: perlglue.xs typemap
$(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes $< > $@
varstubs.c: stubgen.pl variable.c
$(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
owl_prototypes.h.new: codelist.pl varstubs.c $(CODELIST_SRCS)
$(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
version.c.new: Makefile BUILD_VERSION.mk
$(AM_V_GEN)echo 'const char *version = "$(VERSION)";' > $@
gmarshal_funcs.h: marshal_types
glib-genmarshal --header $< > $@
gmarshal_funcs.c: marshal_types
glib-genmarshal --body $< > $@
# For emacs flymake-mode
check-syntax: proto
$(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
CLEANFILES = $(BUILT_SOURCES) $(GEN_C) $(noinst_SCRIPTS) $(check_SCRIPTS) BUILD_VERSION.mk
EXTRA_DIST = \
autogen.sh \
barnowl-wrapper.in \
codelist.pl \
doc/code.txt \
doc/owl-window.txt \
doc/releasing-barnowl.txt \
examples \
marshal_types \
perlglue.xs \
scripts \
stubgen.pl \
typemap
SUBDIRS = compat libfaim perl