From 2ae35c8b4673a6f9b683b4ac8d838fd3f34b4237 Mon Sep 17 00:00:00 2001 From: gucio321 Date: Wed, 5 Apr 2023 10:49:02 +0200 Subject: [PATCH] Revert "generattor: add --cflags command line flag" This reverts commit 4d19dd5e170b207f7db747961392787e67efe3ca. --- generator/generator.sh | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/generator/generator.sh b/generator/generator.sh index 794efe1..e2840c5 100755 --- a/generator/generator.sh +++ b/generator/generator.sh @@ -16,38 +16,10 @@ # arg[2] options as words in one string: internal for imgui_internal generation, freetype for freetype generation, comments for comments generation, nochar to skip char* function version, noimstrv to skip imstrv # examples: "" "internal" "internal freetype" "comments internal" # arg[3..n] name of implementations to generate and/or CLFLAGS (e.g. -DIMGUI_USER_CONFIG or -DIMGUI_USE_WCHAR32) -# -#!/bin/bash - -# parse command line arguments -# ref: https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash -POSITIONAL_ARGS=() - -while [[ $# -gt 0 ]]; do - case $1 in - -c|--cflags) - CFLAGS="$2" - shift # past argument - shift # past value - ;; - -*|--*) - echo "Unknown option $1" - exit 1 - ;; - *) - POSITIONAL_ARGS+=("$1") # save positional arg - shift # past argument - ;; - esac -done - -set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then suffix='.exe' fi -echo "CFLAGS: " $CFLAGS - -luajit$suffix ./generator.lua gcc "internal noimstrv" glfw opengl3 opengl2 sdl2 $CFLAGS +luajit$suffix ./generator.lua gcc "internal noimstrv" glfw opengl3 opengl2 sdl2 "$@"