Commit 5dd07f56 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Updated win32 scripts to check the error status correctly.

Now detecting missing (g)awk command and possible errors from awk.

darcs-hash:20060313133511-65a35-ecbaec9dc8140e07e48afc881f45b60ffcf15d85.gz
parent 71dbff59
......@@ -61,6 +61,8 @@ BEGIN {
template3="";
prefix="";
tprefix="";
failed=0;
success=0;
}
function name_hash (name)
......@@ -304,6 +306,7 @@ in_header_list && /^ (sip|rtsp|http|msg|mp)_[a-z_0-9]+_t/ {
}
if ($0 !~ /[\/][*][*][<]/) {
printf "msg_protos.awk: header %s is malformed\n", n;
failed=1;
exit 1;
}
......@@ -314,6 +317,8 @@ in_header_list && /^ (sip|rtsp|http|msg|mp)_[a-z_0-9]+_t/ {
}
END {
if (failed) { exit };
if (!NO_LAST) {
protos("unknown", "/**< Unknown headers */", -3);
protos("error", "/**< Erroneous headers */", -4);
......@@ -439,4 +444,6 @@ END {
}
printf(" }\n}};\n\n") > PT;
}
exit success;
}
......@@ -25,6 +25,9 @@
:: 02110-1301 USA
::
@setlocal
@if x%AWK%==x set AWK=gawk
@call version_files.cmd
@call build_sources.cmd
......@@ -33,3 +36,4 @@
@echo NOTE:
@echo NOTE: Remember to install pthreadVC2.dll to your path, too!
@echo NOTE:
@endlocal
\ No newline at end of file
......@@ -2,8 +2,19 @@
:: Build sources on win32
::
@set CHECK=@IF errorlevel 1 GOTO failed
@set MSG_AWK=gawk -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk
@setlocal
@if x%AWK%==x setlocal AWK=gawk
@set CHECK=@IF errorlevel 1 GOTO failed
:: Check that we really have awk
@%AWK% "{ exit(0); }" < NUL >NUL
@if not errorlevel 9009 goto have_awk
@echo *** install %AWK% (GNU awk) into your PATH ***
@goto failed
:have_awk
:: in Win32 exit 0; from awk gets converted to errorlevel 1
@set MSG_AWK=gawk -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk success=-1
@set TAG_AWK=gawk -f ../libsofia-sip-ua/su/tag_dll.awk BINMODE=rw
@set IN=../libsofia-sip-ua/msg/test_class.h
......@@ -95,7 +106,8 @@
%TAG_AWK% NO_DLL=1 %P%/url/url_tag.c < NUL
%CHECK%
GOTO end
@GOTO end
:failed
@ECHO *** FAILED ***
:end
@endlocal
......@@ -25,9 +25,21 @@
:: 02110-1301 USA
::
set VERSION=gawk -v BINMODE="rw" -f version.awk
set AC=..\configure.ac
@setlocal
@if x%AWK%==x set AWK=gawk
@set VERSION=%AWK% -v BINMODE="rw" -f version.awk
@set AC=..\configure.ac
for %%f in (config.h ..\libsofia-sip-ua\features\sofia-sip\features.h) ^
:: Check that we really have awk
@%AWK% "{ exit(0); }" < NUL >NUL
@if not errorlevel 9009 goto have_awk
@echo *** install %AWK% (GNU awk) into your PATH ***
@goto end
:have_awk
for %%f in (config.h ..\libsofia-sip-ua\features\sofia-sip\sofia_features.h) ^
do %VERSION% %AC% OUT=1 %%f.in > %%f
@if errorlevel 1 echo *** version_files failed ***
@if errorlevel 1 goto echo *** version_files failed ***
:end
@endlocal
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment