minor script renaming, for clarity

This commit is contained in:
Yann Collet 2019-08-27 16:01:39 -07:00
parent 517aeb89dc
commit f61e8a231f
3 changed files with 21 additions and 4 deletions

View File

@ -7,7 +7,10 @@ Create `zstddeclib.c` from the Zstd source using:
cd zstd/contrib/declib
./combine.sh -r ../../lib -r ../../lib/common -r ../../lib/decompress -o zstddeclib.c zstddeclib-in.c
```
Then add the resulting file to your project (see the [example files](examples)). `build.sh` will run the above script then compile and test the library.
Then add the resulting file to your project (see the [example files](examples)).
`create_single_file_decoder.sh` will run the above script, creating file `zstddeclib.c`.
`build_test.sh` will create the decoder, then compile and test the library.
Why
---

View File

@ -10,13 +10,13 @@ OUT_FILE="tempbin"
OUT_WASM="temp.wasm"
# Amalgamate the sources
./combine.sh -r "$ZSTD_SRC_ROOT" -r "$ZSTD_SRC_ROOT/common" -r "$ZSTD_SRC_ROOT/decompress" -o zstddeclib.c zstddeclib-in.c
./create_single_file_decoder.sh
# Did combining work?
if [ $? -ne 0 ]; then
echo "Combine script: FAILED"
echo "Single file decoder creation script: FAILED"
exit 1
fi
echo "Combine script: PASSED"
echo "Single file decoder creation script: PASSED"
# Compile the generated output
cc -Os -g0 -o $OUT_FILE examples/simple.c

View File

@ -0,0 +1,14 @@
#!/bin/bash
# Where to find the sources
ZSTD_SRC_ROOT="../../lib"
# Amalgamate the sources
./combine.sh -r "$ZSTD_SRC_ROOT" -r "$ZSTD_SRC_ROOT/common" -r "$ZSTD_SRC_ROOT/decompress" -o zstddeclib.c zstddeclib-in.c
# Did combining work?
if [ $? -ne 0 ]; then
echo "Combine script: FAILED"
exit 1
fi
echo "Combine script: PASSED"