source: Makefile.am @ 02514d9

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