[eddee7e] | 1 | ACLOCAL_AMFLAGS = -I m4 |
---|
[8073852] | 2 | |
---|
[ca1fb26a] | 3 | GIT_DESCRIPTION := $(if $(wildcard $(srcdir)/.git),$(shell cd $(srcdir) && git describe --match='barnowl-*' HEAD 2>/dev/null)) |
---|
[866b391] | 4 | VERSION = $(if $(GIT_DESCRIPTION),$(GIT_DESCRIPTION:barnowl-%=%),$(DIST_VERSION)) |
---|
| 5 | DIST_VERSION = @VERSION@ |
---|
| 6 | -include $(srcdir)/DIST_VERSION.mk BUILD_VERSION.mk |
---|
[ca1fb26a] | 7 | |
---|
| 8 | FORCE: |
---|
| 9 | BUILD_VERSION.mk: $(if $(filter-out $(BUILD_VERSION),$(VERSION)),FORCE) |
---|
| 10 | echo 'BUILD_VERSION = $(VERSION)' > $@ |
---|
[866b391] | 11 | dist-hook:: $(if $(filter-out @VERSION@,$(VERSION)),dist-hook-version) |
---|
| 12 | dist-hook-version: |
---|
| 13 | echo 'DIST_VERSION = $(VERSION)' > $(distdir)/DIST_VERSION.mk |
---|
[8df704f] | 14 | |
---|
[a223b6b] | 15 | bin_PROGRAMS = bin/barnowl |
---|
[7d03c8d] | 16 | if ENABLE_ZCRYPT |
---|
| 17 | bin_PROGRAMS += zcrypt |
---|
| 18 | endif |
---|
| 19 | |
---|
[02514d9] | 20 | zcrypt_SOURCES = zcrypt.c filterproc.c |
---|
| 21 | nodist_zcrypt_SOURCES = version.c |
---|
[7d03c8d] | 22 | |
---|
[a223b6b] | 23 | check_PROGRAMS = bin/tester |
---|
[b80bae0] | 24 | dist_check_DATA = t |
---|
| 25 | dist_check_SCRIPTS = runtests.sh |
---|
[37f27bc] | 26 | |
---|
[a223b6b] | 27 | noinst_SCRIPTS = barnowl |
---|
[574b952] | 28 | check_SCRIPTS = tester |
---|
| 29 | |
---|
[a223b6b] | 30 | barnowl tester: %: barnowl-wrapper.in bin/% Makefile |
---|
[1dba5bd] | 31 | sed \ |
---|
| 32 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ |
---|
| 33 | -e 's,[@]abs_builddir[@],$(abs_builddir),g' \ |
---|
| 34 | $< > $@ |
---|
[574b952] | 35 | chmod +x $@ |
---|
| 36 | |
---|
[a223b6b] | 37 | bin_barnowl_SOURCES = $(BASE_SRCS) \ |
---|
[3624a2c] | 38 | owl.h owl_perl.h \ |
---|
| 39 | owl.c |
---|
[a223b6b] | 40 | nodist_bin_barnowl_SOURCES = $(GEN_C) $(GEN_H) |
---|
[37f27bc] | 41 | |
---|
[b80bae0] | 42 | dist_man_MANS = doc/barnowl.1 |
---|
| 43 | dist_doc_DATA = doc/intro.txt doc/advanced.txt |
---|
[e2bc8ac] | 44 | |
---|
[a223b6b] | 45 | bin_barnowl_LDADD = compat/libcompat.a libfaim/libfaim.a |
---|
[37f27bc] | 46 | |
---|
[a223b6b] | 47 | bin_tester_SOURCES = $(BASE_SRCS) \ |
---|
[3624a2c] | 48 | owl.h owl_perl.h \ |
---|
[0b65bd7] | 49 | tester.c |
---|
[a223b6b] | 50 | nodist_bin_tester_SOURCES = $(GEN_C) $(GEN_H) |
---|
[0b65bd7] | 51 | |
---|
[a223b6b] | 52 | bin_tester_LDADD = compat/libcompat.a libfaim/libfaim.a |
---|
[42ad917] | 53 | |
---|
[2fa9a1a0] | 54 | TESTS=runtests.sh |
---|
| 55 | |
---|
[cb1243be] | 56 | AM_CPPFLAGS = \ |
---|
[8df704f] | 57 | -I$(top_srcdir)/libfaim/ \ |
---|
[858c9c4] | 58 | -DDATADIR='"$(pkgdatadir)"' \ |
---|
[ca1fb26a] | 59 | -DBINDIR='"$(bindir)"' |
---|
[37f27bc] | 60 | |
---|
[c266281] | 61 | CODELIST_SRCS=message.c mainwin.c popwin.c zephyr.c messagelist.c \ |
---|
[353719a] | 62 | commands.c global.c text.c fmtext.c editwin.c \ |
---|
[06e04a9] | 63 | util.c logging.c \ |
---|
[37f27bc] | 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 \ |
---|
[d564c3d] | 66 | keypress.c keymap.c keybinding.c cmd.c context.c \ |
---|
[37f27bc] | 67 | aim.c buddy.c buddylist.c style.c errqueue.c \ |
---|
[3f6555d] | 68 | zbuddylist.c popexec.c select.c wcwidth.c \ |
---|
[06e04a9] | 69 | mainpanel.c msgwin.c sepbar.c editcontext.c signal.c closures.c |
---|
[37f9818] | 70 | |
---|
[b80bae0] | 71 | NORMAL_SRCS = filterproc.c filterproc.h window.c window.h windowcb.c |
---|
[37f9818] | 72 | |
---|
| 73 | BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS) |
---|
[37f27bc] | 74 | |
---|
[ca1fb26a] | 75 | GEN_C = varstubs.c perlglue.c gmarshal_funcs.c version.c version.c.new |
---|
[0f5b08e] | 76 | GEN_H = owl_prototypes.h owl_prototypes.h.new gmarshal_funcs.h |
---|
[37f27bc] | 77 | |
---|
[685cca7] | 78 | BUILT_SOURCES = $(GEN_H) |
---|
[37f27bc] | 79 | |
---|
[1ad4a4a] | 80 | # Only copy file into place if file.new is different |
---|
[ca1fb26a] | 81 | owl_prototypes.h version.c: %: %.new |
---|
[1ad4a4a] | 82 | @diff -U0 $@ $< || { \ |
---|
| 83 | test -f $@ && echo '$@ changed!'; \ |
---|
| 84 | echo cp -f $< $@; \ |
---|
| 85 | cp -f $< $@; } |
---|
| 86 | |
---|
[37f27bc] | 87 | proto: owl_prototypes.h |
---|
| 88 | |
---|
[25d7236] | 89 | perlglue.c: perlglue.xs typemap |
---|
[eb5e8fc] | 90 | $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes $< > $@ |
---|
[37f27bc] | 91 | |
---|
[df49ff6] | 92 | varstubs.c: stubgen.pl variable.c |
---|
[76f0e19] | 93 | $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@ |
---|
[37f27bc] | 94 | |
---|
[37f9818] | 95 | owl_prototypes.h.new: codelist.pl varstubs.c $(CODELIST_SRCS) |
---|
[76f0e19] | 96 | $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@ |
---|
[37f27bc] | 97 | |
---|
[ca1fb26a] | 98 | version.c.new: Makefile BUILD_VERSION.mk |
---|
| 99 | $(AM_V_GEN)echo 'const char *version = "$(VERSION)";' > $@ |
---|
| 100 | |
---|
[353719a] | 101 | gmarshal_funcs.h: marshal_types |
---|
| 102 | glib-genmarshal --header $< > $@ |
---|
| 103 | gmarshal_funcs.c: marshal_types |
---|
| 104 | glib-genmarshal --body $< > $@ |
---|
| 105 | |
---|
[37f27bc] | 106 | # For emacs flymake-mode |
---|
| 107 | check-syntax: proto |
---|
[ce35060] | 108 | $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES) |
---|
[37f27bc] | 109 | |
---|
[ca1fb26a] | 110 | CLEANFILES = $(BUILT_SOURCES) $(GEN_C) $(noinst_SCRIPTS) $(check_SCRIPTS) BUILD_VERSION.mk |
---|
[866b391] | 111 | MAINTAINERCLEANFILES = DIST_VERSION.mk |
---|
[b80bae0] | 112 | EXTRA_DIST = \ |
---|
| 113 | autogen.sh \ |
---|
[574b952] | 114 | barnowl-wrapper.in \ |
---|
[b80bae0] | 115 | codelist.pl \ |
---|
[78b9503] | 116 | doc/code.txt \ |
---|
| 117 | doc/owl-window.txt \ |
---|
| 118 | doc/releasing-barnowl.txt \ |
---|
[b80bae0] | 119 | examples \ |
---|
| 120 | marshal_types \ |
---|
| 121 | perlglue.xs \ |
---|
| 122 | scripts \ |
---|
| 123 | stubgen.pl \ |
---|
[392b5cf] | 124 | typemap \ |
---|
| 125 | cpanfile |
---|
[0f5b08e] | 126 | |
---|
[12a6616] | 127 | SUBDIRS = compat libfaim perl |
---|