/usr.bin/tar/test/Makefile

https://bitbucket.org/freebsd/freebsd-head/ · Makefile · 79 lines · 63 code · 11 blank · 5 comment · 0 complexity · 355c292bd92323722ccec210e106a18d MD5 · raw file

  1. # $FreeBSD$
  2. LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive
  3. .PATH: ${LIBARCHIVEDIR}/tar/test
  4. TESTS= \
  5. test_0.c \
  6. test_basic.c \
  7. test_copy.c \
  8. test_empty_mtree.c \
  9. test_format_newc.c \
  10. test_help.c \
  11. test_option_C_upper.c \
  12. test_option_H_upper.c \
  13. test_option_L_upper.c \
  14. test_option_O_upper.c \
  15. test_option_T_upper.c \
  16. test_option_U_upper.c \
  17. test_option_X_upper.c \
  18. test_option_b.c \
  19. test_option_exclude.c \
  20. test_option_gid_gname.c \
  21. test_option_k.c \
  22. test_option_keep_newer_files.c \
  23. test_option_n.c \
  24. test_option_nodump.c \
  25. test_option_newer_than.c \
  26. test_option_q.c \
  27. test_option_r.c \
  28. test_option_s.c \
  29. test_option_uid_uname.c \
  30. test_patterns.c \
  31. test_print_longpath.c \
  32. test_stdio.c \
  33. test_strip_components.c \
  34. test_symlink_dir.c \
  35. test_version.c
  36. # Build the test program
  37. SRCS= ${TAR_SRCS} \
  38. ${TESTS} \
  39. list.h \
  40. main.c
  41. CLEANFILES+= list.h
  42. NO_MAN=yes
  43. PROG=bsdtar_test
  44. DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
  45. CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../../lib/libarchive/config_freebsd.h\"
  46. LDADD= -larchive -lz -lbz2 -llzma
  47. CFLAGS+= -static -g -O2 -Wall
  48. CFLAGS+= -I${.CURDIR}/../../../lib/libarchive -I${.OBJDIR}
  49. CFLAGS+= -I${LIBARCHIVEDIR}/tar
  50. # Uncomment to link against dmalloc
  51. #LDADD+= -L/usr/local/lib -ldmalloc
  52. #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
  53. check test: bsdtar_test
  54. ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${LIBARCHIVEDIR}/tar/test
  55. list.h: ${TESTS} Makefile
  56. (cd ${LIBARCHIVEDIR}/tar/test; cat ${TESTS}) | \
  57. grep DEFINE_TEST > ${.OBJDIR}/list.h
  58. clean:
  59. rm -f ${CLEANFILES}
  60. rm -f *.out
  61. rm -f *.o
  62. rm -f *.core
  63. rm -f *~
  64. rm -f list.h
  65. rm -f archive.h ../archive.h
  66. -chmod -R +w /tmp/bsdtar_test.*
  67. rm -rf /tmp/bsdtar_test.*
  68. .include <bsd.prog.mk>