Browse Source

Graph compilation fix for macOS, enhance scripts

Arturs Jefimovs 3 months ago
parent
commit
31cd46d24e
3 changed files with 9 additions and 3 deletions
  1. 7 1
      Data/bin/compile.sh
  2. 1 1
      Data/bin/patch.sh
  3. 1 1
      src/make.sh

+ 7 - 1
Data/bin/compile.sh

@@ -41,8 +41,14 @@ export OBERON=".:$DIR/../../src:$OFRDIR/Lib/Sym"
 OFR="ofront+ -s -88 -7w"
 
 
-$OFR $2 $FNAME
+$OFR $2 "$FNAME"
 retcode=$?
 
+echo "AA=[$THISOS], BB=[$2]" >> /tmp/b
+if [[ "$THISOS" == "macOS" && "$2" == "-m" ]]; then
+  CFILE="$(basename "${FNAME/.Mod/}").c"
+  "$DIR/patch.sh" "$CFILE"
+fi
+
 cd ..
 exit $retcode

+ 1 - 1
Data/bin/patch.sh

@@ -5,7 +5,7 @@
 TARGET_FILE="$1"
 TEMP_FILE="temp_${TARGET_FILE}"
 
-if [ ! -f "$TARGET_FILE" ]; then
+if [[ ! -f "$TARGET_FILE" ]]; then
     echo "File $TARGET_FILE not found!"
     exit 1
 fi

+ 1 - 1
src/make.sh

@@ -77,7 +77,7 @@ $OFR -Cwm FreeOberon.Mod &&
 
 $OFR -7wm Fob.Mod &&
 
-{ [ "$THISOS" = "macOS" ] && ../Data/bin/patch.sh FreeOberon.c || true; } &&
+{ [[ "$THISOS" == "macOS" ]] && ../Data/bin/patch.sh FreeOberon.c || true; } &&
 
 
 $CCFULL -c Utf8.c &&