Skip to content

Commit

Permalink
Changed NetWare build to generate export list.
Browse files Browse the repository at this point in the history
  • Loading branch information
gknauf committed Jul 11, 2012
1 parent 0025770 commit 33eac5f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 65 deletions.
21 changes: 13 additions & 8 deletions lib/Makefile.netware
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ DESCR = cURL libcurl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - http://curl.haxx.se
MTSAFE = YES
STACK = 64000
SCREEN = none
EXPORTS = @libcurl.imp
EXPORTF = $(OBJDIR)/libcurl.imp
EXPORTS = @$(EXPORTF)

# Uncomment the next line to enable linking with POSIX semantics.
# POSIXFL = 1
Expand Down Expand Up @@ -660,6 +661,10 @@ else
@echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
endif

$(EXPORTF): $(CURL_INC)/curl/curl.h $(CURL_INC)/curl/easy.h $(CURL_INC)/curl/multi.h $(CURL_INC)/curl/mprintf.h
@echo Creating $@
@$(AWK) -f ../packages/NetWare/get_exp.awk $^ > $@

FORCE: ;

info: $(OBJDIR)/version.inc
Expand Down Expand Up @@ -696,13 +701,6 @@ else
@echo ipv6 support: no
endif

$(LIBCARES_PATH)/libcares.$(LIBEXT):
$(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib

ca-bundle.crt: mk-ca-bundle.pl
@echo Creating $@
@-$(PERL) $< -b -n $@

$(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE
@echo Creating $@
@echo $(DL)/* $@ intended for NetWare target.$(DL) > $@
Expand Down Expand Up @@ -741,3 +739,10 @@ endif
@echo $(DL)typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;$(DL) >> $@
@echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@

$(LIBCARES_PATH)/libcares.$(LIBEXT):
$(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib

ca-bundle.crt: mk-ca-bundle.pl
@echo Creating $@
@-$(PERL) $< -b -n $@

56 changes: 0 additions & 56 deletions lib/libcurl.imp

This file was deleted.

48 changes: 48 additions & 0 deletions packages/NetWare/get_exp.awk
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# fetch exports from input header and write them to STDOUT
BEGIN {
add_symbol("curl_strequal")
add_symbol("curl_strnequal")
}

function add_symbol(sym_name) {
sub(" ", "", sym_name)
exports[++idx] = sym_name
}


/^CURL_EXTERN .* [*]?curl_.*[(]/ {
sub("[(].*", "")
sub("^.* ", "")
sub("^[*]", "")
add_symbol($0)
}

END {
printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
# sort symbols with shell sort
increment = int(idx / 2)
while (increment > 0) {
for (i = increment+1; i <= idx; i++) {
j = i
temp = exports[i]
while ((j >= increment+1) && (exports[j-increment] > temp)) {
exports[j] = exports[j-increment]
j -= increment
}
exports[j] = temp
}
if (increment == 2)
increment = 1
else
increment = int(increment*5/11)
}
# print the array
if (EXPPREFIX) {
printf(" (%s)\n", EXPPREFIX)
}
while (x < idx - 1) {
printf(" %s,\n", exports[++x])
}
printf(" %s\n", exports[++x])
}

2 changes: 1 addition & 1 deletion packages/NetWare/get_ver.awk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# ***************************************************************************
# awk script which fetches curl / ares version number and string from input
# file and writes them to STDOUT. Here you can get an awk version for Win32:
# http://www.gknw.net/development/prgtools/awk-20070501.zip
# http://www.gknw.net/development/prgtools/awk-20100523.zip
#
BEGIN {
if (match (ARGV[1], /curlver.h/)) {
Expand Down

0 comments on commit 33eac5f

Please sign in to comment.