Skip to content

Commit

Permalink
Ports build system to autotools.
Browse files Browse the repository at this point in the history
  • Loading branch information
mzimbres committed Apr 3, 2021
1 parent 3d3e87b commit 22ef705
Show file tree
Hide file tree
Showing 6 changed files with 501 additions and 82 deletions.
80 changes: 0 additions & 80 deletions Makefile

This file was deleted.

66 changes: 66 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = subdir-objects

AM_COLOR_TESTS = always

Makefile.dep:
-$(CXX) -MM ./src/*.cpp > $@

-include Makefile.dep

noinst_PROGRAMS = tsvsim
bin_PROGRAMS = tsvtree

tsvtree_SOURCES =
tsvtree_SOURCES += $(top_srcdir)/src/tree.cpp
tsvtree_SOURCES += $(top_srcdir)/src/tree.hpp
tsvtree_SOURCES += $(top_srcdir)/src/tsv.cpp
tsvtree_SOURCES += $(top_srcdir)/src/tsv.hpp
tsvtree_SOURCES += $(top_srcdir)/src/utils.cpp
tsvtree_SOURCES += $(top_srcdir)/src/utils.hpp
tsvtree_SOURCES += $(top_srcdir)/src/tsvtree.cpp

tsvtree_CPPFLAGS =
tsvtree_CPPFLAGS += $(BOOST_CPPFLAGS)
tsvtree_CPPFLAGS += -I$(top_srcdir)/src

tsvtree_LDFLAGS =
tsvtree_LDFLAGS += $(BOOST_LDFLAGS)

tsvtree_LDADD =
tsvtree_LDADD += -lfmt
tsvtree_LDADD += -lboost_program_options

tsvsim_SOURCES =
tsvsim_SOURCES += $(top_srcdir)/src/tsvsim.cpp


EXTRA_DIST =
EXTRA_DIST += $(top_srcdir)/examples/cities.tsv
EXTRA_DIST += $(top_srcdir)/debian
EXTRA_DIST += $(top_srcdir)/src/check.sh

dist_man_MANS = $(top_srcdir)/doc/tsvtree.1

CLEANFILES =
#CLEANFILES += tsvtree
#CLEANFILES += tsvsim
#CLEANFILES += tsvsim.o
CLEANFILES += Makefile.dep

.PHONY: deb
deb: dist
rm -rf tmp;\
mkdir tmp;\
mv $(distdir).tar.gz $(distdir)-1.tar.gz; \
mv $(distdir)-1.tar.gz tmp;\
cd tmp;\
ln $(distdir)-1.tar.gz $(PACKAGE)_$(VERSION).orig.tar.gz; \
tar -xvvzf $(distdir)-1.tar.gz; \
cd $(distdir)/debian; debuild --no-sign -j1

#backup_emails = foo@bar.de
.PHONY: backup
backup: $(tarball_dir).tar.gz
echo "Backup" | mutt -s "Backup" -a $< -- $(backup_emails)

22 changes: 22 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
AC_PREREQ([2.69])
AC_INIT([tsvtree], [1.0.5], [mzimbres@gmail.com])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/tsvtree.cpp])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([-Wall foreign])

# Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S

AX_BOOST_BASE([1.70],, AC_MSG_ERROR[Boost not found])
AX_BOOST_PROGRAM_OPTIONS

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_UINT64_T
AC_CHECK_TYPES([ptrdiff_t])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
Loading

0 comments on commit 22ef705

Please sign in to comment.