Skip to content

Commit

Permalink
Fix cmd launch detection in build.bat, make lst/lab files optional, e…
Browse files Browse the repository at this point in the history
…cho fewer lines
  • Loading branch information
calc84maniac committed Jul 30, 2024
1 parent 498da0c commit f245002
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ script:
- cd ..
- ./build.sh
- cd tiboyce-romgen
- gcc -std=c99 -O2 -W -Wall -Wextra -Wno-pointer-sign -Wno-unused-parameter -o romgen romgen.c zip.c
- make -j2
- cd ../tiboyce-convertsav
- gcc -std=c99 -O2 -W -Wall -Wextra -Wno-pointer-sign -Wno-unused-parameter -o convertsav convertsav.c lzf_c.c lzf_d.c
- make -j2

notifications:
irc:
Expand Down
10 changes: 5 additions & 5 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@echo off
set exit_timeout=-1
set version_arg=
set "as=spasm -E -A"
set "build=build"
@echo on

set version_arg=
for /f %%i in ('git describe --tags "--dirty=*" "--abbrev=7"') do set "version_arg="-DVERSION=\"%%i\"""
set "as=spasm -E -T -L -A"
set "build=build"

if not exist "%build%" mkdir "%build%"

Expand All @@ -21,6 +21,6 @@ set exit_timeout=5
:exit
@echo off
@REM Pause if not run from cmd so the window persists and the user can see the output.
@REM https://superuser.com/a/1688485
if /i not "%CMDCMDLINE:"=%" == "%COMSPEC%" timeout /t %exit_timeout%
@REM https://stackoverflow.com/a/18501554
if /I %0 EQU "%~dpnx0" timeout /t %exit_timeout%
exit /b
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
as="spasm -E -A"
build="build"
set -x

version_arg="-DVERSION=\"$(git describe --tags --dirty=* --abbrev=7)\"" || unset version_arg
set -e
as="spasm -E -T -L -A"
build="build"

mkdir -p "$build"

Expand Down

0 comments on commit f245002

Please sign in to comment.