source: Makefile.am @ 1bd5aa9

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