Skip to content

Commit

Permalink
Switch the build system to using automake.
Browse files Browse the repository at this point in the history
Use automake for the build system, which lets us clean a bunch of
cruft out of Makefile.in.
  • Loading branch information
nelhage committed Jul 18, 2009
1 parent 4f0a2ee commit 37f27bc
Show file tree
Hide file tree
Showing 12 changed files with 138 additions and 241 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
*.par *.par
*~ *~
.#* .#*
.deps
META.yml META.yml
Makefile Makefile
/Makefile.in
/libfaim/Makefile.in
Makefile.old Makefile.old
TAGS TAGS
\#*# \#*#
Expand All @@ -19,11 +22,15 @@ config.log
config.status config.status
configure configure
core core
depcomp
install-sh
jabber.log jabber.log
missing
owl_prototypes.h owl_prototypes.h
owl_prototypes.h.new owl_prototypes.h.new
perlglue.c perlglue.c
perlwrap.c perlwrap.c
pm_to_blib pm_to_blib
stamp-h1
tester tester
varstubs.c varstubs.c
62 changes: 62 additions & 0 deletions Makefile.am
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,62 @@
bin_PROGRAMS = barnowl.bin

barnowl_bin_SOURCES = $(BASE_SRCS) \
owl.h owl_perl.h config.h test.h \
owl.c \
libzcrypt.a \
$(GEN_C) $(GEN_H)

barnowl_bin_LDADD = libfaim/libfaim.a libzcrypt.a

noinst_LIBRARIES = libzcrypt.a

libzcrypt_a_SOURCES = zcrypt.c
libzcrypt_a_CFLAGS = -w

CPPFLAGS = -I$(top_srcdir)/ \
-I$(top_srcdir)/libfaim/

BASE_SRCS=list.c message.c mainwin.c popwin.c zephyr.c messagelist.c \
commands.c global.c text.c fmtext.c editwin.c util.c logging.c \
perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
keypress.c keymap.c keybinding.c cmd.c context.c \
aim.c buddy.c buddylist.c style.c errqueue.c \
zbuddylist.c popexec.c obarray.c select.c wcwidth.c \
glib_compat.c

GEN_C = varstubs.c perlglue.c
GEN_H = owl_prototypes.h

BUILT_SOURCES = $(GEN_C) $(GEN_H)

proto: owl_prototypes.h

perlglue.c: perlglue.xs
perl $(XSUBPPDIR)/xsubpp $(XSUBPPFLAGS) -prototypes perlglue.xs > perlglue.c

varstubs.c: variable.c stubgen.pl
perl stubgen.pl > varstubs.c

# Only move owl_prototypes.h into place if the new one is different
owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
perl codelist.pl > owl_prototypes.h.new
@cmp -s owl_prototypes.h.new $@ || { \
test -f $@ && echo 'Interfaces changed!'; \
echo mv -f owl_prototypes.h.new $@; \
mv -f owl_prototypes.h.new $@; }

# For emacs flymake-mode
check-syntax: proto
$(CC) $(CFLAGS) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)

install-data-local:
$(mkinstalldirs) ${DESTDIR}${pkgdatadir}/lib
(cd perl/lib && tar -cf - . ) | (cd ${DESTDIR}${pkgdatadir}/lib && tar -xf - )

do_transform = $(shell echo '$(1)' | sed '$(transform)')
install-exec-hook:
mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \
$(DESTDIR)$(bindir)/$(call do_transform,barnowl)

SUBDIRS = libfaim/ perl/modules/
147 changes: 0 additions & 147 deletions Makefile.in

This file was deleted.

3 changes: 2 additions & 1 deletion autogen.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh #!/bin/sh
autoreconf autoreconf -fvi

26 changes: 13 additions & 13 deletions configure.ac
Original file line number Original file line Diff line number Diff line change
@@ -1,16 +1,12 @@
dnl $Id$ dnl $Id$
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT(owl.c) AC_INIT([BarnOwl],[1.1.2],[bug-barnowl@mit.edu])
AM_INIT_AUTOMAKE([-Wall foreign])


AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER([config.h])


AC_PROG_CC AC_PROG_CC


dnl If we're using GCC, enable all warnings
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -g";
fi

dnl Check for Athena dnl Check for Athena
AC_MSG_CHECKING(for /usr/athena/include) AC_MSG_CHECKING(for /usr/athena/include)
if test -d /usr/athena/include; then if test -d /usr/athena/include; then
Expand Down Expand Up @@ -124,17 +120,21 @@ CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
AC_MSG_NOTICE([Adding glib-2.0 LDFLAGS ${GLIB_LIBS}]) AC_MSG_NOTICE([Adding glib-2.0 LDFLAGS ${GLIB_LIBS}])
LDFLAGS="${GLIB_LIBS} ${LDFLAGS}" LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"


dnl Checks for typedefs, structures, and compiler characteristics. if test "x${prefix}" = "xNONE"; then
prefix="${ac_default_prefix}"
fi


dnl Support --program-{prefix,suffix,transform} AC_DEFINE_UNQUOTED([DATADIR],["${prefix}/share/${PACKAGE}"],
AC_ARG_PROGRAM [Package data directory])

dnl Checks for typedefs, structures, and compiler characteristics.


AC_SUBST(XSUBPPDIR) AC_SUBST(XSUBPPDIR)
AC_SUBST(XSUBPPFLAGS) AC_SUBST(XSUBPPFLAGS)
AC_SUBST(ATHSTATIC) AC_SUBST(ATHSTATIC)


AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_RANLIB


AC_CONFIG_SUBDIRS(libfaim) AC_CONFIG_FILES([Makefile libfaim/Makefile])

AC_OUTPUT([perl/modules/Makefile])
AC_OUTPUT(Makefile)
Empty file removed install.sh
Empty file.
14 changes: 14 additions & 0 deletions libfaim/Makefile.am
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,14 @@
noinst_LIBRARIES = libfaim.a

libfaim_a_SOURCES = admin.c \
adverts.c auth.c bos.c buddylist.c bstream.c \
chat.c chatnav.c conn.c email.c ft.c icq.c im.c \
invite.c md5.c misc.c msgcookie.c locate.c \
popups.c rxhandlers.c rxqueue.c search.c service.c \
snac.c ssi.c stats.c tlv.c translate.c txqueue.c \
util.c odir.c bart.c \
aim_cbtypes.h aim.h aim_internal.h faimconfig.h md5.h

libfaim_a_CFLAGS = -Wno-pointer-sign
libfaim_a_CPPFLAGS = -DAIM_BUILDDATE=\"x\" -DAIM_BUILDTIME=\"x\" \
-I${top_srcdir}/libfaim
21 changes: 0 additions & 21 deletions libfaim/Makefile.in

This file was deleted.

13 changes: 0 additions & 13 deletions libfaim/configure.ac

This file was deleted.

40 changes: 0 additions & 40 deletions mkinstalldirs

This file was deleted.

7 changes: 1 addition & 6 deletions owl.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -47,12 +47,7 @@ typedef void SV;


static const char owl_h_fileIdent[] = "$Id$"; static const char owl_h_fileIdent[] = "$Id$";


#define BARNOWL_STRINGIFY(x) _STRINGIFY(x) #define OWL_VERSION_STRING PACKAGE_VERSION
#define _STRINGIFY(x) #x

#ifndef OWL_VERSION_STRING
#define OWL_VERSION_STRING "1.1.2"
#endif


/* Feature that is being tested to redirect stderr through a pipe. /* Feature that is being tested to redirect stderr through a pipe.
* There may still be some portability problems with this. */ * There may still be some portability problems with this. */
Expand Down
Loading

0 comments on commit 37f27bc

Please sign in to comment.