skelrc.tex: Skeletons for (La)TeX documents.
[skel] / Makefile.am
index 6080464..e994490 100644 (file)
-## -*-makefile-*-
-##
-## $Id$
-##
-## Makefile for skel
-##
-## (c) 1998 Mark Wooding
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Skel.
-##
-## Skel 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.
-##
-## Skel 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 Skel; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-## --- Basic automake configuration ---
-
-AUTOMAKE_OPTIONS = foreign
-
-## --- Emacs lisp files to build ---
-
-lisp_LISP = skel.el skel-init.el
-ELCFILES = skel.elc
-
-## --- Other things to install ---
-
-pkgdata_DATA = \
-       skeleton skelrc \
-       skelrc.c skelrc.cc skelrc.h skelrc.m skelrc.y skelrc.java \
-       skelrc.mxd \
-       skelrc.el \
-       skelrc.lisp \
-       skelrc.pm skelrc.pl skelrc.py skelrc.pyx \
-       skelrc.am skelrc.in \
-       skelrc.wml \
-       skelrc.hs skelrc.gc \
-       skeleton.skel skelrc.skel \
-       skeleton.texi skelrc.texi
-
-## --- Things to distribute ---
-
-EXTRA_DIST = \
-       $(pkgdata_DATA) \
-       skel-init.el \
-       debian/control debian/copyright debian/changelog debian/rules \
-       debian/skel.emacsen-install debian/skel.emacsen-remove \
-       debian/skel.emacsen-startup
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for skel
+###
+### (c) 1998 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Skel.
+###
+### Skel 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.
+###
+### Skel 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 Skel; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+lisp_LISP               =
+ELCFILES                =
+
+CLEANFILES              =
+EXTRA_DIST              =
+
+confsubst = $(top_srcdir)/config/confsubst
+SUBSTITUTIONS = \
+       PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
+       skeldir=$(skeldir)
+
+###--------------------------------------------------------------------------
+### Emacs Lisp stuff.
+
+CLEANFILES             += *.elc
+
+## Main program.
+lisp_LISP              += skel.el
+ELCFILES               += skel.elc
+EXTRA_DIST             += skel.el.in
+CLEANFILES             += skel.el
+
+skel.el: skel.el.in Makefile
+       $(confsubst) $(srcdir)/skel.el.in $(SUBSTITUTIONS)>$@.new
+       mv $@.new $@
+
+## Loader stub.
+lisp_LISP              += skel-init.el
+EXTRA_DIST             += skel-init.el
+
+###--------------------------------------------------------------------------
+### Skeleton files for various languages.
+
+skel_DATA               = skeleton skelrc
+EXTRA_DIST             += $(skel_DATA)
+
+## C and related languages
+skel_DATA              += skelrc.c skelrc.h
+skel_DATA              += skelrc.cc
+skel_DATA              += skelrc.m
+skel_DATA              += skelrc.cs
+skel_DATA              += skelrc.java
+
+## Lisp
+skel_DATA              += skelrc.lisp
+skel_DATA              += skelrc.scm
+skel_DATA              += skelrc.el
+
+## Python
+skel_DATA              += skelrc.py skelrc.pyx
+
+## Perl
+skel_DATA              += skelrc.pl skelrc.pm
+
+## Autotools
+skel_DATA              += skelrc.am skelrc.ac skelrc.at
+
+## Haskell
+skel_DATA              += skelrc.hs
+
+## TeX and related languages
+skel_DATA              += skelrc.tex
+skel_DATA              += skeleton.texi skelrc.texi
+
+## Skeleton files
+skel_DATA              += skeleton.skel skelrc.skel
+
+###--------------------------------------------------------------------------
+### Making releases.
+
+EXTRA_DIST             += config/auto-version config/confsubst
+
+dist-hook::
+       echo $(VERSION) >$(distdir)/RELEASE
+
+###--------------------------------------------------------------------------
+### Debian.
+
+EXTRA_DIST             += debian/control debian/copyright
+EXTRA_DIST             += debian/changelog debian/rules
+
+EXTRA_DIST             += debian/skel.emacsen-install
+EXTRA_DIST             += debian/skel.emacsen-remove
+EXTRA_DIST             += debian/skel.emacsen-startup
+
+###----- That's all, folks --------------------------------------------------