cURL / Mailing Lists / curl-library / Single Mail

curl-library

[Patch] src/Makefile.b32

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Thu, 07 Apr 2011 14:05:04 +0200

I'm not sure this patch should go the curl-users or curl-lib ML, but
I choose the latter. This patch does several things:

* Rename the object object directory from 'objs' to 'BCC_obj' to be in
  sync with my previous patch for lib/Makefile.b32.

* Turn off these warnings to keep the build totally silent (with CBuilder-6
  that is).
   -w-inl 8026 Functions X are not expanded inline.
   -w-pia 8060 Possibly incorrect assignment
   -w-pin 8061 Initialization is only partially bracketed
  (same added in src/Makefile.b32)

* $(MKDIR) and $(RMDIR) have been replaced with the shell-commands 'md'
  and 'rd'. When having MingW/Msys programs 'mkdir.exe' and 'rmdir.exe' in
  $PATH, this confuses Borland's make and the result (the cleaning etc.) would
  not be as expected.

* Removed the preprocessing step; no need for PP_CMD and the .int files.
  curl.exe builds fine w/o and the makefile gets simpler.

* Added a target for creating a compressed hugehelp.c if WITH_ZLIB is
  defined. It assumes groff, gzip and perl is available if such an "advanced"
  users requests it. Okay? BTW. My groff and Perl needs unix-slashes ('/').
  Other perls should handle both forms ('/' and '\').

-----------------------------

--- Git-latest\src\Makefile.b32 Thu Jan 20 12:22:45 2011
+++ src\Makefile.b32 Thu Apr 07 13:58:57 2011
@@ -34,18 +34,18 @@
 PROGNAME = curl.exe
 
 # Setup environment
-PP_CMD = cpp32 -q -P-
 CC_CMD = bcc32 -q -c
 LD = bcc32
 RM = del 2>NUL
-MKDIR = mkdir
-RMDIR = rmdir /s /q 2>NUL
+MKDIR = md
+RMDIR = rd /q 2>nul
+COPY = $(COMSPEC) /c copy /y
 
-CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -Dinline=__inline
+CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -w-inl -w-pia -w-pin -Dinline=__inline
 LDFLAGS = -q -lq -lap
 
 SRCDIRS = .;..\lib
-OBJDIR = .\objs
+OBJDIR = .\BCC_objs
 INCDIRS = -I.;..\include;..\lib
 LINKLIB = $(BCCDIR)\lib\cw32mt.lib
 DEFINES = -DNDEBUG -DWIN32
@@ -84,13 +84,14 @@
 OBJECTS = $(CSOURCES:.c=.obj)
 
 .c.obj:
- @-$(RM) $(@R).int
- $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
- $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
+ $(CC_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$@ $<
 
-all: $(OBJDIR) $(PROGNAME)
+all: $(OBJDIR) hugehelp $(PROGNAME)
 
 clean:
+ cd $(OBJDIR)
+ @-$(RM) $(OBJECTS)
+ cd ..
  @-$(RMDIR) $(OBJDIR)
  @-$(RM) $(PROGNAME)
  @-$(RM) curl.tds
@@ -98,6 +99,16 @@
 $(OBJDIR):
  @-$(RMDIR) $(OBJDIR)
  @-$(MKDIR) $(OBJDIR)
+
+!ifdef WITH_ZLIB
+hugehelp: ..\docs\MANUAL ..\docs\curl.1 mkhelp.pl
+ groff -Tascii -man -P -c ../docs/curl.1 > hugehelp.tmp
+ perl -w mkhelp.pl -c ../docs/MANUAL < hugehelp.tmp > hugehelp.c
+ @-$(RM) hugehelp.tmp
+!else
+hugehelp:
+ $(COPY) hugehelp.c.cvs hugehelp.c
+!endif
 
 $(PROGNAME): $(OBJECTS) $(LIBCURL_LIB) $(LINKLIB)
  @-$(RM) $(PROGNAME)

-----------------------------

Also attached.

--gv

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2011-04-07