OSDN Git Service

Add integration tests, then adjust code so that they pass.
[android-x86/external-parted.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2 SUBDIRS = po lib libparted parted partprobe include doc debug tests
3
4 EXTRA_DIST =                            \
5   .prev-version                         \
6   BUGS                                  \
7   libparted.pc.in                       \
8   parted.spec.in                        \
9   parted.spec                           \
10   scripts/data/abi/baseline_symbols.txt \
11   scripts/extract_symvers               \
12   Makefile.cfg                          \
13   Makefile.maint                        \
14   GNUmakefile
15
16 aclocaldir=$(datadir)/aclocal
17
18 pcdir = $(libdir)/pkgconfig
19 pc_DATA = libparted.pc
20
21 # This is best not done via configure.ac, because automake's
22 # make distcheck target does not like auto-generated files
23 # being included in the distributed archive.
24 parted.spec: parted.spec.in
25         sed 's/@''PACKAGE@/$(PACKAGE)/;s/@''VERSION@/$(VERSION)/' $< > $@-tmp
26         mv $@-tmp $@
27 MAINTAINERCLEANFILES = parted.spec
28
29 distcheck-hook:
30         $(MAKE) my-distcheck
31
32 ### ABI Checking scripts ###
33
34 baseline_file = ${top_srcdir}/scripts/data/abi/baseline_symbols.txt
35 extract_symvers = $(top_srcdir)/scripts/extract_symvers
36
37 current_symbols.txt: ${extract_symvers}
38           -@(sh ${extract_symvers} libparted/.libs/libparted.so current_symbols.txt)
39
40 baseline_symbols:
41         -@(output=${baseline_file}; \
42           if test ! -f $${output}; then \
43             echo "Baseline file doesn't exist."; \
44             echo "Try 'make new-abi-baseline' to create it."; \
45             exit 1; \
46           fi; true)
47
48 new-abi-baseline:
49         -@$(mkinstalldirs) ${baseline_dir}
50         -@(output=${baseline_file}; \
51           if test -f $${output}; then \
52             output=$${output}.new; \
53             t=`echo $${output} | sed 's=.*config/abi/=='`; \
54             echo "Baseline file already exists, writing to $${t} instead."; \
55           fi; \
56           sh ${extract_symvers} libparted/.libs/libparted.so $${output})
57
58 # Use 'new-abi-baseline' to create an initial symbol file.  Then run
59 # 'check-abi' to test for changes against that file.
60 check-abi: baseline_symbols current_symbols.txt
61         @diff -u ${baseline_file} ./current_symbols.txt 2>&1 \
62          | tee libparted.abi-diff
63         @test `wc -l < libparted.abi-diff` -gt 0 \
64          && (echo "ABI has changed. Please, update you ABI package version."; exit 1) \
65          || exit 0
66
67 MOSTLYCLEANDIRS = m4
68
69 MAINTAINERCLEANFILES += \
70   ABOUT-NLS     \
71   ChangeLog     \
72   INSTALL       \
73   aclocal.m4    \
74   configure