summaryrefslogtreecommitdiff
path: root/tests/frontend/project/elements/manual-build-output.txt
blob: a6a98efb60d8d16e8dc96765e05bac4dd375f25e (plain)
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
#!/bin/sh
#
# DO NOT EDIT THIS FILE
#
# This is a build script generated by
# [BuildStream](https://wiki.gnome.org/Projects/BuildStream/).
#
# Builds the module manual-build.

set -e

# Prepare the build environment
echo 'Building manual-build'

if [ -d '/buildstream/build' ]; then
    rm -rf '/buildstream/build'
fi

if [ -d '/buildstream/install' ]; then
    rm -rf '/buildstream/install'
fi

mkdir -p '/buildstream/build'
mkdir -p '/buildstream/install'

if [ -d "$SRCDIR/manual-build/" ]; then
    cp -a "$SRCDIR/manual-build/." '/buildstream/build'
fi
cd '/buildstream/build'

export PREFIX='/buildstream/install'

export HOME=/tmp LC_ALL=C LOGNAME=tomjon MAKEFLAGS=-j1 PATH=/usr/bin:/bin:/usr/sbin:/sbin SHELL=/bin/sh TERM=dumb TZ=UTC USER=tomjon USERNAME=tomjon V=1 

# Build the module
(set -ex; echo 'Hi :)'
) || exit 1
(set -ex; find "/buildstream/install" -type f \
  '(' -perm -111 -o -name '*.so*' \
      -o -name '*.cmxs' -o -name '*.node' ')' \
  -exec sh -ec \
  'read -n4 hdr <"$1" # check for elf header
   if [ "$hdr" != "$(printf \\x7fELF)" ]; then
       exit 0
   fi
   debugfile="/buildstream/install/usr/lib/debug/$(basename "$1")"
   mkdir -p "$(dirname "$debugfile")"
   objcopy --only-keep-debug "$1" "$debugfile"
   chmod 644 "$debugfile"
   strip --remove-section=.comment --remove-section=.note --strip-unneeded "$1"
   objcopy --add-gnu-debuglink "$debugfile" "$1"' - {} ';'
) || exit 1


rm -rf '/buildstream/build'

# Install the module
echo 'Installing manual-build'

(cd '/buildstream/install'; find . | cpio -umdp /)