-## -*-makefile-*-
-##
-## $Id: Makefile.am,v 1.2 1999/04/07 21:11:01 mdw Exp $
-##
-## Makefile for chkpath
-##
-## (c) 1999 Mark Wooding
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of chkpath.
-##
-## chkpath is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## chkpath is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with chkpath; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-##----- Revision history ----------------------------------------------------
-##
-## $Log: Makefile.am,v $
-## Revision 1.2 1999/04/07 21:11:01 mdw
-## Make sure path.h and the manpages get distributed.
-##
-## Revision 1.1.1.1 1999/04/06 20:12:07 mdw
-## Import new project.
-##
-
-AUTOMAKE_OPTIONS = foreign
-
-SUBDIRS = mLib
-
-bin_PROGRAMS = chkpath tmpdir
-man_MANS = chkpath.1 tmpdir.1
-INCLUDES = -I$(srcdir)/mLib
-LDADD = mLib/libmLib.a
-
-EXTRA_DIST = $(man_MANS)
-
-chkpath_SOURCES = chkpath.c path.c path.h
-tmpdir_SOURCES = tmpdir.c path.c path.h
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for chkpath
+###
+### (c) 1999 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of chkpath.
+###
+### chkpath is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### chkpath is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with chkpath; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+noinst_LIBRARIES =
+include_HEADERS =
+dist_man_MANS =
+
+CLEANFILES =
+EXTRA_DIST =
+LDADD =
+
+###--------------------------------------------------------------------------
+### Programs.
+
+## Common stuff.
+noinst_LIBRARIES += libutils.a
+libutils_a_SOURCES =
+LDADD += libutils.a
+
+libutils_a_SOURCES += utils.c
+libutils_a_SOURCES += utils.h
+
+## chkpath
+bin_PROGRAMS += chkpath
+dist_man_MANS += chkpath.1
+
+## tmpdir
+bin_PROGRAMS += tmpdir
+dist_man_MANS += tmpdir.1
+
+###--------------------------------------------------------------------------
+### Library.
+
+## The library itself.
+lib_LTLIBRARIES += libcheckpath.la
+libcheckpath_la_SOURCES =
+libcheckpath_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO)
+libcheckpath_la_LIBADD = $(mLib_LIBS)
+dist_man_MANS += checkpath.3
+LDADD += libcheckpath.la
+
+libcheckpath_la_SOURCES += checkpath.c
+include_HEADERS += checkpath.h
+
+## Package description.
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = checkpath.pc
+CLEANFILES += checkpath.pc
+EXTRA_DIST += checkpath.pc.in
+
+checkpath.pc: checkpath.pc.in Makefile
+ $(top_srcdir)/config/confsubst $(srcdir)/checkpath.pc.in >$@.new \
+ prefix=$(prefix) exec_prefix=$(exec_prefix) \
+ libdir=$(libdir) includedir=$(includedir) \
+ VERSION=$(VERSION)
+ mv $@.new $@
+
+###--------------------------------------------------------------------------
+### Other finishing touches.
+
+## Version stamp.
+dist-hook::
+ echo $(VERSION) >$(distdir)/RELEASE
+
+## Build tools.
+EXTRA_DIST += config/confsubst
+
+## External libraries.
+LDADD += $(mLib_LIBS)
+
+###--------------------------------------------------------------------------
+### Debian.
+
+## Main stuff.
+EXTRA_DIST += debian/rules
+EXTRA_DIST += debian/copyright
+EXTRA_DIST += debian/control
+EXTRA_DIST += debian/changelog
+
+## Library.
+EXTRA_DIST += debian/libcheckpath1.install
+EXTRA_DIST += debian/libcheckpath-dev.install
+
+## Binaries.
+EXTRA_DIST += debian/tmpdir.install
+EXTRA_DIST += debian/chkpath.install
+
+###----- That's all, folks --------------------------------------------------