Conversation
command.com may be a bit too simplistic for this :) |
|
OK, this should work. CI will complain about missing mkconf.exe for now. But let me know what you think of the idea. The example above now becomes: $ export CFLAGS='-O3 -DNDEBUG'
$ ./configur.sh --disable-debug --disable-bsd-fatal djgpp
$ make -f djgpp.makNote that for |
| /* | ||
| * Include user options set from configure script. | ||
| */ | ||
| #include "userconf.h" /* @NO_DEP */ |
There was a problem hiding this comment.
So e.g Watcom's compiler on Windows should find this as build/watcom/userconf.h.
I don't see where in Makefile.all the I_CFLAGS = -I./build/watcom is.
Besides what if Watcom LARGE and Watcom WIN32 needs different userconf.h settings?
There was a problem hiding this comment.
It's in regular CFLAGS (line 586), together with -I. -I../inc.
Besides what if Watcom LARGE and Watcom WIN32 needs different
userconf.hsettings?
Yes, that is an issue. Those would need to be separate configure targets then. For now, the only way to do that is to configure once, build large, then reconfigure with different options, then build win32.
There was a problem hiding this comment.
It's in regular CFLAGS (line 586), together with -I. -I../inc.
But from the last CI build for Watcom/Win32:
wcc386 @build\watcom\win32\wcc.arg accept.c -fo=build\watcom\win32\accept.obj
config.h(193): Error! E1055: Unable to open 'userconf.h'
So some issue with the -I path.
There was a problem hiding this comment.
Ahh, I had the path swapped (watcom/build instead of build/watcom). Fixed now.
There was a problem hiding this comment.
And also in src\test\makefile.all since the CI says:
wcc386 @wcc386.arg
..\config.h(193): Error! E1055: Unable to open 'userconf.h'
make: *** [watcom_f.mak:175: bind.exe] Error 1
etc.
I should fix appveyor-build.bat to error out in this case. This could work (for Watcom at least):
--- a/appveyor-script.bat
+++ b/appveyor-script.bat
@@ -403,9 +403,9 @@ exit /b 0
if %BUILDER%. == cygwin. make -f Cygwin_%BITS%.mak
if %BUILDER%. == visualc. make -f visualc_%BITS%.mak
if %BUILDER%. == watcom. (
- if %MODEL%. == large. make -f watcom_l.mak
- if %MODEL%. == flat. make -f watcom_f.mak
- if %MODEL%. == win32. make -f watcom_w.mak
+ if %MODEL%. == large. (make -f watcom_l.mak & if not errorlevel == 0 goto test_failed)
+ if %MODEL%. == flat. (make -f watcom_f.mak & if not errorlevel == 0 goto test_failed)
+ if %MODEL%. == win32. (make -f watcom_w.mak & if not errorlevel == 0 goto test_failed)
)
%_ECHO% "\e[1;33mRunning test 'cpu.exe' ---------------------------------------------------------------\e[0m"
@@ -417,6 +417,9 @@ exit /b 0
%_ECHO% "\e[1;33mRunning test 'chksum.exe -s' ---------------------------------------------------------\e[0m"
chksum.exe -s
+ exit /b 0
+
+:test_failed
+ exit /b 1
+
:no_tests
exit /b 0There was a problem hiding this comment.
And also in
src\test\makefile.allsince the CI says:wcc386 @wcc386.arg ..\config.h(193): Error! E1055: Unable to open 'userconf.h' make: *** [watcom_f.mak:175: bind.exe] Error 1etc.
Should be fixed now.
0cb987d to
df7dc8b
Compare
| :: | ||
| set MKMAKE=..\util\mkmake.exe | ||
| set MKDEP=..\util\mkdep.exe | ||
| set MKCONF=..\util\mkconf.exe |
There was a problem hiding this comment.
I assume you mean that util/Makefile should build these as needed?
For now, just add the to this PR if possible.
There was a problem hiding this comment.
Yes, will add the binaries. It's a bit unfortunate that they have to be in the git repo. I suppose that's mainly due to the S-Lang dependency (which not everyone might have)?
Note, I did change the utils CFLAGS to -Os -g0, so they should waste a bit less space. Maybe it's an idea to upx them too?
There was a problem hiding this comment.
I suppose that's mainly due to the S-Lang dependency (which not everyone might have)?
Right. But mkconf.c doesn't need S-Lang AFAICS. And UPX is IMHO not needed.
There was a problem hiding this comment.
So, there's not much of a reason to keep them in git right? I did just add the mkconf binaries though.
Problem is that binaries inflate the repo size (git clone must download all previous versions). And Git doesn't preserve file dates so Make can't tell if they need to be rebuilt.
| :: | ||
| set MKMAKE=..\util\win32\mkmake.exe | ||
| set MKDEP=..\util\win32\mkdep.exe | ||
| set MKCONF=..\util\win32\mkconf.exe |
Work in progress, pushing what I have so far:
First commit saves the user's
$CFLAGSin the makefile, which I think is generally a good idea. Though there are some targets that produce multiple makefiles, not sure how practical it is for those.Second commit then allows users to override the config.h macros via
$CFLAGS. For example, to make a "release" version of the library for djgpp:This is just the easiest way to implement it, but maybe not the nicest to use. I'm looking into adding autoconf-style options like
--enable-dhcp, and a--helpthat explains all of them.