source: Makefile.am @ a999d9e

release-1.10release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since a999d9e was 89982ec, checked in by Nelson Elhage <nelhage@mit.edu>, 14 years ago
Makefile.am: Fall back gracefully if we can’t compute a GIT_VERSION. Also, use simply-expanded variables (:=, not =) to shell out, so we don’t recompute GIT_VERSION again for every object. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[eddee7e]1ACLOCAL_AMFLAGS = -I m4
[8073852]2
[89982ec]3GIT_DESCRIPTION := $(if $(wildcard .git),$(shell git describe --match='barnowl-*' HEAD 2>/dev/null))
4GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%))
[8df704f]5
[37f27bc]6bin_PROGRAMS = barnowl.bin
[42ad917]7check_PROGRAMS = tester perl_tester
[37f27bc]8
9barnowl_bin_SOURCES = $(BASE_SRCS) \
[0b65bd7]10     owl.h owl_perl.h config.h \
[37f27bc]11     owl.c \
12     $(GEN_C) $(GEN_H)
13
[191d5e7]14barnowl_bin_LDADD = libfaim/libfaim.a
[37f27bc]15
[0b65bd7]16tester_SOURCES = $(BASE_SRCS) \
[8bce750]17     owl.h owl_perl.h config.h \
[0b65bd7]18     $(GEN_C) $(GEN_H) \
19     tester.c
20
[191d5e7]21tester_LDADD = libfaim/libfaim.a
[d851bbc]22
[42ad917]23perl_tester_SOURCES = $(BASE_SRCS) \
24     owl.h owl_perl.h config.h \
25     $(GEN_C) $(GEN_H) \
26     perl_tester.c
27
[b373d44]28perl_tester_LDADD = libfaim/libfaim.a
[42ad917]29
[2fa9a1a0]30TESTS=runtests.sh
31
[37f27bc]32CPPFLAGS = -I$(top_srcdir)/ \
[8df704f]33           -I$(top_srcdir)/libfaim/ \
34           $(GIT_FLAGS)
[37f27bc]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 \
[191d5e7]40     keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \
[37f27bc]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
[1ad4a4a]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
[37f27bc]57proto: owl_prototypes.h
58
[39e81f7]59perlglue.c: perlglue.xs $(TYPEMAP)
[5b376388]60        $(AM_V_GEN)perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c
[37f27bc]61
[df49ff6]62varstubs.c: stubgen.pl variable.c
[76f0e19]63        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
[37f27bc]64
[191d5e7]65owl_prototypes.h.new: codelist.pl varstubs.c $(BASE_SRCS)
[76f0e19]66        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
[37f27bc]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/modules/
Note: See TracBrowser for help on using the repository browser.