diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-06-03 21:03:00 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-06-03 21:03:00 +0100 |
commit | d85dfdf8d7b0f2769d824fd4994eccec55db963a (patch) | |
tree | 93afba26310a300fe834ed5a74258ba0353fc862 /reproduce/software/make/build-rules.mk | |
parent | fc9bdf8d3793ffdb4168ca5c5c7ed97bbd5ab036 (diff) | |
parent | a69f2ce5624b0b683b793a2f4cb68c7023458f15 (diff) |
Imported recent updated in Maneage, minor conflict fixed
The minor conflict was with 'reproduce/software/make/high-level.mk', and in
particular because we implemented the fix to Maneage's Task #15664 in this
project first. After it was moved to the main Maneage branch some minor
stylistic corrections were done to it, thus causing the conflict. To
resolve the conflict, I simply imported the full Maneage version of the
file with this command:
git checkout maneage -- reproduce/software/make/high-level.mk
The other conflicts were due to the deleted files (that were resolved as
described in 'README-hacking.md') and the LaTeX files that I had told
'.gitattributes' to ignore from the Maneage branch.
Diffstat (limited to 'reproduce/software/make/build-rules.mk')
-rw-r--r-- | reproduce/software/make/build-rules.mk | 61 |
1 files changed, 45 insertions, 16 deletions
diff --git a/reproduce/software/make/build-rules.mk b/reproduce/software/make/build-rules.mk index 8d78ce3..260ded8 100644 --- a/reproduce/software/make/build-rules.mk +++ b/reproduce/software/make/build-rules.mk @@ -5,15 +5,18 @@ # # Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> # -# This Makefile is part of Maneage. Maneage 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 3 of the License, or (at your option) any later version. +# This Makefile 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 3 of the License, or +# (at your option) any later version. # -# Maneage 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. See <http://www.gnu.org/licenses/>. +# This Makefile 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 this Makefile. If not, see <http://www.gnu.org/licenses/>. @@ -31,6 +34,31 @@ +# Unpack a tarball in the current directory. The issue is that until we +# install GNU Tar within Maneage, we have to use the host's Tar +# implementation and in some cases, they don't recognize '.lz'. +uncompress = csuffix=$$(echo $$tarball \ + | sed -e's/\./ /g' \ + | awk '{print $$NF}'); \ + if [ x$$csuffix = xlz ]; then \ + intarrm=1; \ + intar=$$(echo $$tarball | sed -e's/.lz//'); \ + lzip -c -d $$tarball > $$intar; \ + else \ + intarrm=0; \ + intar=$$tarball; \ + fi; \ + if tar xf $$intar; then \ + if [ x$$intarrm = x1 ]; then rm $$intar; fi; \ + else \ + echo; echo "Tar error"; exit 1; \ + fi + + + + + + # GNU Build system # ---------------- # @@ -55,13 +83,13 @@ gbuild = if [ x$(static_build) = xyes ] && [ "x$(2)" = xstatic ]; then \ fi; \ check="$(5)"; \ if [ x"$$check" = x ]; then check="echo Skipping-check"; fi; \ - cd $(ddir); rm -rf $(1); \ + cd $(ddir); \ + rm -rf $(1); \ if [ x"$$gbuild_tar" = x ]; then \ - tarball=$(word 1,$(filter $(tdir)/%,$|)); \ + tarball=$(word 1,$(filter $(tdir)/%,$^)); \ else tarball=$$gbuild_tar; \ fi; \ - if ! tar xf $$tarball; then \ - echo; echo "Tar error"; exit 1; fi; \ + $(call uncompress); \ cd $(1); \ \ if [ x"$(strip $(6))" = x ]; then confscript=./configure; \ @@ -111,10 +139,11 @@ cbuild = if [ x$(static_build) = xyes ] && [ $(2)x = staticx ]; then \ export LDFLAGS="$$LDFLAGS -static"; \ opts="-DBUILD_SHARED_LIBS=OFF"; \ fi; \ - cd $(ddir) \ - && rm -rf $(1) \ - && tar xf $(word 1,$(filter $(tdir)/%,$|)) \ - && cd $(1) \ + tarball=$(word 1,$(filter $(tdir)/%,$^)); \ + cd $(ddir); \ + rm -rf $(1); \ + $(call uncompress); \ + cd $(1) \ && rm -rf project-build \ && mkdir project-build \ && cd project-build \ |