cURL / Mailing Lists / curl-library / Single Mail

curl-library

Watcom makefiles - some more ...

From: Guenter <lists_at_gknw.net>
Date: Wed, 28 Jul 2010 22:52:07 +0200

Since its always our wish to use Makefile.inc rather than manually
maintaining source/object file lists I played at bit with wmake -u
switch; this seems to be the key in order to read in Makefile.inc.
I've tested that this works with recent OWC 1.9/1.8 and also with Watcom
11c, and it always works fine (where some other macro constructs in the
makefiles anyway prevent that 11c works with the current makefiles). So
all we need is to change the calls in our main Makefile:

--- Makefile.orig Wed Jun 16 13:49:58 2010
+++ Makefile Wed Jul 28 12:08:55 2010
@@ -54,17 +54,17 @@
          cd ..\src
          make -f Makefile.b32 clean

-watcom:
+watcom: .SYMBOLIC
          cd lib
- wmake -f Makefile.Watcom
+ wmake -u -f Makefile.Watcom
          cd ..\src
- wmake -f Makefile.Watcom
+ wmake -u -f Makefile.Watcom

-watcom-clean:
+watcom-clean: .SYMBOLIC
          cd lib
- wmake -f Makefile.Watcom clean
+ wmake -u -f Makefile.Watcom clean
          cd ..\src
- wmake -f Makefile.Watcom clean
+ wmake -u -f Makefile.Watcom clean

  mingw32:
          $(MAKE) -C lib -f Makefile.m32

The .SYMBOLIC is not required but fixes a warning at the end of
successful compilation that there's no target 'watcom' created.

In case someone calls the makefiles in lib and src directly we can bail
out and tell what's required:

# In order to process Makefile.inc wmake must be called with -u switch!
!ifneq __MAKEOPTS__ -u
!error You MUST call wmake with the -u switch!
!else
!include Makefile.inc
!endif

Unfortunately this works only great for lib/Makefile.inc; with
src/Makefile.inc I see two probs:
1. wmake seems to be case-insensitive, so CURL_SOURCES and curl_SOURCES
is same for wmake, thus makes this Makefile.inc unuseable for Watcom.
2. I didnt yet figure out how I can split off the prefixed path from
CURLX_ONES.

If someone knows of a wmake trick how this can be done then we could use
src/Makefile.inc too (if we would rename curl_SOURCES), but I think we
should in any case already use lib/Makefile.inc since this works great,
and most changes are anyway expected here.

comments?

Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-28