2008-05-26 17:15:35 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive
|
2008-05-26 17:15:35 +00:00
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
.PATH: ${LIBARCHIVEDIR}/cpio
|
2011-07-17 21:42:22 +00:00
|
|
|
CPIO_SRCS= cmdline.c
|
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
.PATH: ${LIBARCHIVEDIR}/libarchive_fe
|
2011-07-17 21:52:55 +00:00
|
|
|
CPIO_SRCS+= err.c pathmatch.c
|
2008-05-26 17:15:35 +00:00
|
|
|
|
2011-12-22 08:42:07 +00:00
|
|
|
.PATH: ${LIBARCHIVEDIR}/cpio/test
|
2008-05-26 17:15:35 +00:00
|
|
|
TESTS= \
|
|
|
|
test_0.c \
|
|
|
|
test_basic.c \
|
|
|
|
test_format_newc.c \
|
|
|
|
test_gcpio_compat.c \
|
2011-07-17 21:42:22 +00:00
|
|
|
test_option_B_upper.c \
|
|
|
|
test_option_C_upper.c \
|
|
|
|
test_option_J_upper.c \
|
|
|
|
test_option_L_upper.c \
|
|
|
|
test_option_Z_upper.c \
|
2008-05-26 17:15:35 +00:00
|
|
|
test_option_a.c \
|
|
|
|
test_option_c.c \
|
|
|
|
test_option_d.c \
|
|
|
|
test_option_f.c \
|
|
|
|
test_option_help.c \
|
2011-07-17 21:42:22 +00:00
|
|
|
test_option_l.c \
|
|
|
|
test_option_lzma.c \
|
2008-05-26 17:15:35 +00:00
|
|
|
test_option_m.c \
|
|
|
|
test_option_t.c \
|
|
|
|
test_option_u.c \
|
|
|
|
test_option_version.c \
|
|
|
|
test_option_y.c \
|
|
|
|
test_option_z.c \
|
|
|
|
test_owner_parse.c \
|
2008-08-24 05:14:03 +00:00
|
|
|
test_passthrough_dotdot.c \
|
2008-08-24 04:58:22 +00:00
|
|
|
test_passthrough_reverse.c \
|
|
|
|
test_pathmatch.c
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
# Build the test program
|
|
|
|
SRCS= list.h \
|
|
|
|
${CPIO_SRCS} \
|
|
|
|
${TESTS} \
|
|
|
|
main.c
|
|
|
|
|
2008-08-24 05:49:36 +00:00
|
|
|
CLEANFILES+= list.h bsdcpio_test
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
NO_MAN=yes
|
|
|
|
|
|
|
|
PROG=bsdcpio_test
|
2010-05-10 15:28:44 +00:00
|
|
|
DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
|
2011-12-22 08:42:07 +00:00
|
|
|
CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\"
|
|
|
|
CFLAGS+= -I${.CURDIR}/..
|
2010-05-10 15:28:44 +00:00
|
|
|
LDADD= -larchive -lz -lbz2 -llzma
|
2011-07-17 21:42:22 +00:00
|
|
|
#CFLAGS+= -static -g -O2 -Wall
|
|
|
|
CFLAGS+= -g -O2 -Wall
|
2008-05-26 17:15:35 +00:00
|
|
|
CFLAGS+= -I${.OBJDIR}
|
2011-12-22 08:42:07 +00:00
|
|
|
CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
# Uncomment to link against dmalloc
|
|
|
|
#LDADD+= -L/usr/local/lib -ldmalloc
|
|
|
|
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
|
|
|
|
|
|
|
|
check test: bsdcpio_test
|
2011-12-22 08:42:07 +00:00
|
|
|
${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio \
|
|
|
|
-r ${LIBARCHIVEDIR}/cpio/test
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
${.OBJDIR}/list.h list.h: ${TESTS} Makefile
|
2011-12-22 08:42:07 +00:00
|
|
|
(cd ${LIBARCHIVEDIR}/cpio/test; cat ${TESTS}) | \
|
|
|
|
grep DEFINE_TEST > ${.OBJDIR}/list.h
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
clean:
|
2008-08-24 05:49:36 +00:00
|
|
|
rm -f ${CLEANFILES}
|
2008-05-26 17:15:35 +00:00
|
|
|
rm -f *~
|
|
|
|
-chmod -R +w /tmp/bsdcpio_test.*
|
2011-12-22 08:42:07 +00:00
|
|
|
rm -rf /tmp/bsdcpio_test
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|