source: Makefile.am @ ee6b30f

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