ntfs-3g/test/Makefile.am
antona f5961c075e - Fix compilation on OSX in ntfsclone.c where stderr = stdout
is not legal (but happens to work on Linux) to do proper
  low-level file descriptor mangling which is portable.  (Anton)
- Add test/runlist-data to EXTRA_DIST so it gets included in the
  distribution otherwise make test fails on released sources.  Solution
  is not perfect as it also adds the test/runlist-data/CVS directory
  but it will do at least for me.  (Anton)
2005-10-15 21:44:17 +00:00

60 lines
1.5 KiB
Makefile

if REALLYSTATIC
AM_LIBS = $(top_builddir)/libntfs/.libs/libntfs.a
AM_LFLAGS = -static
STATIC_LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
else
AM_LIBS = $(top_builddir)/libntfs/libntfs.la
AM_LFLAGS = $(all_libraries)
LIBTOOL_LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
endif
# Workaround to make REALLYSTATIC work with automake 1.5.
LINK=$(STATIC_LINK) $(LIBTOOL_LINK)
#TEST_VALGRIND = valgrind
bin_PROGRAMS = runlist
EXTRA_DIST = runlist-data
CLEANFILES = attr[123].bin frag[123][123][123] pure-[cn][ms] zero
MAINTAINERCLEANFILES = Makefile.in
linux_ntfsincludedir = -I$(top_srcdir)/include/ntfs
# Set the include path.
AM_CPPFLAGS = -I$(top_srcdir)/include/ntfs $(all_includes)
runlist_SOURCES = runlist.c
runlist_LDADD = $(AM_LIBS)
runlist_LDFLAGS = $(AM_LFLAGS)
# Extra targets
libs:
(cd ../libntfs && $(MAKE) libs) || exit 1;
test: runlist testz testp testf
testz: runlist
@$(TEST_VALGRIND) ./runlist zero > zero
@diff -qs {runlist-data/,}zero
testp: runlist
@for i in contig noncontig; do \
for j in single multi; do \
L1=`echo $$i | cut -b1`; \
L2=`echo $$j | cut -b1`; \
FILE=pure-$$L1$$L2; \
$(TEST_VALGRIND) ./runlist pure $$i $$j > $$FILE; \
diff -qs {runlist-data/,}$$FILE; \
done; \
done
testf: runlist
@for i in 123 132 213 231 312 321; do \
$(TEST_VALGRIND) ./runlist frag $$i > frag$$i; \
diff -qs {runlist-data/,}frag$$i; \
done