OSDN Git Service

mv parted.m4 into new dir, m4/
[android-x86/external-parted.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2 SUBDIRS = po lib libparted parted partprobe include doc debug
3
4 EXTRA_DIST = \
5              BUGS                                  \
6              libparted.pc.in                       \
7              parted.spec.in                        \
8              scripts/data/abi/baseline_symbols.txt \
9              scripts/extract_symvers
10
11 aclocaldir=$(datadir)/aclocal
12
13 pcdir = $(libdir)/pkgconfig
14 pc_DATA = libparted.pc.in
15
16 dist-hook: parted.spec
17         cp parted.spec $(distdir)
18
19 ### ABI Checking scripts ###
20
21 baseline_file = ${top_srcdir}/scripts/data/abi/baseline_symbols.txt
22 extract_symvers = $(top_srcdir)/scripts/extract_symvers
23
24 current_symbols.txt: ${extract_symvers}
25           -@(sh ${extract_symvers} libparted/.libs/libparted.so current_symbols.txt)
26
27 baseline_symbols:
28         -@(output=${baseline_file}; \
29           if test ! -f $${output}; then \
30             echo "Baseline file doesn't exist."; \
31             echo "Try 'make new-abi-baseline' to create it."; \
32             exit 1; \
33           fi; true)
34
35 new-abi-baseline:
36         -@$(mkinstalldirs) ${baseline_dir}
37         -@(output=${baseline_file}; \
38           if test -f $${output}; then \
39             output=$${output}.new; \
40             t=`echo $${output} | sed 's=.*config/abi/=='`; \
41             echo "Baseline file already exists, writing to $${t} instead."; \
42           fi; \
43           sh ${extract_symvers} libparted/.libs/libparted.so $${output})
44
45 # Use 'new-abi-baseline' to create an initial symbol file.  Then run
46 # 'check-abi' to test for changes against that file.
47 check-abi: baseline_symbols current_symbols.txt
48         @diff -u ${baseline_file} ./current_symbols.txt 2>&1 \
49          | tee libparted.abi-diff
50         @test `wc -l < libparted.abi-diff` -gt 0 \
51          && (echo "ABI has changed. Please, update you ABI package version."; exit 1) \
52          || exit 0
53
54 MOSTLYCLEANDIRS = m4
55
56 MAINTAINERCLEANFILES = ABOUT-NLS     \
57                        ChangeLog     \
58                        INSTALL       \
59                        Makefile.in   \
60                        aclocal.m4    \
61                        compile       \
62                        config.guess  \
63                        config.h.in   \
64                        config.rpath  \
65                        config.sub    \
66                        configure     \
67                        depcomp       \
68                        install-sh    \
69                        ltmain.sh     \
70                        missing       \
71                        mkinstalldirs