diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-08-24 08:19:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 08:19:10 -0400 |
commit | 8ecf9224f514e9632f51170c8de3038555e11ddf (patch) | |
tree | 03670f7af3dac95f1156d4993a39786ace175e0d /glgen.sh | |
parent | 9c886f20b97b6ab1ac85b849f1fe7f16eb199ff0 (diff) | |
parent | dc371942911aac5c098205dad7d021837d2d4acd (diff) |
Merge pull request #1198 from ascent12/meson_feature
Fix meson changes
Diffstat (limited to 'glgen.sh')
-rwxr-xr-x | glgen.sh | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -7,16 +7,15 @@ # to fail if it can't load the function. You'll need to check if that function # is NULL before using it. -if [ $# -ne 3 ]; then +if [ $# -ne 2 ]; then exit 1 fi SPEC=$1 -OUT_C=$2 -OUT_H=$3 +OUTDIR=$2 BASE=$(basename "$SPEC" .txt) -INCLUDE_GUARD=$(printf %s "$OUT_H" | tr -c [:alnum:] _ | tr [:lower:] [:upper:]) +INCLUDE_GUARD=$(printf %s_%s_H "$OUTDIR" "$BASE" | tr -c [:alnum:] _ | tr [:lower:] [:upper:]) DECL="" DEFN="" @@ -56,9 +55,9 @@ while read -r COMMAND; do if [ $OPTIONAL -eq 0 ]; then LOADER="$LOADER$(printf "\n$CHECK_FMT" "$COMMAND" "$COMMAND")" fi -done < $SPEC +done < "$SPEC" -cat > $OUT_H << EOF +cat > "$OUTDIR/$BASE.h" << EOF #ifndef $INCLUDE_GUARD #define $INCLUDE_GUARD @@ -66,7 +65,6 @@ cat > $OUT_H << EOF #include <EGL/egl.h> #include <EGL/eglext.h> -#include <EGL/eglmesaext.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> @@ -76,9 +74,9 @@ $DECL #endif EOF -cat > $OUT_C << EOF +cat > "$OUTDIR/$BASE.c" << EOF #include <wlr/util/log.h> -#include "$OUT_H" +#include "$BASE.h" $DEFN bool load_$BASE(void) { |