chiark / gitweb /
build, debian/: Add a `configure' script to make things easier.
[preload-hacks] / Make.rules
similarity index 95%
rename from Makefile
rename to Make.rules
index b77af1d723faf6dbbbc108ae2bd8b21f5a335cd5..412992848f9aca0f74851dae6b461b65799b9516 100644 (file)
--- a/Makefile
@@ -23,7 +23,7 @@
 ### with preload-hacks; if not, write to the Free Software Foundation, Inc.,
 ### 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-srcdir                  = .
+srcdir                 ?= .
 PACKAGE                         = preload-hacks
 VERSION                        := $(shell cd $(srcdir) && ./auto-version)
 
@@ -114,7 +114,8 @@ distdir                      = $(PACKAGE)-$(VERSION)
 DISTTAR                         = $(distdir).tar.gz
 
 ## Distribute the build utilities.
-DISTFILES              += Makefile
+DISTFILES              += Make.rules
+DISTFILES              += configure
 DISTFILES              += auto-version
 
 ## Documentation.
@@ -205,10 +206,10 @@ distcheck: dist
        +cd _distcheck && \
        tar xvfz ../$(DISTTAR) && \
        mkdir _build && cd _build && \
-       make -f../$(distdir)/Makefile srcdir=../$(distdir) && \
-       make -f../$(distdir)/Makefile srcdir=../$(distdir) \
-               install DESTDIR=../_install && \
-       make -f../$(distdir)/Makefile srcdir=../$(distdir) dist
+       ../$(distdir)/configure && \
+       make && \
+       make install DESTDIR=../_install && \
+       make dist
        rm -rf _distcheck
 
 ###----- That's all, folks --------------------------------------------------