Skip to content
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.

Commit

Permalink
Squashed 'tools/' changes from dde4119..d8ccc39
Browse files Browse the repository at this point in the history
d8ccc39 cmake download path fixed
25561a5 package creation script a bit more friendly
921ebbe libmakefile update to 98c93280becf4836c3ebbd1ad6009f78b3298fb1
e967c17 open source package version updates: CMAKE_VERSION="3.9.3" COREUTILS_VERSION="8.28" FASM_VERSION="1.71.64" MPFR_VERSION="3.1.6"
fa1759d libmakefile sync'd to 18076e48d76d7c64b43afae13a1e6fea08f5c92c

git-subtree-dir: tools
git-subtree-split: d8ccc39370f0267c55d9331732d39d23ba97d7ae
  • Loading branch information
kozyilmaz committed Oct 7, 2017
1 parent d7d3555 commit 668b899
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 44 deletions.
4 changes: 2 additions & 2 deletions cmake/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ target_name ?= cmake

include ../Makefile.build

CMAKE_VERSION="3.8.2"
CMAKE_VERSION="3.9.3"

cmake_clone:
if [ ! -f "cmake-$(CMAKE_VERSION).tar.gz" ]; then curl -OL https://cmake.org/files/v3.8/cmake-$(CMAKE_VERSION).tar.gz; fi;
if [ ! -f "cmake-$(CMAKE_VERSION).tar.gz" ]; then curl -OL https://cmake.org/files/v3.9/cmake-$(CMAKE_VERSION).tar.gz; fi;
if [ ! -d "cmake-$(CMAKE_VERSION)" ]; then tar xzf cmake-$(CMAKE_VERSION).tar.gz; fi

cmake_config:
Expand Down
2 changes: 1 addition & 1 deletion coreutils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target_name ?= coreutils

include ../Makefile.build

COREUTILS_VERSION="8.27"
COREUTILS_VERSION="8.28"

coreutils_clone:
if [ ! -f "coreutils-$(COREUTILS_VERSION).tar.xz" ]; then curl -OL https://ftp.gnu.org/gnu/coreutils/coreutils-$(COREUTILS_VERSION).tar.xz; fi;
Expand Down
2 changes: 1 addition & 1 deletion fasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target_name ?= fasm

include ../Makefile.build

FASM_VERSION="1.71.63"
FASM_VERSION="1.71.64"

fasm_clone:
if [ ! -f "fasm-$(FASM_VERSION).tar.gz" ]; then curl -OL https://flatassembler.net/fasm-$(FASM_VERSION).tar.gz; fi;
Expand Down
45 changes: 23 additions & 22 deletions libmakefile/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
# 20170401 - add .o as suffix
# 20170407 - depends-y file gen fix
# 20170425 - directory with space fix
# 20170927 - cflags for .c, cxxflags for .cpp

#
# Example
Expand Down Expand Up @@ -399,47 +400,47 @@ disp_distclean = $($(verbose)_disp_distclean)
#
# _CMD
#
_cmd_depend.c = $(CC) $(CFLAGS) $(CXXFLAGS) $($1_cflags) $($1_cxxflags) \
_cmd_depend.c = $(CC) $(CFLAGS) $($1_cflags) \
$($1_includes) -M $$< | $(SED) 's,\($$*\.o\) *:,.$1/\1 \
$$@: ,' > $$@; \
$(CP) $$@ $$@.p; \
$(SED) -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$$$//' -e '/^$$$$/ d' -e 's/$$$$/ :/' < $$@ >> $$@.p; \
$(MV) $$@.p $$@
_cmd_compile.c = $(CC) $(CFLAGS) $(CXXFLAGS) $($1_cflags) $($1_cxxflags) \
$($1_includes) $$($1_$$<_cflags-y) $$($1_$$<_cxxflags-y) -c -o $$@ $$<
_cmd_link.c = $(CC) $(CFLAGS) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
_cmd_compile.c = $(CC) $(CFLAGS) $($1_cflags) \
$($1_includes) $$($1_$$<_cflags-y) -c -o $$@ $$<
_cmd_link.c = $(CC) $(CFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
$($1_ldflags) $(LDFLAGS)
_cmd_link_so.c = $(CC) $(CFLAGS) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
_cmd_link_so.c = $(CC) $(CFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
$($1_ldflags) $$(filter-out -static,$(LDFLAGS)) -shared

_cmd_depend.c.host = $(HOSTCC) $(CFLAGS) $(CXXFLAGS) $($1_cflags) \
$($1_cxxflags) $($1_includes) -M $$< | $(SED) \
_cmd_depend.c.host = $(HOSTCC) $(CFLAGS) $($1_cflags) \
$($1_includes) -M $$< | $(SED) \
's,\($$*\.o\) *:,.$1/\1 $$@: ,' > $$@
_cmd_compile.c.host = $(HOSTCC) $(CFLAGS) $(CXXFLAGS) $($1_cflags) \
$($1_cxxflags) $($1_includes) $$($1_$$<_cflags-y) -c -o $$@ $$<
_cmd_link.c.host = $(HOSTCC) $(CFLAGS) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
_cmd_compile.c.host = $(HOSTCC) $(CFLAGS) $($1_cflags) \
$($1_includes) $$($1_$$<_cflags-y) -c -o $$@ $$<
_cmd_link.c.host = $(HOSTCC) $(CFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
$($1_ldflags) $(LDFLAGS)
_cmd_link_so.c.host = $(HOSTCC) $(CFLAGS) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
_cmd_link_so.c.host = $(HOSTCC) $(CFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
$($1_ldflags) $$(filter-out -static,$(LDFLAGS)) -shared

_cmd_depend.cxx = $(CXX) $(CFLAGS) $(CXXFLAGS) $($1_cflags) $($1_cxxflags) \
_cmd_depend.cxx = $(CXX) $(CXXFLAGS) $($1_cxxflags) \
$($1_includes) -M $$< | $(SED) 's,\($$*\.o\) *:,.$1/\1 \
$$@: ,' > $$@
_cmd_compile.cxx = $(CXX) $(CFLAGS) $(CXXFLAGS) $($1_cflags) $($1_cxxflags) \
$($1_includes) $$($1_$$<_cflags-y) $$($1_$$<_cxxflags-y) -c -o $$@ $$<
_cmd_link.cxx = $(CXX) $(CFLAGS) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
_cmd_compile.cxx = $(CXX) $(CXXFLAGS) $($1_cxxflags) \
$($1_includes) $$($1_$$<_cxxflags-y) -c -o $$@ $$<
_cmd_link.cxx = $(CXX) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
$($1_ldflags) $(LDFLAGS)
_cmd_link_so.cxx = $(CXX) $(CFLAGS) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
_cmd_link_so.cxx = $(CXX) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
$($1_ldflags) $$(filter-out -static,$(LDFLAGS)) -shared

_cmd_depend.cxx.host = $(HOSTCXX) $(CFLAGS) $(CXXFLAGS) $($1_cflags) \
$($1_cxxflags) $($1_includes) -M $$< | $(SED) \
_cmd_depend.cxx.host = $(HOSTCXX) $(CXXFLAGS) $($1_cxxflags) \
$($1_includes) -M $$< | $(SED) \
's,\($$*\.o\) *:,.$1/\1 $$@: ,' > $$@
_cmd_compile.cxx.host = $(HOSTCXX) $(CFLAGS) $(CXXFLAGS) $($1_cflags) \
$($1_cxxflags) $($1_includes) $$($1_$$<_cxxflags-y) -c -o $$@ $$<
_cmd_link.cxx.host = $(HOSTCXX) $(CFLAGS) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
_cmd_compile.cxx.host = $(HOSTCXX) $(CXXFLAGS) $($1_cxxflags) \
$($1_includes) $$($1_$$<_cxxflags-y) -c -o $$@ $$<
_cmd_link.cxx.host = $(HOSTCXX) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
$($1_ldflags) $(LDFLAGS)
_cmd_link_so.cxx.host = $(HOSTCXX) $(CFLAGS) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
_cmd_link_so.cxx.host = $(HOSTCXX) $(CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends-y),$$^) \
$($1_ldflags) $$(filter-out -static,$(LDFLAGS)) -shared

_cmd_moc.cxx = $(MOC) $$< -o $$@
Expand Down
2 changes: 1 addition & 1 deletion mpfr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target_name ?= mpfr

include ../Makefile.build

MPFR_VERSION="3.1.5"
MPFR_VERSION="3.1.6"

mpfr_clone:
if [ ! -f "mpfr-$(MPFR_VERSION).tar.gz" ]; then curl -OL http://ftp.gnu.org/gnu/mpfr/mpfr-$(MPFR_VERSION).tar.bz2; fi;
Expand Down
41 changes: 24 additions & 17 deletions package.sh
Original file line number Diff line number Diff line change
@@ -1,48 +1,55 @@
#!/bin/sh

# get version info
git_revision_output=$(git rev-parse --verify HEAD)
git_tag_output=$(git describe --all --exact-match $git_revision_output)
git_rev_output=$(git rev-parse --verify HEAD)
git_tag_output=$(git describe --all --exact-match $git_rev_output)
git_status_output=$(git diff)

# check associated tag
# check if associated tag exist for that commit
if [[ $git_tag_output == *"tags"* ]]; then
git_tag_string=${git_tag_output##*/}
else
git_tag_string="unknown"
fi

# check for modifications
# check for any code modifications
if [ -n "$git_status_output" ]; then
git_version_string=$git_revision_output-dirty
git_rev_string=$git_rev_output-dirty
git_tag_string="unknown"
else
git_version_string=$git_revision_output
git_rev_string=$git_rev_output
fi

echo "tools commit version : $git_version_string"
echo "tools tag version : $git_tag_string"
echo "creating 'tools-$git_version_string' release"
# pick version string (tag name, if exists or commit version)
if [[ $git_tag_string == "unknown" ]]; then
release_version=$git_rev_string
else
release_version=$git_tag_string
fi

echo "tools rev version : $git_rev_string"
echo "tools tag version : $git_tag_string"
echo "creating 'tools-$release_version' release"

# prepare environment
source environment;
export BSPJOB=16;
export BSPSUDO=sudo;
export BSPTOOLS=/usr/local/tools-$git_version_string;
export BSPTOOLS=/usr/local/tools-$release_version;
export PATH=${BSPTOOLS}/bin:${PATH};

# add version info
sudo mkdir -p ${BSPTOOLS}
echo $git_version_string > version.txt
echo $git_tag_string >> version.txt
echo $git_rev_string > version.txt
echo $git_tag_string >> version.txt
sudo mv version.txt ${BSPTOOLS}/version.txt

# build tools
make
echo "'tools-$git_version_string' is installed with root priviliges under ${BSPTOOLS}"
echo "'tools-$release_version' is installed with root priviliges under ${BSPTOOLS}"

# create tarball and checksum
echo "creating tools tarball 'tools-$git_version_string.tar.bz2' and checksum"
tar -cjvf tools-$git_version_string.tar.bz2 ${BSPTOOLS}
shasum -a 256 tools-$git_version_string.tar.bz2 > tools-$git_version_string.tar.bz2.hash
shasum -a 256 -c tools-$git_version_string.tar.bz2.hash
echo "creating tools tarball 'tools-$release_version.tar.bz2' and checksum"
tar -cjvf tools-$release_version.tar.bz2 ${BSPTOOLS}
shasum -a 256 tools-$release_version.tar.bz2 > tools-$release_version.tar.bz2.hash
shasum -a 256 -c tools-$release_version.tar.bz2.hash

0 comments on commit 668b899

Please sign in to comment.