Overview
Comment: | Added script to create precompiled binaries |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d3f770e3c3771c5b7e426b9ee47bf5ad |
User & Date: | rkeene on 2016-09-22 19:28:48 |
Other Links: | manifest | tags |
Context
2016-09-22
| ||
19:30 | Filed 1.20 check-in: 1c7faf07aa user: rkeene tags: trunk, 1.20 | |
19:28 | Added script to create precompiled binaries check-in: d3f770e3c3 user: rkeene tags: trunk | |
19:02 | Updated to support compiling filed in alternate directories check-in: 08602df0fc user: rkeene tags: trunk | |
Changes
Modified .fossil-settings/ignore-glob from [72ecff7281] to [3d8734b3a3].
1 2 3 | filed filed.o filed-mime-types.h | > | 1 2 3 4 | filed filed.o filed-mime-types.h compiled |
Added build/build-precompiled version [46b4f35d88].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | #! /usr/bin/env bash # Ensure we are in the correct working directory cd "$(dirname "$(which "$0")")/.." || exit 1 # Determine the version of Filed version='' eval "$(( grep '^# *define *FILED_VERSION' filed.c; echo '|version=FILED_VERSION' ) | cpp -E | grep '^|' | sed 's@^|@@')" if [ -z "${version}" ]; then echo "Unable to determine which version of Filed we are compiling. Aborting." >&2 exit 1 fi # Cleanup rm -rf workdir-buildPrecompiled-* # Compile everything, all at once idx=-1 for tryCompilerDir in "$(readlink -f ~/root/cross-compilers)" "$(readlink -f ~/devel/build-cc/TMP)"; do setup_cc="${tryCompilerDir}/setup-cc" platforms=( $("${setup_cc}" | tail -n +2) ) for platform in "${platforms[@]}"; do idx=$[$idx + 1] ( workdir="workdir-buildPrecompiled-${idx}-$(openssl rand 20 -hex)-platform-${platform}" || exit 1 mkdir "${workdir}" || exit 1 cd "${workdir}" || exit 1 eval $("${setup_cc}" "${platform}") make_extra=( -f ../Makefile srcdir=.. CC="${CC}" ) case "${platform}" in *-musl-*|*-musl) make_extra=("${make_extra[@]}" FILED_EXTRA_LDFLAGS="-static") ;; esac make "${make_extra[@]}" ) & done done # Wait for that to get done wait # Rename the files into place mkdir -p compiled for binary in workdir-buildPrecompiled-*/filed; do platform="$(echo "${binary}" | sed 's@^.*-platform-@@;s@/.*$@@')" mv "${binary}" "compiled/filed-${version}-${platform}" done # Cleanup rm -rf workdir-buildPrecompiled-* exit 0 |