OSDN Git Service

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