summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 1ab5f13e272cfc326115f706e94d244a86a6b4df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = po libparted parted partprobe include doc debug

EXTRA_DIST = config.rpath                          \
             ABOUT-NLS                             \
             AUTHORS                               \
             BUGS                                  \
             COPYING                               \
             THANKS                                \
             TODO                                  \
	     libparted.pc.in			   \
             parted.spec.in                        \
             parted.m4                             \
             scripts/data/abi/baseline_symbols.txt \
             scripts/extract_symvers

aclocaldir=$(datadir)/aclocal
aclocal_DATA=parted.m4

pcdir = $(libdir)/pkgconfig
pc_DATA = libparted.pc.in

dist-hook: parted.spec
	cp parted.spec $(distdir)

### ABI Checking scripts ###

baseline_file = ${top_srcdir}/scripts/data/abi/baseline_symbols.txt
extract_symvers = $(top_srcdir)/scripts/extract_symvers

current_symbols.txt: ${extract_symvers} 
	  -@(sh ${extract_symvers} libparted/.libs/libparted.so current_symbols.txt)

baseline_symbols:
	-@(output=${baseline_file}; \
	  if test ! -f $${output}; then \
	    echo "Baseline file doesn't exist."; \
	    echo "Try 'make new-abi-baseline' to create it."; \
	    exit 1; \
	  fi; true)

new-abi-baseline:
	-@$(mkinstalldirs) ${baseline_dir}
	-@(output=${baseline_file}; \
	  if test -f $${output}; then \
	    output=$${output}.new; \
	    t=`echo $${output} | sed 's=.*config/abi/=='`; \
	    echo "Baseline file already exists, writing to $${t} instead."; \
	  fi; \
	  sh ${extract_symvers} libparted/.libs/libparted.so $${output})

# Use 'new-abi-baseline' to create an initial symbol file.  Then run
# 'check-abi' to test for changes against that file.
check-abi: baseline_symbols current_symbols.txt
	@diff -u ${baseline_file} ./current_symbols.txt 2>&1 \
         | tee libparted.abi-diff
	@test `wc -l < libparted.abi-diff` -gt 0 \
         && (echo "ABI has changed. Please, update you ABI package version."; exit 1) \
         || exit 0

MAINTAINERCLEANFILES = ABOUT-NLS     \
                       ChangeLog     \
                       INSTALL       \
                       Makefile.in   \
                       aclocal.m4    \
                       compile       \
                       config.guess  \
                       config.h.in   \
                       config.rpath  \
                       config.sub    \
                       configure     \
                       depcomp       \
                       install-sh    \
                       ltmain.sh     \
                       missing       \
                       mkinstalldirs