diff options
Diffstat (limited to 'build-aux/Makefile.once.tail')
-rw-r--r-- | build-aux/Makefile.once.tail/00-dist.mk | 28 | ||||
-rw-r--r-- | build-aux/Makefile.once.tail/10-sd.mk | 48 |
2 files changed, 59 insertions, 17 deletions
diff --git a/build-aux/Makefile.once.tail/00-dist.mk b/build-aux/Makefile.once.tail/00-dist.mk new file mode 100644 index 0000000000..a890d9d6dc --- /dev/null +++ b/build-aux/Makefile.once.tail/00-dist.mk @@ -0,0 +1,28 @@ +# Copyright (C) 2015-2016 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/>. + +_dist.copyfile = $(MKDIR_P) $(dir $2) && $(CP) -T $1 $2 +_dist.addfile = $(call _dist.copyfile,$3,$2/$(call at.relto,$1,$3)) +$(topoutdir)/$(dist.pkgname)-$(dist.version): $(_dist.files) + $(RM) -r $@ $(@D)/.tmp.$(@F) + $(MKDIR) $(@D)/.tmp.$(@F) + $(foreach f,$^,$(call _dist.addfile,$(topsrcdir),$(@D)/.tmp.$(@F),$f)$(at.nl)) + $(MV) $(@D)/.tmp.$(@F) $@ || $(RM) -r $(@D)/.tmp.$(@F) + +# TODO: The tar rule isn't reproducible, it should be. +$(topoutdir)/$(dist.pkgname)-$(dist.version).tar: %.tar: % + $(TAR) cf $@ -C $(<D) $(<F) +$(topoutdir)/$(dist.pkgname)-$(dist.version).tar.gz: %.gz: % + $(GZIP) $(GZIPFLAGS) < $< > $@ diff --git a/build-aux/Makefile.once.tail/10-sd.mk b/build-aux/Makefile.once.tail/10-sd.mk index 7df79c0364..66ff8d3a09 100644 --- a/build-aux/Makefile.once.tail/10-sd.mk +++ b/build-aux/Makefile.once.tail/10-sd.mk @@ -20,8 +20,24 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk -include $(topsrcdir)/build-aux/Makefile.head.mk + +_sd.autogen_files = aclocal.m4 automake.mk.in config.h.in configure po/Makefile.in.in +# `$*`/`%` had better be $(topsrcdir), but we can't enforce that +$(addprefix %/,$(_sd.autogen_files)): %/configure.ac %/autogen.sh + cd $(topsrcdir) && ./autogen.sh + +config_files = config.mk automake.mk autoconf.mk gnustandards.mk po/Makefile.in +config_headers = config.h +config_commands = depfiles libtool po/stamp-it +$(topoutdir)/config.status: $(topsrcdir)/configure + cd $(topoutdir) && ./config.status --recheck +$(addprefix $(topoutdir)/,$(config_files)): $(topoutdir)/%: $(topoutdir)/config.status $(topsrcdir)/%.in + cd $(topoutdir) && ./config.status --file=$* +$(addprefix $(topoutdir)/,$(config_headers)): $(topoutdir)/%: $(topoutdir)/%.stamp +$(foreach f,$(config_headers),$(topoutdir)/$f.stamp): $(topoutdir)/%.stamp: $(topoutdir)/config.status $(topsrcdir)/%.in + cd $(topoutdir) && ./config.status --header=$* + test -f $(topoutdir)/$* + touch $@ # Let's run all tests of the test suite, but under valgrind. Let's # exclude perl/python/shell scripts we have in there @@ -35,21 +51,21 @@ valgrind-tests: $(TESTS) x="\n\n"; \ done -exported-%: % - $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@ +# exported-%: % +# $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@ -exported: $(addprefix exported-, $(lib_LTLIBRARIES)) - $(AM_V_GEN)sort -u $^ > $@ +# exported: $(addprefix exported-, $(lib_LTLIBRARIES)) +# $(AM_V_GEN)sort -u $^ > $@ -.PHONY: check-api-docs -check-api-docs: exported man - $(AM_V_GEN)for symbol in `cat exported` ; do \ - if test -f $(builddir)/man/$$symbol.html ; then \ - echo " Symbol $$symbol() is documented." ; \ - else \ - echo "‣ Symbol $$symbol() lacks documentation." ; \ - fi ; \ - done +# .PHONY: check-api-docs +# check-api-docs: exported man +# $(AM_V_GEN)for symbol in `cat exported` ; do \ +# if test -f $(builddir)/man/$$symbol.html ; then \ +# echo " Symbol $$symbol() is documented." ; \ +# else \ +# echo "‣ Symbol $$symbol() lacks documentation." ; \ +# fi ; \ +# done OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES)) ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v))) @@ -94,5 +110,3 @@ list-keys: add-key: gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import - - -include $(topsrcdir)/build-aux/Makefile.tail.mk |