2015-06-06 05:12:40 -04:00
|
|
|
@echo off
|
2015-07-25 15:10:02 -04:00
|
|
|
rem %1 = directory holding config data (in cdata)
|
|
|
|
|
2015-11-17 07:16:34 -05:00
|
|
|
echo creating config.h from %1
|
|
|
|
|
|
|
|
if not exist cfg.h (call :seterr & echo config.h couldn't be built because cfg.h is missing & exit /b %errorlevel%)
|
|
|
|
|
2015-06-06 05:12:40 -04:00
|
|
|
echo /* generated by gen_config_h.bat */ >tmp.h
|
|
|
|
|
2015-12-18 12:16:23 -05:00
|
|
|
set end=%1
|
|
|
|
set end="%end:~-7%"
|
|
|
|
if %end% EQU "generic" (goto skip_asm)
|
|
|
|
if %end% EQU "eneric\" (goto skip_asm)
|
|
|
|
|
|
|
|
if /i "%end%" NEQ "generic" (
|
|
|
|
for /f %%a in (%1cfg.h) do (if "%%a" NEQ "" (echo #define HAVE_NATIVE_%%a 1 >>tmp.h))
|
|
|
|
)
|
|
|
|
|
|
|
|
:skip_asm
|
2015-06-06 05:12:40 -04:00
|
|
|
type cfg.h >>tmp.h
|
|
|
|
call out_copy_rename tmp.h ..\ config.h
|
|
|
|
del tmp.h
|
2015-11-17 07:16:34 -05:00
|
|
|
|
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
:seterr
|
|
|
|
exit /b 1
|