From dc9339b5699ee3b0d48145a1389f93e9e09d02a6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 30 Jan 2017 14:46:36 -0500 Subject: Update and tidy the build system for autothing v3. --- config.mk | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'config.mk') diff --git a/config.mk b/config.mk index 69a1bb9..0d564e0 100644 --- a/config.mk +++ b/config.mk @@ -2,16 +2,15 @@ # indicate what the GNU standards dictate, when our values # differ. We're not a GNU package. -ifeq ($(topsrcdir),) +ifeq ($(origin topsrcdir),undefined) +topsrcdir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) +topoutdir := $(topsrcdir) -topoutdir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) -topsrcdir := $(topoutdir) - -MAKEFLAGS += --warn-undefined-variables -include $(topsrcdir)/build-aux/no-builtin-variables.mk +# In case .srcversion-libretools.mk hasn't been generated yet. +LIBRETOOLS_VERSION ?= 0 PACKAGE = libretools -VERSION = $(firstword $(LIBRETOOLS_VERSION) 0) +VERSION = $(LIBRETOOLS_VERSION) DESTDIR = @@ -35,4 +34,6 @@ RONNFLAGS = --manual='libretools Manual' --organization='Parabola' TESTENVFLAGS ?= +.LIBPATTERNS ?= + endif -- cgit v1.2.2