-## -*-makefile-*-
-##
-## $Id$
-##
-## Makefile builder
-##
-## (c) 2006 Mark Wooding
-##
+### -*-makefile-*-
+###
+### Makefile builder
+###
+### (c) 2006, 2018 Mark Wooding
+###
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of mm: a simple Mastermind game.
-##
-## mm 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.
-##
-## mm 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 mm; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of mm: a simple Mastermind game.
+###
+### mm 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.
+###
+### mm 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 mm; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-AUTOMAKE_OPTIONS = foreign
+bin_PROGRAMS =
+man_MANS =
+EXTRA_DIST =
-bin_PROGRAMS = mm
+LDADD = $(mLib_LIBS)
-man_MANS = mm.6
+bin_PROGRAMS += mm
+mm_SOURCES = mm.c
+man_MANS += mm.6
-mm_SOURCES = mm.c
+EXTRA_DIST += debian/changelog debian/compat
+EXTRA_DIST += debian/control debian/copyright
+EXTRA_DIST += debian/rules debian/source/format
-##----- That's all, folks ---------------------------------------------------
+###----- That's all, folks --------------------------------------------------
-dnl -*-fundamental-*-
-dnl
-dnl $Id$
+dnl -*-autoconf-*-
dnl
dnl Configuration script for mm
dnl
-dnl (c) 2006 Mark Wooding
+dnl (c) 2006, 2018 Mark Wooding
dnl
-dnl ----- Licensing notice --------------------------------------------------
+dnl----- Licensing notice ---------------------------------------------------
dnl
dnl This file is part of mm: a simple Mastermind game.
dnl
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
-dnl
+dnl
dnl mm is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
-dnl
+dnl
dnl You should have received a copy of the GNU General Public License
dnl along with mm; if not, write to the Free Software Foundation,
dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-AC_INIT([mm.c])
-AM_INIT_AUTOMAKE([mm], [1.0.0])
+mdw_AUTO_VERSION
+AC_INIT([mm], AUTO_VERSION, [mdw@distorted.org.uk])
+AC_CONFIG_SRCDIR([mm.c])
+AC_CONFIG_AUX_DIR([config])
+AM_INIT_AUTOMAKE([foreign])
+mdw_SILENT_RULES
+
AC_PROG_CC
-mdw_GCC_FLAGS
-mdw_MLIB([2.0.3])
-AC_OUTPUT([Makefile])
+AM_PROG_CC_C_O
+AX_CFLAGS_WARN_ALL
+
+PKG_CHECK_MODULES([mLib], [mLib >= 2.0.3])
+AM_CFLAGS="$AM_CFLAGS $mLib_CFLAGS"
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
-dnl ----- That's all, folks -------------------------------------------------
+dnl----- That's all, folks --------------------------------------------------
#! /usr/bin/make -f
-
-export DH_COMPAT = 4
-
-build:
- rm -rf build deb-build
- mkdir deb-build
- cd deb-build; ../configure --prefix=/usr
- make -C deb-build
- touch build
-
-clean:
- dh_clean
- rm -rf deb-build build
-
-install: build
- dh_clean
- make -C deb-build install DESTDIR=`pwd`/debian/mm
-
-binary-indep:
-
-binary-arch: install
- dh_testdir -a
- dh_testroot -a
- dh_compress -a
- dh_installdocs -a
- dh_strip -a
- dh_shlibdeps -a
- dh_gencontrol -a
- dh_fixperms -a
- dh_installdeb -a
- dh_md5sums -a
- dh_builddeb -a
-
-binary: binary-indep binary-arch
-
-source:
- rm -rf deb-build/*.tar.gz deb-build/=deb=
- make -C deb-build dist
- mkdir deb-build/=deb=
- cd deb-build/=deb=; tar xvfz ../*.tar.gz
- d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/*
- rm -rf deb-build/=deb=
-
-.PHONY: binary binary-arch binary-indep clean install source
+%:; dh $@ --parallel -BDebian/build