Move filelister* to cli.

Ticket #2445 (Move FileLister classes from LIB to CLI).
This commit is contained in:
Kimmo Varis 2011-01-18 19:37:15 +02:00 committed by Kimmo Varis
parent 86ac25456e
commit b8b2e3fae9
14 changed files with 39 additions and 36 deletions

View File

@ -37,9 +37,6 @@ LIBOBJ = lib/checkautovariables.o \
lib/cppcheck.o \
lib/errorlogger.o \
lib/executionpath.o \
lib/filelister.o \
lib/filelister_unix.o \
lib/filelister_win32.o \
lib/mathlib.o \
lib/path.o \
lib/preprocessor.o \
@ -51,6 +48,9 @@ LIBOBJ = lib/checkautovariables.o \
CLIOBJ = cli/cmdlineparser.o \
cli/cppcheckexecutor.o \
cli/filelister.o \
cli/filelister_unix.o \
cli/filelister_win32.o \
cli/main.o \
cli/threadexecutor.o
@ -103,8 +103,8 @@ cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)
all: cppcheck testrunner
testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) -lpcre cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o $(LDFLAGS)
testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/filelister_unix.o
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) -lpcre cli/threadexecutor.o cli/cmdlineparser.o cli/filelister.o cli/filelister_unix.o $(LDFLAGS)
test: all
./testrunner
@ -134,7 +134,7 @@ install: cppcheck
###### Build
lib/checkautovariables.o: lib/checkautovariables.cpp lib/checkautovariables.h lib/check.h lib/token.h lib/tokenize.h lib/settings.h lib/errorlogger.h
lib/checkautovariables.o: lib/checkautovariables.cpp lib/checkautovariables.h lib/check.h lib/token.h lib/tokenize.h lib/settings.h lib/errorlogger.h lib/symboldatabase.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/checkautovariables.o lib/checkautovariables.cpp
lib/checkbufferoverrun.o: lib/checkbufferoverrun.cpp lib/checkbufferoverrun.h lib/check.h lib/token.h lib/tokenize.h lib/settings.h lib/errorlogger.h lib/mathlib.h lib/executionpath.h
@ -170,7 +170,7 @@ lib/checkuninitvar.o: lib/checkuninitvar.cpp lib/checkuninitvar.h lib/check.h li
lib/checkunusedfunctions.o: lib/checkunusedfunctions.cpp lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/settings.h lib/errorlogger.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/checkunusedfunctions.o lib/checkunusedfunctions.cpp
lib/cppcheck.o: lib/cppcheck.cpp lib/cppcheck.h lib/settings.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/preprocessor.h lib/filelister.h lib/path.h lib/timer.h
lib/cppcheck.o: lib/cppcheck.cpp lib/cppcheck.h lib/settings.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/preprocessor.h lib/path.h lib/timer.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/cppcheck.o lib/cppcheck.cpp
lib/errorlogger.o: lib/errorlogger.cpp lib/errorlogger.h lib/path.h lib/cppcheck.h lib/settings.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h
@ -179,15 +179,6 @@ lib/errorlogger.o: lib/errorlogger.cpp lib/errorlogger.h lib/path.h lib/cppcheck
lib/executionpath.o: lib/executionpath.cpp lib/executionpath.h lib/token.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/executionpath.o lib/executionpath.cpp
lib/filelister.o: lib/filelister.cpp lib/filelister.h lib/filelister_win32.h lib/filelister_unix.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/filelister.o lib/filelister.cpp
lib/filelister_unix.o: lib/filelister_unix.cpp lib/filelister.h lib/filelister_unix.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/filelister_unix.o lib/filelister_unix.cpp
lib/filelister_win32.o: lib/filelister_win32.cpp lib/filelister.h lib/filelister_win32.h lib/path.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/filelister_win32.o lib/filelister_win32.cpp
lib/mathlib.o: lib/mathlib.cpp lib/mathlib.h lib/tokenize.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/mathlib.o lib/mathlib.cpp
@ -200,7 +191,7 @@ lib/preprocessor.o: lib/preprocessor.cpp lib/preprocessor.h lib/tokenize.h lib/t
lib/settings.o: lib/settings.cpp lib/settings.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/settings.o lib/settings.cpp
lib/symboldatabase.o: lib/symboldatabase.cpp lib/symboldatabase.h lib/tokenize.h lib/token.h lib/settings.h lib/errorlogger.h lib/check.h
lib/symboldatabase.o: lib/symboldatabase.cpp lib/symboldatabase.h lib/token.h lib/tokenize.h lib/settings.h lib/errorlogger.h lib/check.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/symboldatabase.o lib/symboldatabase.cpp
lib/timer.o: lib/timer.cpp lib/timer.h
@ -209,15 +200,24 @@ lib/timer.o: lib/timer.cpp lib/timer.h
lib/token.o: lib/token.cpp lib/token.h lib/errorlogger.h lib/check.h lib/tokenize.h lib/settings.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/token.o lib/token.cpp
lib/tokenize.o: lib/tokenize.cpp lib/tokenize.h lib/token.h lib/filelister.h lib/mathlib.h lib/settings.h lib/errorlogger.h lib/check.h lib/path.h lib/symboldatabase.h
lib/tokenize.o: lib/tokenize.cpp lib/tokenize.h lib/token.h lib/mathlib.h lib/settings.h lib/errorlogger.h lib/check.h lib/path.h lib/symboldatabase.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -c -o lib/tokenize.o lib/tokenize.cpp
cli/cmdlineparser.o: cli/cmdlineparser.cpp lib/cppcheck.h lib/settings.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/timer.h cli/cmdlineparser.h
cli/cmdlineparser.o: cli/cmdlineparser.cpp lib/cppcheck.h lib/settings.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/timer.h cli/cmdlineparser.h lib/path.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -Iexternals -c -o cli/cmdlineparser.o cli/cmdlineparser.cpp
cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cppcheckexecutor.h lib/errorlogger.h lib/settings.h lib/cppcheck.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h cli/threadexecutor.h cli/cmdlineparser.h lib/filelister.h
cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cppcheckexecutor.h lib/errorlogger.h lib/settings.h lib/cppcheck.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h cli/threadexecutor.h cli/cmdlineparser.h cli/filelister.h lib/path.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -Iexternals -c -o cli/cppcheckexecutor.o cli/cppcheckexecutor.cpp
cli/filelister.o: cli/filelister.cpp cli/filelister.h cli/filelister_win32.h cli/filelister_unix.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -Iexternals -c -o cli/filelister.o cli/filelister.cpp
cli/filelister_unix.o: cli/filelister_unix.cpp lib/path.h cli/filelister.h cli/filelister_unix.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -Iexternals -c -o cli/filelister_unix.o cli/filelister_unix.cpp
cli/filelister_win32.o: cli/filelister_win32.cpp cli/filelister.h cli/filelister_win32.h lib/path.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -Iexternals -c -o cli/filelister_win32.o cli/filelister_win32.cpp
cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/errorlogger.h lib/settings.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -Iexternals -c -o cli/main.o cli/main.cpp
@ -257,7 +257,7 @@ test/testerrorlogger.o: test/testerrorlogger.cpp test/testsuite.h lib/errorlogge
test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/tokenize.h lib/checkexceptionsafety.h lib/check.h lib/token.h lib/settings.h lib/errorlogger.h test/testsuite.h test/redirect.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -Icli -Iexternals -c -o test/testexceptionsafety.o test/testexceptionsafety.cpp
test/testfilelister_unix.o: test/testfilelister_unix.cpp test/testsuite.h lib/errorlogger.h test/redirect.h lib/filelister_unix.h lib/filelister.h
test/testfilelister_unix.o: test/testfilelister_unix.cpp test/testsuite.h lib/errorlogger.h test/redirect.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -Ilib -Icli -Iexternals -c -o test/testfilelister_unix.o test/testfilelister_unix.cpp
test/testincompletestatement.o: test/testincompletestatement.cpp test/testsuite.h lib/errorlogger.h test/redirect.h lib/tokenize.h lib/checkother.h lib/check.h lib/token.h lib/settings.h

View File

@ -14,9 +14,15 @@ include($$PWD/../lib/lib.pri)
SOURCES += main.cpp \
cppcheckexecutor.cpp \
cmdlineparser.cpp \
filelister.cpp \
filelister_unix.cpp \
filelister_win32.cpp \
threadexecutor.cpp
HEADERS += cppcheckexecutor.h \
cmdlineparser.h \
cmdlineparser.h \
filelister.h \
filelister_unix.h \
filelister_win32.h \
threadexecutor.h
CONFIG(release, debug|release) {

View File

@ -20,8 +20,6 @@
#include "preprocessor.h" // preprocessor.
#include "tokenize.h" // <- Tokenizer
#include "filelister.h"
#include "check.h"
#include "path.h"

View File

@ -18,9 +18,6 @@ HEADERS += $${BASEPATH}check.h \
$${BASEPATH}cppcheck.h \
$${BASEPATH}errorlogger.h \
$${BASEPATH}executionpath.h \
$${BASEPATH}filelister.h \
$${BASEPATH}filelister_unix.h \
$${BASEPATH}filelister_win32.h \
$${BASEPATH}mathlib.h \
$${BASEPATH}path.h \
$${BASEPATH}preprocessor.h \
@ -45,9 +42,6 @@ SOURCES += $${BASEPATH}checkautovariables.cpp \
$${BASEPATH}cppcheck.cpp \
$${BASEPATH}errorlogger.cpp \
$${BASEPATH}executionpath.cpp \
$${BASEPATH}filelister.cpp \
$${BASEPATH}filelister_unix.cpp \
$${BASEPATH}filelister_win32.cpp \
$${BASEPATH}mathlib.cpp \
$${BASEPATH}path.cpp \
$${BASEPATH}preprocessor.cpp \

View File

@ -24,7 +24,6 @@
#include "tokenize.h"
#include "token.h"
#include "filelister.h"
#include "mathlib.h"
#include "settings.h"
#include "errorlogger.h"

View File

@ -18,9 +18,15 @@ include(../lib/lib.pri)
# cli/*
SOURCES += ../cli/cmdlineparser.cpp \
../cli/cppcheckexecutor.cpp \
../cli/filelister.cpp \
../cli/filelister_unix.cpp \
../cli/filelister_win32.cpp \
../cli/threadexecutor.cpp
HEADERS += ../cli/cmdlineparser.h \
../cli/cppcheckexecutor.h \
../cli/filelister.h \
../cli/filelister_unix.h \
../cli/filelister_win32.h \
../cli/threadexecutor.h
# test/*

View File

@ -5,6 +5,6 @@ errmsg: errmsg.cpp
g++ -Wall -pedantic -o errmsg errmsg.cpp
dmake: dmake.cpp
g++ -Wall -pedantic -o dmake dmake.cpp ../lib/filelister.cpp ../lib/filelister_unix.cpp
g++ -Wall -pedantic -o dmake -I../lib dmake.cpp ../cli/filelister.cpp ../cli/filelister_unix.cpp ../lib/path.cpp

View File

@ -25,9 +25,9 @@
#include <vector>
#if defined(_WIN32)
#include "../lib/fileLister_win32.h"
#include "../cli/fileLister_win32.h"
#else // POSIX-style system
#include "../lib/filelister_unix.h"
#include "../cli/filelister_unix.h"
#endif
std::string objfile(std::string cppfile)
@ -230,8 +230,8 @@ int main(int argc, char **argv)
fout << "cppcheck:\t$(LIBOBJ)\t$(CLIOBJ)\t$(EXTOBJ)\n";
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) -lpcre $(LDFLAGS)\n\n";
fout << "all:\tcppcheck\ttestrunner\n\n";
fout << "testrunner:\t$(TESTOBJ)\t$(LIBOBJ)\t$(EXTOBJ)\tcli/threadexecutor.o\tcli/cmdlineparser.o\tcli/cppcheckexecutor.o\n";
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) -lpcre cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o $(LDFLAGS)\n\n";
fout << "testrunner:\t$(TESTOBJ)\t$(LIBOBJ)\t$(EXTOBJ)\tcli/threadexecutor.o\tcli/cmdlineparser.o\tcli/cppcheckexecutor.o\tcli/filelister.o\tcli/filelister_unix.o\n";
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) -lpcre cli/threadexecutor.o cli/cmdlineparser.o\tcli/filelister.o\tcli/filelister_unix.o $(LDFLAGS)\n\n";
fout << "test:\tall\n";
fout << "\t./testrunner\n\n";
fout << "check:\tall\n";