summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-09-10 10:33:38 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-09-10 10:33:38 +0200
commita3cc8b970a24e1970275f0e8032bf6b221d3e235 (patch)
tree8f69aa22ef6abf18457db3d923fbb1feaf2c5a48
parentdcc75cfbc4e5069038f0ec9929d1000f1630e382 (diff)
downloadcrawler-a3cc8b970a24e1970275f0e8032bf6b221d3e235.tar.gz
crawler-a3cc8b970a24e1970275f0e8032bf6b221d3e235.tar.bz2
libutil move and liblogger rename on Windows
-rwxr-xr-xinclude/util/UtilExportable.hpp4
-rwxr-xr-xinclude/util/win32/errormsg.hpp4
-rwxr-xr-xinclude/util/win32/stringutils.hpp4
-rwxr-xr-xsrc/GNUmakefile2
-rwxr-xr-xsrc/Makefile.W325
-rwxr-xr-xsrc/crawl/Makefile.W323
-rwxr-xr-xsrc/libcrawler/Makefile.W326
-rwxr-xr-xsrc/liblogger/ConsoleLogSink.cpp (renamed from src/logger/ConsoleLogSink.cpp)0
-rw-r--r--src/liblogger/FileLogSink.cpp (renamed from src/logger/FileLogSink.cpp)0
-rwxr-xr-xsrc/liblogger/GNUmakefile (renamed from src/logger/GNUmakefile)0
-rwxr-xr-xsrc/liblogger/Logger.cpp (renamed from src/logger/Logger.cpp)0
-rwxr-xr-xsrc/liblogger/Makefile.W32 (renamed from src/logger/Makefile.W32)23
-rwxr-xr-xsrc/liblogger/SyslogLogSink.cpp (renamed from src/logger/SyslogLogSink.cpp)0
-rwxr-xr-xsrc/liblogger/WinDbgLogSink.cpp (renamed from src/logger/WinDbgLogSink.cpp)0
-rw-r--r--src/liblogger/win32/syslog_win32.c (renamed from src/logger/win32/syslog_win32.c)0
-rw-r--r--src/liblogger/win32/syslog_win32.h (renamed from src/logger/win32/syslog_win32.h)0
-rwxr-xr-xsrc/modules/deduper/null/Makefile.W322
-rwxr-xr-xsrc/modules/fetcher/winhttp/Makefile.W323
-rwxr-xr-xsrc/modules/frontier/memory/Makefile.W322
-rwxr-xr-xsrc/modules/processor/htmllinkextract/Makefile.W322
-rwxr-xr-xsrc/modules/urlfilter/host/Makefile.W322
-rwxr-xr-xsrc/modules/urlfilter/protocol/Makefile.W322
-rwxr-xr-xsrc/modules/urlnormalizer/simpleurl/Makefile.W322
-rwxr-xr-xsrc/modules/urlseen/memory/Makefile.W322
-rwxr-xr-xtests/fetcher/Makefile.W323
-rw-r--r--tests/fetcher/run.cmd7
-rwxr-xr-xtests/logger/Makefile.W322
-rwxr-xr-xtests/logger/exec_test.cmd2
-rwxr-xr-xtests/modules/Makefile.W321
-rwxr-xr-xtests/modules/exec_test.cmd3
-rwxr-xr-xtests/modules/testmod3/Makefile.W322
-rwxr-xr-xtests/url/Makefile.W321
-rwxr-xr-xtests/url/exec_test.cmd3
33 files changed, 59 insertions, 33 deletions
diff --git a/include/util/UtilExportable.hpp b/include/util/UtilExportable.hpp
index f9598f1..160a0f3 100755
--- a/include/util/UtilExportable.hpp
+++ b/include/util/UtilExportable.hpp
@@ -19,8 +19,8 @@
#define UTIL_DLL_VISIBLE
-#endif
+#endif // BUILDING_UTIL
-#endif
+#endif // _WIN32
#endif
diff --git a/include/util/win32/errormsg.hpp b/include/util/win32/errormsg.hpp
index f1ceb93..93ce3b7 100755
--- a/include/util/win32/errormsg.hpp
+++ b/include/util/win32/errormsg.hpp
@@ -3,8 +3,8 @@
#include <string>
-#include "CrawlerExportable.hpp"
+#include "UtilExportable.hpp"
-CRAWLER_DLL_VISIBLE std::string getLastError( );
+UTIL_DLL_VISIBLE std::string getLastError( );
#endif
diff --git a/include/util/win32/stringutils.hpp b/include/util/win32/stringutils.hpp
index b0404cd..8f293dd 100755
--- a/include/util/win32/stringutils.hpp
+++ b/include/util/win32/stringutils.hpp
@@ -3,8 +3,8 @@
#include <string>
-#include "CrawlerExportable.hpp"
+#include "UtilExportable.hpp"
-CRAWLER_DLL_VISIBLE std::wstring s2ws( const std::string &s );
+UTIL_DLL_VISIBLE std::wstring s2ws( const std::string &s );
#endif
diff --git a/src/GNUmakefile b/src/GNUmakefile
index 448253e..187fbb9 100755
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -1,6 +1,6 @@
TOPDIR = ..
-SUBDIRS = libutil logger libcrawler modules crawl
+SUBDIRS = libutil liblogger libcrawler modules crawl
-include $(TOPDIR)/makefiles/gmake/sub.mk
diff --git a/src/Makefile.W32 b/src/Makefile.W32
index 782805a..6845288 100755
--- a/src/Makefile.W32
+++ b/src/Makefile.W32
@@ -1,6 +1,6 @@
TOPDIR = ..
-SUBDIRS = libutil logger libcrawler modules crawl
+SUBDIRS = libutil liblogger libcrawler modules crawl
!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk
@@ -15,7 +15,8 @@ local_test:
copy_prereq:
@-copy "$(ICU_DIR)\bin\icuuc49.dll" . >NUL
@-copy "$(ICU_DIR)\bin\icudt49.dll" . >NUL
- @-copy "$(TOPDIR)\src\logger\logger.dll" . >NUL
+ @-copy "$(TOPDIR)\src\libutil\util.dll" . >NUL
+ @-copy "$(TOPDIR)\src\liblogger\logger.dll" . >NUL
@-copy "$(TOPDIR)\src\libcrawler\crawler.dll" . >NUL
run: copy_prereq
diff --git a/src/crawl/Makefile.W32 b/src/crawl/Makefile.W32
index 74442dc..f4f6e82 100755
--- a/src/crawl/Makefile.W32
+++ b/src/crawl/Makefile.W32
@@ -18,7 +18,8 @@ INCLUDE_DIRS = \
INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
- $(TOPDIR)\src\logger\logger.lib \
+ $(TOPDIR)\src\libutil\util.lib \
+ $(TOPDIR)\src\liblogger\logger.lib \
$(TOPDIR)\src\libcrawler\crawler.lib
CPP_OBJS = \
diff --git a/src/libcrawler/Makefile.W32 b/src/libcrawler/Makefile.W32
index 7408a4f..2d31f47 100755
--- a/src/libcrawler/Makefile.W32
+++ b/src/libcrawler/Makefile.W32
@@ -17,18 +17,14 @@ INCLUDE_DIRS = \
INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
- $(TOPDIR)\src\logger\logger.lib
+ $(TOPDIR)\src\liblogger\logger.lib
CPP_OBJS = \
- win32\errormsg.obj \
- win32\stringutils.obj \
URL.obj \
MIMEType.obj \
SpoolRewindInputStream.obj
DYNAMIC_CPP_OBJS = \
- win32\errormsg.dllobj \
- win32\stringutils.dllobj \
URL.dllobj \
MIMEType.dllobj \
SpoolRewindInputStream.dllobj
diff --git a/src/logger/ConsoleLogSink.cpp b/src/liblogger/ConsoleLogSink.cpp
index 84a1ebd..84a1ebd 100755
--- a/src/logger/ConsoleLogSink.cpp
+++ b/src/liblogger/ConsoleLogSink.cpp
diff --git a/src/logger/FileLogSink.cpp b/src/liblogger/FileLogSink.cpp
index d812dbe..d812dbe 100644
--- a/src/logger/FileLogSink.cpp
+++ b/src/liblogger/FileLogSink.cpp
diff --git a/src/logger/GNUmakefile b/src/liblogger/GNUmakefile
index 7993f7d..7993f7d 100755
--- a/src/logger/GNUmakefile
+++ b/src/liblogger/GNUmakefile
diff --git a/src/logger/Logger.cpp b/src/liblogger/Logger.cpp
index c4d44d8..c4d44d8 100755
--- a/src/logger/Logger.cpp
+++ b/src/liblogger/Logger.cpp
diff --git a/src/logger/Makefile.W32 b/src/liblogger/Makefile.W32
index d5516ca..10c99f6 100755
--- a/src/logger/Makefile.W32
+++ b/src/liblogger/Makefile.W32
@@ -6,7 +6,7 @@ SUBDIRS =
INCLUDE_CXXFLAGS = \
/D_WIN32_WINNT=0x504 \
- /DSHARED /DBUILDING_LOGGER /DBUILDING_UTIL
+ /DBUILDING_LOGGER /DBUILDING_UTIL
INCLUDE_DIRS = \
/I. \
@@ -16,6 +16,7 @@ INCLUDE_DIRS = \
INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
+ $(TOPDIR)\src\libutil\util.lib \
Ws2_32.lib
CPP_OBJS = \
@@ -25,19 +26,33 @@ CPP_OBJS = \
FileLogSink.obj \
SyslogLogSink.obj \
WinDbgLogSink.obj
+
+DYNAMIC_CPP_OBJS = \
+ win32\syslog_win32.dllobj \
+ Logger.dllobj \
+ ConsoleLogSink.dllobj \
+ FileLogSink.dllobj \
+ SyslogLogSink.dllobj \
+ WinDbgLogSink.dllobj
DYNAMIC_LIB = \
logger.dll
+STATIC_LIB = \
+ loggerstatic.lib
+
!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk
-$(DYNAMIC_LIB): $(CPP_OBJS)
+$(DYNAMIC_LIB): $(DYNAMIC_CPP_OBJS)
$(LINK) /nologo /dll /out:$@ $(LDFLAGS) $(LIBS) $?
-local_all: $(DYNAMIC_LIB)
+$(STATIC_LIB): $(CPP_OBJS)
+ $(LINK) /nologo /dll /out:$@ $(STATIC_LDFLAGS) $(LIBS) $?
+
+local_all: $(DYNAMIC_LIB) $(STATIC_LIB)
local_clean:
- @-erase $(DYNAMIC_LIB) 2>NUL
+ @-erase $(DYNAMIC_LIB) $(STATIC_LIB) 2>NUL
@-erase win32\*.obj 2>NUL
local_distclean:
diff --git a/src/logger/SyslogLogSink.cpp b/src/liblogger/SyslogLogSink.cpp
index c2716a9..c2716a9 100755
--- a/src/logger/SyslogLogSink.cpp
+++ b/src/liblogger/SyslogLogSink.cpp
diff --git a/src/logger/WinDbgLogSink.cpp b/src/liblogger/WinDbgLogSink.cpp
index f5a830c..f5a830c 100755
--- a/src/logger/WinDbgLogSink.cpp
+++ b/src/liblogger/WinDbgLogSink.cpp
diff --git a/src/logger/win32/syslog_win32.c b/src/liblogger/win32/syslog_win32.c
index e94bb9e..e94bb9e 100644
--- a/src/logger/win32/syslog_win32.c
+++ b/src/liblogger/win32/syslog_win32.c
diff --git a/src/logger/win32/syslog_win32.h b/src/liblogger/win32/syslog_win32.h
index 94157a1..94157a1 100644
--- a/src/logger/win32/syslog_win32.h
+++ b/src/liblogger/win32/syslog_win32.h
diff --git a/src/modules/deduper/null/Makefile.W32 b/src/modules/deduper/null/Makefile.W32
index e0d6c60..4217b3d 100755
--- a/src/modules/deduper/null/Makefile.W32
+++ b/src/modules/deduper/null/Makefile.W32
@@ -17,7 +17,7 @@ INCLUDE_DIRS = \
copy_prereq:
@-copy "$(ICU_DIR)\bin\icuuc49.dll" . >NUL
@-copy "$(ICU_DIR)\bin\icudt49.dll" . >NUL
- @-copy "$(TOPDIR)\src\logger\logger.dll" . >NUL
+ @-copy "$(TOPDIR)\src\liblogger\logger.dll" . >NUL
run: copy_prereq
@-crawl.exe
diff --git a/src/modules/fetcher/winhttp/Makefile.W32 b/src/modules/fetcher/winhttp/Makefile.W32
index 4cedb9c..b996b5d 100755
--- a/src/modules/fetcher/winhttp/Makefile.W32
+++ b/src/modules/fetcher/winhttp/Makefile.W32
@@ -19,7 +19,8 @@ INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
$(TOPDIR)\src\libcrawler\crawler.lib \
- $(TOPDIR)\src\logger\logger.lib \
+ $(TOPDIR)\src\liblogger\logger.lib \
+ $(TOPDIR)\src\libutil\util.lib \
WinHttp.lib
DYNAMIC_MODULE = \
diff --git a/src/modules/frontier/memory/Makefile.W32 b/src/modules/frontier/memory/Makefile.W32
index b12e4ca..30ecd0e 100755
--- a/src/modules/frontier/memory/Makefile.W32
+++ b/src/modules/frontier/memory/Makefile.W32
@@ -19,7 +19,7 @@ INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
$(TOPDIR)\src\libcrawler\crawler.lib \
- $(TOPDIR)\src\logger\logger.lib
+ $(TOPDIR)\src\liblogger\logger.lib
DYNAMIC_MODULE = \
mod_frontier_memory.dll
diff --git a/src/modules/processor/htmllinkextract/Makefile.W32 b/src/modules/processor/htmllinkextract/Makefile.W32
index 1a34965..9e04666 100755
--- a/src/modules/processor/htmllinkextract/Makefile.W32
+++ b/src/modules/processor/htmllinkextract/Makefile.W32
@@ -21,7 +21,7 @@ INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
$(TOPDIR)\streamhtmlparser\streamhtmlparser.lib \
$(TOPDIR)\src\libcrawler\crawler.lib \
- $(TOPDIR)\src\logger\logger.lib
+ $(TOPDIR)\src\liblogger\logger.lib
DYNAMIC_MODULE = \
mod_processor_htmllinkextract.dll
diff --git a/src/modules/urlfilter/host/Makefile.W32 b/src/modules/urlfilter/host/Makefile.W32
index 024dc67..211d7ac 100755
--- a/src/modules/urlfilter/host/Makefile.W32
+++ b/src/modules/urlfilter/host/Makefile.W32
@@ -19,7 +19,7 @@ INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
$(TOPDIR)\src\libcrawler\crawler.lib \
- $(TOPDIR)\src\logger\logger.lib
+ $(TOPDIR)\src\liblogger\logger.lib
DYNAMIC_MODULE = \
mod_urlfilter_host.dll
diff --git a/src/modules/urlfilter/protocol/Makefile.W32 b/src/modules/urlfilter/protocol/Makefile.W32
index e859829..2a723a3 100755
--- a/src/modules/urlfilter/protocol/Makefile.W32
+++ b/src/modules/urlfilter/protocol/Makefile.W32
@@ -19,7 +19,7 @@ INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
$(TOPDIR)\src\libcrawler\crawler.lib \
- $(TOPDIR)\src\logger\logger.lib
+ $(TOPDIR)\src\liblogger\logger.lib
DYNAMIC_MODULE = \
mod_urlfilter_protocol.dll
diff --git a/src/modules/urlnormalizer/simpleurl/Makefile.W32 b/src/modules/urlnormalizer/simpleurl/Makefile.W32
index 641b656..b0cb7c5 100755
--- a/src/modules/urlnormalizer/simpleurl/Makefile.W32
+++ b/src/modules/urlnormalizer/simpleurl/Makefile.W32
@@ -23,7 +23,7 @@ DYNAMIC_MODULE = \
mod_urlnormalizer_simple.dll
STATIC_LIB = \
- simpleurlnormalizerstatic.lib
+ simpleurlnormalizer.lib
CPP_OBJS = \
SimpleURLNormalizer.obj
diff --git a/src/modules/urlseen/memory/Makefile.W32 b/src/modules/urlseen/memory/Makefile.W32
index 717f69c..ada2a6c 100755
--- a/src/modules/urlseen/memory/Makefile.W32
+++ b/src/modules/urlseen/memory/Makefile.W32
@@ -19,7 +19,7 @@ INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
$(TOPDIR)\src\libcrawler\crawler.lib \
- $(TOPDIR)\src\logger\logger.lib
+ $(TOPDIR)\src\liblogger\logger.lib
DYNAMIC_MODULE = \
mod_urlseen_memory.dll
diff --git a/tests/fetcher/Makefile.W32 b/tests/fetcher/Makefile.W32
index fb33e07..b4e5128 100755
--- a/tests/fetcher/Makefile.W32
+++ b/tests/fetcher/Makefile.W32
@@ -23,7 +23,8 @@ INCLUDE_LIBS = \
$(TOPDIR)\src\modules\fetcher\winhttp\winhttpfetcher.lib \
WinHttp.lib \
$(TOPDIR)\src\modules\urlnormalizer\simpleurl\simpleurlnormalizerstatic.lib \
- $(TOPDIR)\src\libcrawler\crawlerstatic.lib
+ $(TOPDIR)\src\libcrawler\crawlerstatic.lib \
+ $(TOPDIR)\src\libutil\util.lib
TEST_CPP_BINS = \
test1.exe
diff --git a/tests/fetcher/run.cmd b/tests/fetcher/run.cmd
new file mode 100644
index 0000000..5b6b4b5
--- /dev/null
+++ b/tests/fetcher/run.cmd
@@ -0,0 +1,7 @@
+@echo off
+
+copy ..\..\src\libcrawler\crawler.dll . >NUL
+copy ..\..\src\liblogger\logger.dll . >NUL
+copy ..\..\src\libutil\util.dll . >NUL
+test1 %1 %2
+
diff --git a/tests/logger/Makefile.W32 b/tests/logger/Makefile.W32
index 783add0..2ae78cc 100755
--- a/tests/logger/Makefile.W32
+++ b/tests/logger/Makefile.W32
@@ -17,7 +17,7 @@ INCLUDE_DIRS = \
INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
- $(TOPDIR)\src\logger\logger.lib \
+ $(TOPDIR)\src\liblogger\logger.lib \
Ws2_32.lib
TEST_CPP_BINS = \
diff --git a/tests/logger/exec_test.cmd b/tests/logger/exec_test.cmd
index 123b666..7efe5bc 100755
--- a/tests/logger/exec_test.cmd
+++ b/tests/logger/exec_test.cmd
@@ -3,7 +3,7 @@
set BINARY=%1
set TITLE=%2
-copy ..\..\src\logger\logger.dll . >NUL
+copy ..\..\src\liblogger\logger.dll . >NUL
%BINARY% >%BINARY%.OUT 2>%BINARY%.ERR
..\..\utils\win32\dos2unix <%BINARY%.OUT >%BINARY%.RES
..\..\utils\win32\dos2unix <%BINARY%.ERR >%BINARY%.RES
diff --git a/tests/modules/Makefile.W32 b/tests/modules/Makefile.W32
index 405166f..ea86b36 100755
--- a/tests/modules/Makefile.W32
+++ b/tests/modules/Makefile.W32
@@ -18,6 +18,7 @@ INCLUDE_DIRS = \
INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
+ $(TOPDIR)\src\libutil\util.lib \
$(TOPDIR)\src\libcrawler\crawler.lib \
$(TOPDIR)\tests\modules\libcommon\common.lib
diff --git a/tests/modules/exec_test.cmd b/tests/modules/exec_test.cmd
index 511c14a..d2763e9 100755
--- a/tests/modules/exec_test.cmd
+++ b/tests/modules/exec_test.cmd
@@ -5,7 +5,8 @@ set TITLE=%2
copy libcommon\common.dll . >NUL
copy ..\..\src\libcrawler\crawler.dll . >NUL
-copy ..\..\src\logger\logger.dll . >NUL
+copy ..\..\src\liblogger\logger.dll . >NUL
+copy ..\..\src\libutil\util.dll . >NUL
%BINARY% >%BINARY%.OUT 2>%BINARY%.ERR
..\..\utils\win32\dos2unix <%BINARY%.OUT >%BINARY%.RES
erase /q %BINARY%.OUT
diff --git a/tests/modules/testmod3/Makefile.W32 b/tests/modules/testmod3/Makefile.W32
index d4ead3c..44d289d 100755
--- a/tests/modules/testmod3/Makefile.W32
+++ b/tests/modules/testmod3/Makefile.W32
@@ -19,7 +19,7 @@ INCLUDE_DIRS = \
INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
- $(TOPDIR)\src\libcrawler\crawler.lib \
+ $(TOPDIR)\src\libutil\util.lib \
..\libcommon\common.lib
DYNAMIC_MODULE = \
diff --git a/tests/url/Makefile.W32 b/tests/url/Makefile.W32
index ff48b7f..d71853c 100755
--- a/tests/url/Makefile.W32
+++ b/tests/url/Makefile.W32
@@ -20,6 +20,7 @@ INCLUDE_DIRS = \
INCLUDE_LDFLAGS = \
INCLUDE_LIBS = \
+ $(TOPDIR)\src\libutil\util.lib \
$(TOPDIR)\src\libcrawler\crawler.lib \
$(TOPDIR)\src\modules\urlnormalizer\simpleurl\simpleurlnormalizer.lib \
$(TOPDIR)\src\modules\urlnormalizer\googleurl\googleurlnormalizer.lib \
diff --git a/tests/url/exec_test.cmd b/tests/url/exec_test.cmd
index e01c81e..79af578 100755
--- a/tests/url/exec_test.cmd
+++ b/tests/url/exec_test.cmd
@@ -7,8 +7,9 @@ shift
set TITLE=%1
shift
+copy ..\..\src\libutil\util.dll . >NUL
copy ..\..\src\libcrawler\crawler.dll . >NUL
-copy ..\..\src\logger\logger.dll . >NUL
+copy ..\..\src\liblogger\logger.dll . >NUL
%BINARY% %1 %2 %3 %4 >%ID%.OUT 2>%ID%.ERR
type %ID%.ERR >> %ID%.OUT
..\..\utils\win32\dos2unix <%ID%.OUT >%ID%.RES