source: Makefile.am @ 0f8efe0

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