source: Makefile.am @ e2bc8ac

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