Skip to content

Commit a25ce9c

Browse files
committed
touch could be a useful test.
1 parent f464fca commit a25ce9c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

examples/coreutils/Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
VERSION=8.31
2+
SRC=coreutils-${VERSION}
3+
TAR=${SRC}.tar.xz
4+
URL=https://ftp.gnu.org/gnu/coreutils/${TAR}
5+
6+
7+
all: touch.bc
8+
9+
${TAR}:
10+
wget ${URL}
11+
12+
${SRC}: ${TAR}
13+
tar xvf ${TAR}
14+
touch ${SRC}
15+
16+
17+
${SRC}/Makefile: ${SRC}
18+
cd ${SRC}; CC=gclang ./configure
19+
20+
${SRC}/src/touch: ${SRC}/Makefile
21+
cd ${SRC}; make
22+
touch ${SRC}/src/touch
23+
24+
touch.bc: ${SRC}/src/touch
25+
get-bc -o touch.bc -m ${SRC}/src/touch
26+
27+
touch_from_bitcode: touch.bc
28+
clang++ touch.bc -o touch
29+
30+
clean:
31+
rm -rf touch touch.bc touch.bc.llvm.manifest
32+
make -C ${SRC}
33+
34+
spotless:
35+
rm -rf ${SRC} ${TAR}
36+

0 commit comments

Comments
 (0)