diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-30 14:46:36 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-30 18:54:01 -0500 |
commit | dc9339b5699ee3b0d48145a1389f93e9e09d02a6 (patch) | |
tree | ed71bd691ea6e0d05d47e2bfd891c333bf5709ab /build-aux | |
parent | 4f9203808ef9607ae27eba3cf77079bbe661fd95 (diff) |
Update and tidy the build system for autothing v3.
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/Makefile.each.head/20-libretools.mk | 59 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/20-libretools.mk | 68 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/00-libretools.mk | 142 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/20-libretools.mk | 83 | ||||
-rw-r--r-- | build-aux/no-builtin-variables.mk | 15 |
5 files changed, 209 insertions, 158 deletions
diff --git a/build-aux/Makefile.each.head/20-libretools.mk b/build-aux/Makefile.each.head/20-libretools.mk index 90e9bda..20abd8b 100644 --- a/build-aux/Makefile.each.head/20-libretools.mk +++ b/build-aux/Makefile.each.head/20-libretools.mk @@ -1,35 +1,40 @@ +# Copyright (C) 2017 Luke Shumaker +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + pkgconfdir = $(sysconfdir)/libretools.d pkgdocdir = $(docdir)/libretools pkglibexecdir = $(libexecdir)/libretools -# Detect things about the directory we're in #################################### - -srcfiles-ignore/$(srcdir) = $(addsuffix /%,$(at.subdirs/$(@D))) - -ifeq ($(wildcard $(topsrcdir)/.git),) -include $(srcdir)/.srcfiles.mk -else -$(srcdir)/.srcfiles.mk: FORCE - @echo srcfiles = $(filter-out $(srcfiles-ignore/$(@D)),$(shell cd $(@D) && git ls-files)) | $(WRITE_IFCHANGED) $@ --include $(srcdir)/.srcfiles.mk -endif +# Auto-detect ######################################################## -detect-ignore = -detect-ignore-exec = -detect-ignore-conf = -detect-ignore-ronn = -detect-ignore-md = HACKING.md -detect-ignore-sh = +libretools.src.devtools = -devtools-files = +libretools.out.mans = $(patsubst %.ronn,%,$(libretools.src.ronn)) +libretools.out.bins = $(libretools.src.exec) +libretools.out.libexecs = +libretools.out.libs = $(libretools.src.sh) +libretools.out.docs = $(libretools.src.md) +libretools.out.confs = $(libretools.src.conf) -libretools-srcs = $(detect-all) -libretools-mans = $(patsubst %.ronn,%,$(detect-ronn)) -libretools-bins = $(detect-exec) -libretools-libexecs = -libretools-libs = $(detect-sh) -libretools-docs = $(detect-md) $(detect-ronn) -libretools-confs = $(detect-conf) +libretools.out = $(libretools.out.mans) +libretools.out += $(libretools.out.bins) +libretools.out += $(libretools.out.libexecs) +libretools.out += $(libretools.out.libs) +libretools.out += $(libretools.out.docs) +libretools.out += $(libretools.out.confs) -libretools-files = $(libretools-mans) $(libretools-bins) $(libretools-libexecs) $(libretools-libs) $(libretools-docs) $(libretools-confs) -pots = $(libretools-bins) $(libretools-libexecs) $(libretools-libs) +libretools.pots = $(libretools.out.bins) +libretools.pots += $(libretools.out.libexecs) +libretools.pots += $(libretools.out.libs) diff --git a/build-aux/Makefile.each.tail/20-libretools.mk b/build-aux/Makefile.each.tail/20-libretools.mk index 0b74d41..c498396 100644 --- a/build-aux/Makefile.each.tail/20-libretools.mk +++ b/build-aux/Makefile.each.tail/20-libretools.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2015, 2016 Luke Shumaker +# Copyright (C) 2015-2017 Luke Shumaker # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -13,40 +13,41 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -ifneq ($(sort $(wildcard $(addprefix $(srcdir)/,$(devtools-files)))),$(sort $(addprefix $(srcdir)/,$(devtools-files)))) +ifneq ($(sort $(wildcard $(addprefix $(srcdir)/,$(libretools.src.devtools)))),$(sort $(addprefix $(srcdir)/,$(libretools.src.devtools)))) ifeq ($(wildcard $(devtoolsdir)/),) $(error config.mk:devtoolsdir points to a non-existant directory: $(devtoolsdir)) endif endif -std.src_files += $(libretools-srcs) -std.gen_files += .srcfiles.mk $(devtools-files) -std.out_files += $(filter-out $(std.src_files) $(std.gen_files),$(libretools-files)) \ - $(if $(pots),everything.pot) -std.sys_files += $(addprefix $(bindir)/,$(libretools-bins)) \ - $(addprefix $(pkgconfdir)/,$(libretools-confs)) \ - $(addprefix $(pkglibexecdir)/,$(libretools-libexecs) $(libretools-libs)) \ - $(addprefix $(pkgdocdir)/,$(libretools-docs)) \ - $(addprefix $(mandir)/man1/,$(filter %.1,$(libretools-mans))) \ - $(addprefix $(mandir)/man2/,$(filter %.2,$(libretools-mans))) \ - $(addprefix $(mandir)/man3/,$(filter %.3,$(libretools-mans))) \ - $(addprefix $(mandir)/man4/,$(filter %.4,$(libretools-mans))) \ - $(addprefix $(mandir)/man5/,$(filter %.5,$(libretools-mans))) \ - $(addprefix $(mandir)/man6/,$(filter %.6,$(libretools-mans))) \ - $(addprefix $(mandir)/man7/,$(filter %.7,$(libretools-mans))) \ - $(addprefix $(mandir)/man8/,$(filter %.8,$(libretools-mans))) -std.clean_files += *.pot *.ugly *.rej *.orig .tmp* - -exec_$(outdir) := $(exec_$(outdir)) $(libretools-bins) $(libretools-libexecs) - -_is_executable = $(filter $(exec_$(@D)),$(@F)) +# Connect with `files` module ######################################## +files.src.gen += $(libretools.src.devtools) +files.out.all += $(filter-out $(files.src),$(libretools.out)) \ + $(if $(libretools.pots),everything.pot) +files.sys.all += $(addprefix $(bindir)/,$(libretools.out.bins)) \ + $(addprefix $(pkgconfdir)/,$(libretools.out.confs)) \ + $(addprefix $(pkglibexecdir)/,$(libretools.out.libexecs) $(libretools.out.libs)) \ + $(addprefix $(pkgdocdir)/,$(libretools.out.docs)) \ + $(addprefix $(mandir)/man1/,$(filter %.1,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man2/,$(filter %.2,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man3/,$(filter %.3,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man4/,$(filter %.4,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man5/,$(filter %.5,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man6/,$(filter %.6,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man7/,$(filter %.7,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man8/,$(filter %.8,$(libretools.out.mans))) +files.out.int += *.pot *.ugly *.rej *.orig +# Generate rules ##################################################### $(srcdir)/%.in: $(devtoolsdir)/%.in cp -T '$<' '$@' $(srcdir)/%.in: $(devtoolsdir)/lib/% cp -T '$<' '$@' + +# Build rules ######################################################## +_is_executable = $(filter $(libretools.out.bins) $(libretools.out.libexecs),$(@F)) + $(outdir)/%: $(srcdir)/%.in - @echo 'EDIT < $< > $@'; $(edit) < '$<' | install -T -m$(if $(_is_executable),755,644) /dev/stdin '$@' + @echo 'EDIT < $< > $@'; $(libretools.edit) < '$<' | install -T -m$(if $(_is_executable),755,644) /dev/stdin '$@' $(outdir)/%: $(srcdir)/%.ronn ronn --roff $(RONNFLAGS) < '$<' > '$@' $(outdir)/%.html: $(srcdir)/%.ronn @@ -55,19 +56,20 @@ $(outdir)/%.pot: $(outdir)/% $(topsrcdir)/src/lib/librexgettext $(topsrcdir)/src/lib/librexgettext $(LIBREXGETTEXT_FLAGS) '$<' > '$@' $(outdir)/%.pot: $(srcdir)/% $(topsrcdir)/src/lib/librexgettext $(topsrcdir)/src/lib/librexgettext $(LIBREXGETTEXT_FLAGS) '$<' > '$@' -$(outdir)/everything.pot: $(addprefix $(outdir)/,$(addsuffix .pot,$(pots))) - cat $^ | $(pofmt) > '$@' +$(outdir)/everything.pot: $(addprefix $(outdir)/,$(addsuffix .pot,$(libretools.pots))) + cat $^ | $(libretools.pofmt) > '$@' # If we have a .patch file, the flow is: # $(devtoolsdir)/%.in -> %.in + %.patch -> %.ugly -> % -_do_patch = $(filter $(patsubst %.patch,%,$(filter %.patch,$(detect-all))),$(patsubst %.in,%,$(devtools-files))) +_do_patch = $(filter $(patsubst %.patch,%,$(filter %.patch,$(libretools.src.git))),$(patsubst %.in,%,$(libretools.src.devtools))) $(outdir)/%.ugly: $(srcdir)/%.in $(srcdir)/%.patch cp -T $< $@ patch $@ $(<D)/$*.patch $(sort $(addprefix $(outdir)/,$(_do_patch))): $(outdir)/%: $(outdir)/%.ugly - @echo 'EDIT < $< > $@'; $(edit) < '$<' | install -T -m$(if $(_is_executable),755,644) /dev/stdin '$@' - @echo 'INDENT $@'; $(call indent,$@) - + @echo 'EDIT < $< > $@'; $(libretools.edit) < '$<' | install -T -m$(if $(_is_executable),755,644) /dev/stdin '$@' + @echo 'INDENT $@'; $(call libretools.indent,$@) + +# Install rules ###################################################### $(DESTDIR)$(pkgconfdir)/% : $(outdir)/% ; install -T -Dm644 '$<' '$@' $(DESTDIR)$(pkgdocdir)/% : $(outdir)/% ; install -T -Dm644 '$<' '$@' $(DESTDIR)$(mandir)/man1/%.1: $(outdir)/%.1; install -T -Dm644 '$<' '$@' @@ -78,12 +80,12 @@ $(DESTDIR)$(mandir)/man5/%.5: $(outdir)/%.5; install -T -Dm644 '$<' '$@' $(DESTDIR)$(mandir)/man6/%.6: $(outdir)/%.6; install -T -Dm644 '$<' '$@' $(DESTDIR)$(mandir)/man7/%.7: $(outdir)/%.7; install -T -Dm644 '$<' '$@' $(DESTDIR)$(mandir)/man8/%.8: $(outdir)/%.8; install -T -Dm644 '$<' '$@' -$(DESTDIR)$(pkglibexecdir)/%: $(outdir)/% ; mkdir -p '$(@D)' && cp -T '$<' '$@' +$(DESTDIR)$(pkglibexecdir)/%: $(outdir)/% ; $(MKDIR_P) '$(@D)' && cp -T '$<' '$@' $(DESTDIR)$(bindir)/% : $(outdir)/% ; install -T -Dm755 '$<' '$@' # Repeat the last two rules again with explicit targets because # otherwise it would try to do src/xbs->/bin/xbs instead of # src/xbs/xbs->/bin/xbs -ifneq ($(filter $(notdir $(outdir)),$(libretools-files)),) -$(DESTDIR)$(pkglibexecdir)/$(notdir $(outdir)): $(DESTDIR)$(pkglibexecdir)/%: $(outdir)/% ; mkdir -p '$(@D)' && cp -T '$<' '$@' +ifneq ($(filter $(notdir $(outdir)),$(libretools.out)),) +$(DESTDIR)$(pkglibexecdir)/$(notdir $(outdir)): $(DESTDIR)$(pkglibexecdir)/%: $(outdir)/% ; $(MKDIR_P) '$(@D)' && cp -T '$<' '$@' $(DESTDIR)$(bindir)/$(notdir $(outdir)): $(DESTDIR)$(bindir)/% : $(outdir)/% ; install -T -Dm755 '$<' '$@' endif diff --git a/build-aux/Makefile.once.head/00-libretools.mk b/build-aux/Makefile.once.head/00-libretools.mk new file mode 100644 index 0000000..8497d68 --- /dev/null +++ b/build-aux/Makefile.once.head/00-libretools.mk @@ -0,0 +1,142 @@ +# Copyright (C) 2015, 2017 Luke Shumaker +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +mod.libretools.description = (libretools) build rules +define mod.libretools.doc +# Inputs: +# - Install paths (Directory variables): +# - `pkgconfdir = $(sysconfdir)/libretools.d` +# - `pkgdocdir = $(docdir)/libretools` +# - `pkglibexecdir = $(libexecdir)/libretools` +# - Outputs (Directory variables): +# - `libretools.out.mans` +# - `libretools.out.bins` +# - `libretools.out.libexecs` +# - `libretools.out.libs` +# - `libretools.out.docs` +# - `libretools.out.confs` +# - `libretools.out` +# - Misc (Directory variables): +# - `libretools.src.devtools` +# - `libretools.pots` +# Outputs: +# - Autothing module configuration (Global variables): +# - `gitfiles.file` +# - `var` +# - Shell commands (Global variables) +# - `libretools.edit` +# - `libretools.indent` +# - `libretools.pofmt` +# - Source information +# - Directory variable : `libretools.src` +# - Directory variable : `libretools.src.exec` +# - Directory variable : `libretools.src.conf` +# - Directory variable : `libretools.src.ronn` +# - Directory variable : `libretools.src.md` +# - Directory variable : `libretools.src.sh` +# - File : `$(topsrcdir)/.srcversion-libretools.mk` +# - Global variable : `LIBRETOOLS_VERSION` +# - Global variable : `LIBRETOOLS_COMMIT` +# - File : `$(topsrcdir)/.srcversion-devtools.mk` +# - Global variable : `DEVTOOLS_VERSION` +# - Global variable : `DEVTOOLS_COMMIT` +# - Primary outputs: +# - Directory variable : `files.src.gen` +# - Directory variable : `files.out.all` +# - Directory variable : `files.sys.all` +# - Directory variable : `files.out.int` +# - Target : `$(srcdir)/%.in: $(devtoolsdir)/%.in` +# - Target : `$(outdir)/%: $(srcdir)/%.in` +# - Target : `$(outdir)/% : $(srcdir)/%.ronn` +# - Target : `$(outdir)/%.html: $(srcdir)/%.ronn` +# - Target : `$(outdir)/%.pot: $(outdir)/%` +# - Target : `$(outdir)/%.pot: $(srcdir)/%` +# - Target : `$(outdir)/everything.pot` +# - Target : `$(outdir)/%.ugly: $(srcdir)/%.in $(srcdir)/%.patch` +# - Target : `$(outdir)/%: $(outdir)/%.ugly +# - Target : `$(DESTDIR)...:` +# Misc: +# - Variable: `LIBREXGETTEXT_FLAGS` +endef +mod.quote.doc := $(value mod.quote.doc) + +# Configure how Make works ########################################### +.SECONDARY: +.DELETE_ON_ERROR: + +# Configure how Autothing modules work ############################### +gitfiles.file = .srcfiles.mk + +# Boilerplate ######################################################## +.PHONY: FORCE + +# Commands ########################################################### + +# Usage: <INPUT $(libretools.edit) >OUTPUT +# Expand m4_include macros to use librelib +# This is used when using sources grabbed from devtools +# Magic for doing @variable@ replacement in files +libretools.edit = sed \ + -e 's|^\#!\s*/bin/bash|\#!/usr/bin/env bash|' \ + -e 's|m4_include(lib/\(.*\))|. "$$(librelib \1)"|' \ + $(foreach v,$(patsubst $(var.)%,%,$(filter $(var.)%,$^)), -e 's|@$(v)@|$($(v))|g' ) + +# Usage: $(call libretools.indent,FILENAME) +# Command to auto-indent a file. +libretools.indent = emacs --batch $1 \ + --eval '(setq make-backup-files nil)' \ + --eval '(setq sh-basic-offset 8)' \ + --eval '(defun sh-smie-sh-rules--fix (args) "fix bug in Emacs 24 sh-script.el" (if (equal args (list :after "then")) (list :after "if") args))' \ + --eval "(advice-add 'sh-smie-sh-rules :filter-args \#'sh-smie-sh-rules--fix)" \ + --eval '(indent-region (point-min) (point-max) nil)' \ + -f save-buffer &>/dev/null + +# Usage <INPUT $(libretools.pofmt) >OUTPUT +# Normalize a .po(t) file +libretools.pofmt = msguniq -Fi --to-code=UTF-8 + +# Auto-detect ######################################################## + +# It's easy to think of these as "each" variables, but because they +# will be evaluated on demand, only files.src.src needs to be "each". +libretools.src.git = $(files.src.src) +libretools.src.exec = $(patsubst $(srcdir)/%,%,$(shell find $(addprefix $(srcdir)/,$(libretools.src.git)) -executable 2>/dev/null)) +libretools.src.conf = $(filter %.conf,$(libretools.src.git)) +libretools.src.sh = $(filter %.sh ,$(libretools.src.git)) +libretools.src.ronn = $(filter %.ronn,$(libretools.src.git)) +libretools.src.md = $(filter-out HACKING.md,$(filter %.ronn %.md,$(libretools.src.git))) + +LIBREXGETTEXT_FLAGS ?= + +# Git Version ######################################################## + +-include $(topsrcdir)/.srcversion-libretools.mk +-include $(topsrcdir)/.srcversion-devtools.mk + +ifneq ($(wildcard $(topsrcdir)/.git),) +$(topsrcdir)/.srcversion-libretools.mk: FORCE + @{ \ + echo LIBRETOOLS_VERSION = $(patsubst v%,%,$(shell cd $(topsrcdir) && git describe --tags)); \ + echo LIBRETOOLS_COMMIT = $(shell cd $(topsrcdir) && git rev-parse HEAD); \ + :; } | $(WRITE_IFCHANGED) $@ +endif + +ifneq ($(wildcard $(devtoolsdir)/.git),) +$(topsrcdir)/.srcversion-devtools.mk: FORCE + @{ \ + echo DEVTOOLS_VERSION = $(patsubst libretools-%,%,$(shell cd $(devtoolsdir) && git describe --tags)); \ + echo DEVTOOLS_COMMIT = $(shell cd $(devtoolsdir) && git rev-parse HEAD); \ + :; } | $(WRITE_IFCHANGED) $@ +endif diff --git a/build-aux/Makefile.once.head/20-libretools.mk b/build-aux/Makefile.once.head/20-libretools.mk deleted file mode 100644 index d7c3b0e..0000000 --- a/build-aux/Makefile.once.head/20-libretools.mk +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright (C) 2015 Luke Shumaker -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# Configure how Make works -MAKEFLAGS += --no-builtin-rules --no-builtin-variables -.SECONDARY: -.DELETE_ON_ERROR: - -.PHONY: FORCE - -# Magic for tracking variables that affect files. If a file changes -# based on a variable, just stick $(var)VARNAME as a dependency. -var = $(call at.path,$(topoutdir)/.var.) -$(var)%: FORCE - @printf '%s' '$($*)' | $(WRITE_IFCHANGED) $@ - -# Usage: <INPUT $(edit) >OUTPUT -# Expand m4_include macros to use librelib -# This is used when using sources grabbed from devtools -# Magic for doing @variable@ replacement in files -edit = sed \ - -e 's|^\#!\s*/bin/bash|\#!/usr/bin/env bash|' \ - -e 's|m4_include(lib/\(.*\))|. "$$(librelib \1)"|' \ - $(foreach v,$(patsubst $(var)%,%,$(filter $(var)%,$^)), -e 's|@$(v)@|$($(v))|g' ) - -# Usage: $(call indent,FILENAME) -# Command to auto-indent a file. -indent = emacs --batch $1 \ - --eval '(setq make-backup-files nil)' \ - --eval '(setq sh-basic-offset 8)' \ - --eval '(defun sh-smie-sh-rules--fix (args) "fix bug in Emacs 24 sh-script.el" (if (equal args (list :after "then")) (list :after "if") args))' \ - --eval "(advice-add 'sh-smie-sh-rules :filter-args \#'sh-smie-sh-rules--fix)" \ - --eval '(indent-region (point-min) (point-max) nil)' \ - -f save-buffer &>/dev/null - -# Usage <INPUT $(pofmt) >OUTPUT -# Normalize a .po(t) file -pofmt = msguniq -Fi --to-code=UTF-8 - -# It's easy to think of these as "each" variables, but because they -# will be evaluated on demand, only std.src_files needs to be "each". -detect-all = $(filter-out $(detect-ignore) ,$(srcfiles)) -detect-exec = $(filter-out $(detect-ignore-exec),$(patsubst $(srcdir)/%,%,$(shell find $(addprefix $(srcdir)/,$(detect-all)) -executable))) -detect-conf = $(filter-out $(detect-ignore-conf),$(filter %.conf ,$(detect-all))) -detect-ronn = $(filter-out $(detect-ignore-ronn),$(filter %.ronn ,$(detect-all))) -detect-md = $(filter-out $(detect-ignore-md) ,$(filter %.ronn %.md,$(detect-all))) -detect-sh = $(filter-out $(detect-ignore-sh) ,$(filter %.sh ,$(detect-all))) - -LIBREXGETTEXT_FLAGS ?= - -ifeq ($(wildcard $(topsrcdir)/.git),) -include $(topsrcdir)/.srcversion-libretools.mk -else -$(topsrcdir)/.srcversion-libretools.mk: FORCE - @{ \ - echo LIBRETOOLS_VERSION = $(patsubst v%,%,$(shell cd $(topsrcdir) && git describe --tags)); \ - echo LIBRETOOLS_COMMIT = $(shell cd $(topsrcdir) && git rev-parse HEAD); \ - :; } | $(WRITE_IFCHANGED) $@ --include $(topsrcdir)/.srcversion-libretools.mk -endif - -ifeq ($(wildcard $(devtoolsdir)/.git),) -include $(topsrcdir)/.srcversion-devtools.mk -else -$(topsrcdir)/.srcversion-devtools.mk: FORCE - @{ \ - echo DEVTOOLS_VERSION = $(patsubst libretools-%,%,$(shell cd $(devtoolsdir) && git describe --tags)); \ - echo DEVTOOLS_COMMIT = $(shell cd $(devtoolsdir) && git rev-parse HEAD); \ - :; } | $(WRITE_IFCHANGED) $@ --include $(topsrcdir)/.srcversion-devtools.mk -endif diff --git a/build-aux/no-builtin-variables.mk b/build-aux/no-builtin-variables.mk deleted file mode 100644 index c3aef58..0000000 --- a/build-aux/no-builtin-variables.mk +++ /dev/null @@ -1,15 +0,0 @@ -MAKEFLAGS += --no-builtin-variables - -# This version is more correct, but is slower: -# $(foreach v,$(shell bash -c 'comm -23 <(env -i $(MAKE) -f - <<<"\$$(info \$$(.VARIABLES))all:"|sed "s/ /\n/g"|sort) <(env -i $(MAKE) -R -f - <<<"\$$(info \$$(.VARIABLES))all:"|sed "s/ /\n/g"|sort)'), -# $(if $(filter default,$(origin $v)),$(eval undefine $v))) - -_default_variables = $(foreach v,$(.VARIABLES),$(if $(filter default,$(origin $v)),$v)) -$(foreach v,$(filter-out .% MAKE% SUFFIXES,$(_default_variables))\ - $(filter .LIBPATTERNS MAKEINFO,$(_default_variables)),\ - $(eval undefine $v)) -undefine _default_variables - -# Because Make uses .LIBPATTERNS internally, it should always be -# defined in case --warn-undefined-variables -.LIBPATTERNS ?= |