Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
277e45f4
Commit
277e45f4
authored
Nov 23, 2010
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the Makefile from the tests/ folder too
Signed-off-by: Vicent Marti <tanoku@gmail.com>
parent
824f4acd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
133 deletions
+0
-133
tests/Makefile
+0
-133
No files found.
tests/Makefile
deleted
100644 → 0
View file @
824f4acd
all
::
LD
=
$(CC)
uname_S
:=
$(
shell
sh
-c
'uname -s 2>/dev/null || echo no'
)
ifdef
MSVC
# avoid the MinGW and Cygwin configuration sections
uname_S
:=
Windows
endif
CFLAGS
=
-g
-O2
-Wall
-Wextra
LIBS
=
-L
..
-lgit2
-lz
OS
=
unix
VFLAGS
=
-q
--error-exitcode
=
1
--leak-check
=
yes
--suppressions
=
../tests.supp
CRYPTO_LIB
=
-lcrypto
EXTRA_LIBS
=
LD_OUT
=
-o
# add a space
CC_OUT
=
-o
# add a space
# Platform specific tweaks
ifeq
($(uname_S),Windows)
CC
=
cl
-nologo
LD
=
link
-nologo
CFLAGS
=
-TC
-W4
-RTC1
-Zi
-DWIN32
-D_DEBUG
-D_LIB
LD_OUT
=
-out
:
CC_OUT
=
-Fo
LIBS
=
..
\\
libgit2.a libz.lib
CRYPTO_LIB
=
libeay32.lib
endif
ifneq
(,$(findstring
MINGW,$(uname_S)))
OS
=
win32
EXTRA_LIBS
+=
-lpthread
endif
-include
../config.mak
GIT_LIB
=
../libgit2.a
HDRS
=
$
(
wildcard ../src/
*
.h
)
PUBLIC_HEADERS
=
$
(
wildcard ../src/git/
*
.h
)
HDRS
+=
$(PUBLIC_HEADERS)
TEST_OBJ
=
$
(
patsubst %.c,%.o,
\
$
(
wildcard t[0-9][0-9][0-9][0-9]-
*
.c
))
TEST_EXE
=
$
(
patsubst %.o,%.exe,
$(TEST_OBJ)
)
TEST_RUN
=
$
(
patsubst %.exe,%.run,
$(TEST_EXE)
)
TEST_VAL
=
$
(
patsubst %.exe,%.val,
$(TEST_EXE)
)
ifdef
TEST_COVERAGE
EXTRA_LIBS
+=
-O0
-lgcov
endif
ifdef
OPENSSL_SHA1
EXTRA_LIBS
+=
$(CRYPTO_LIB)
endif
BASIC_CFLAGS
:=
-I
../src
ALL_CFLAGS
=
$(CFLAGS)
$(BASIC_CFLAGS)
ALL_LIBS
=
$(LIBS)
$(EXTRA_LIBS)
all
::
$(TEST_RUN)
clean
:
rm
-f
*
.o
*
.exe
*
.toc
*
.pdb
rm
-rf
trash-
*
.exe
rm
-f
*
~
test
:
$(TEST_RUN)
valgrind
:
$(TEST_VAL)
.c.o
:
$(CC)
$(ALL_CFLAGS)
-c
$<
$(CC_OUT)$@
T_HDR
=
test_lib.h test_helpers.h
T_LIB
=
test_lib.o test_helpers.o
T_MAIN_C
=
test_main.c
$(T_LIB)
:
$(T_HDR) $(HDRS)
$(TEST_OBJ)
:
$(T_HDR) $(HDRS)
$(patsubst %.exe,%.toc,$(TEST_EXE))
:
%.toc: %.c
grep
BEGIN_TEST
$<
>
$@
+
mv
$@
+
$@
$(TEST_OBJ)
:
%.o: %.c
$(CC)
$(ALL_CFLAGS)
-c
$<
$(CC_OUT)$@
$(patsubst %.exe,%_main.o,$(TEST_EXE))
:
%_main.o: $(HDRS)
$(patsubst %.exe,%_main.o,$(TEST_EXE))
:
%_main.o: $(T_MAIN_C)
$(patsubst %.exe,%_main.o,$(TEST_EXE))
:
%_main.o: %.toc
$(CC)
$(ALL_CFLAGS)
'-DTEST_TOC="$<"'
\
-c
$(T_MAIN_C)
\
$(CC_OUT)$@
$(TEST_EXE)
:
%.exe: $(T_LIB)
$(TEST_EXE)
:
%.exe: $(GIT_LIB)
$(TEST_EXE)
:
%.exe: %.o %_main.o
$(LD)
$(LD_OUT)$@
\
$
(
patsubst %.exe,%_main.o,
$@
)
\
$
(
patsubst %.exe,%.o,
$@
)
\
$(T_LIB)
$(ALL_LIBS)
$(TEST_RUN)
:
%.run: %.exe
@
t
=
trash-
$
(
<F
)
&&
\
mkdir
$$
t
&&
\
if
(
cd
$$
t
&&
../
$<
)
;
\
then
rm
-rf
$$
t
;
\
else
rmdir
$$
t
;
exit
1
;
\
fi
$(TEST_VAL)
:
%.val: %.exe
@
t
=
trash-
$
(
<F
)
&&
\
mkdir
$$
t
&&
\
if
(
cd
$$
t
&&
valgrind
$(VFLAGS)
../
$<
)
;
\
then
rm
-rf
$$
t
;
\
else
rmdir
$$
t
;
exit
1
;
\
fi
.PHONY
:
all
.PHONY
:
clean
.PHONY
:
test $(TEST_RUN)
.PHONY
:
$(TEST_VAL)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment