diff options
-rw-r--r-- | lib/Makefile.netware | 28 | ||||
-rwxr-xr-x | tests/testcurl.pl | 14 |
2 files changed, 36 insertions, 6 deletions
diff --git a/lib/Makefile.netware b/lib/Makefile.netware index 3721d7ccf..bab5d79ee 100644 --- a/lib/Makefile.netware +++ b/lib/Makefile.netware @@ -230,7 +230,7 @@ nlm: prebuild $(TARGET).nlm lib: prebuild $(TARGET).$(LIBEXT) -prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h +prebuild: $(OBJDIR) $(CURL_INC)/curl/curlbuild.h $(OBJDIR)/version.inc config.h $(OBJDIR)/%.o: %.c # @echo Compiling $< @@ -584,4 +584,28 @@ ca-bundle.crt: mk-ca-bundle.pl @echo Creating $@ @-$(PERL) $< -b -n $@ - +$(CURL_INC)/curl/curlbuild.h: Makefile.netware + @echo Creating $@ + @echo $(DL)#ifndef __CURL_CURLBUILD_H$(DL) > $@ + @echo $(DL)#define __CURL_CURLBUILD_H$(DL) >> $@ + @echo $(DL)/* $@ intended for NetWare target.$(DL) >> $@ + @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@ + @echo $(DL)** All your changes will be lost!!$(DL) >> $@ + @echo $(DL)*/$(DL) >> $@ +ifeq ($(LIBARCH),LIBC) + # NetWare - LIBC curlbuild.h settings. + @echo $(DL)#define CURL_OFF_T long long$(DL) >> $@ + @echo $(DL)#define CURL_FMT_OFF_T "lld"$(DL) >> $@ + @echo $(DL)#define CURL_FMT_OFF_TU "llu"$(DL) >> $@ + @echo $(DL)#define CURL_FORMAT_OFF_T "%lld"$(DL) >> $@ + @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 8$(DL) >> $@ +else + # NetWare - CLIB curlbuild.h settings. + @echo $(DL)#define CURL_OFF_T long$(DL) >> $@ + @echo $(DL)#define CURL_FMT_OFF_T "ld"$(DL) >> $@ + @echo $(DL)#define CURL_FMT_OFF_TU "lu"$(DL) >> $@ + @echo $(DL)#define CURL_FORMAT_OFF_T "%ld"$(DL) >> $@ + @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 4$(DL) >> $@ +endif + @echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@ + diff --git a/tests/testcurl.pl b/tests/testcurl.pl index a898eba3e..6342e8ac5 100755 --- a/tests/testcurl.pl +++ b/tests/testcurl.pl @@ -486,9 +486,15 @@ if ($configurebuild) { system("xcopy /s /q ..\\$CURLDIR ."); system("buildconf.bat"); } - elsif (($^O eq 'linux') || ($targetos =~ /netware/)) { - system("cp -afr ../$CURLDIR/* ."); - system("cp -af ../$CURLDIR/Makefile.dist Makefile"); + elsif ($targetos =~ /netware/) { + system("cp -afr ../$CURLDIR/* ."); + system("cp -af ../$CURLDIR/Makefile.dist Makefile"); + system("$make -i -C lib -f Makefile.netware prebuild"); + system("$make -i -C src -f Makefile.netware prebuild"); + } + elsif ($^O eq 'linux') { + system("cp -afr ../$CURLDIR/* ."); + system("cp -af ../$CURLDIR/Makefile.dist Makefile"); system("cp -af ../$CURLDIR/include/curl/curlbuild.h.dist ./include/curl/curlbuild.h"); system("$make -i -C lib -f Makefile.$targetos prebuild"); system("$make -i -C src -f Makefile.$targetos prebuild"); @@ -498,7 +504,7 @@ if ($configurebuild) { logit "display include/curl/curlbuild.h"; if(open(F, "include/curl/curlbuild.h")) { while (<F>) { - print if /^ *#define/; + print if (($1 =~ /^ *#define/) && ($1 !~ /^ *#define.*__CURL_CURLBUILD_H/)); } close(F); } |