source: Makefile.am @ ddbb43ad

release-1.7release-1.8release-1.9
Last change on this file since ddbb43ad was dec60b4, checked in by Nelson Elhage <nelhage@mit.edu>, 11 years ago
Merge branch 'perl-tester'
  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[eddee7e]1ACLOCAL_AMFLAGS = -I m4
[c45e1eb]2CFLAGS += $(EXTRA_CFLAGS)
[8073852]3
[89982ec]4GIT_DESCRIPTION := $(if $(wildcard .git),$(shell git describe --match='barnowl-*' HEAD 2>/dev/null))
5GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%))
[8df704f]6
[37f27bc]7bin_PROGRAMS = barnowl.bin
[7d03c8d]8if ENABLE_ZCRYPT
9bin_PROGRAMS += zcrypt
10endif
11
12zcrypt_SOURCES = zcrypt.c filterproc.c
13
[5aa33fd]14check_PROGRAMS = tester.bin
[37f27bc]15
16barnowl_bin_SOURCES = $(BASE_SRCS) \
[0b65bd7]17     owl.h owl_perl.h config.h \
[ae333f0]18     owl.c \
[37f27bc]19     $(GEN_C) $(GEN_H)
20
[191d5e7]21barnowl_bin_LDADD = libfaim/libfaim.a
[37f27bc]22
[de18326]23tester_bin_SOURCES = $(BASE_SRCS) \
[8bce750]24     owl.h owl_perl.h config.h \
[0b65bd7]25     $(GEN_C) $(GEN_H) \
26     tester.c
27
[de18326]28tester_bin_LDADD = libfaim/libfaim.a
[42ad917]29
[2fa9a1a0]30TESTS=runtests.sh
31
[37f27bc]32CPPFLAGS = -I$(top_srcdir)/ \
[8df704f]33           -I$(top_srcdir)/libfaim/ \
[858c9c4]34           -DDATADIR='"$(pkgdatadir)"' \
[5a57386]35           -DBINDIR='"$(bindir)"' \
[8df704f]36           $(GIT_FLAGS)
[37f27bc]37
38BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \
39     commands.c global.c text.c fmtext.c editwin.c util.c logging.c \
40     perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
41     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
[d564c3d]42     keypress.c keymap.c keybinding.c cmd.c context.c \
[37f27bc]43     aim.c buddy.c buddylist.c style.c errqueue.c \
[3f6555d]44     zbuddylist.c popexec.c select.c wcwidth.c \
[ae333f0]45     glib_compat.c filterproc.c
[37f27bc]46
47GEN_C = varstubs.c perlglue.c
48GEN_H = owl_prototypes.h
49
50BUILT_SOURCES = $(GEN_C) $(GEN_H)
51
[1ad4a4a]52# Only copy file into place if file.new is different
53%: %.new
54        @diff -U0 $@ $< || { \
55         test -f $@ && echo '$@ changed!'; \
56         echo cp -f $< $@; \
57              cp -f $< $@; }
58
[37f27bc]59proto: owl_prototypes.h
60
[39e81f7]61perlglue.c: perlglue.xs $(TYPEMAP)
[5b376388]62        $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
[37f27bc]63
[df49ff6]64varstubs.c: stubgen.pl variable.c
[76f0e19]65        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
[37f27bc]66
[191d5e7]67owl_prototypes.h.new: codelist.pl varstubs.c $(BASE_SRCS)
[76f0e19]68        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
[37f27bc]69
70# For emacs flymake-mode
71check-syntax: proto
72        $(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
73
74install-data-local:
75        $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib
76        (cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - )
77
78do_transform = $(shell echo '$(1)' | sed '$(transform)')
79install-exec-hook:
80        mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \
81              $(DESTDIR)$(bindir)/$(call do_transform,barnowl)
82
[10557e6]83SUBDIRS = libfaim perl
Note: See TracBrowser for help on using the repository browser.