1 ACLOCAL_AMFLAGS = -I m4
2 SUBDIRS = po lib libparted parted partprobe include doc debug tests
11 scripts/data/abi/baseline_symbols.txt \
12 scripts/extract_symvers \
18 aclocaldir=$(datadir)/aclocal
20 pcdir = $(libdir)/pkgconfig
21 pc_DATA = libparted.pc
23 # This is best not done via configure.ac, because automake's
24 # make distcheck target does not like auto-generated files
25 # being included in the distributed archive.
26 parted.spec: parted.spec.in
27 sed 's/@''PACKAGE@/$(PACKAGE)/;s/@''VERSION@/$(VERSION)/' $< > $@-tmp
29 MAINTAINERCLEANFILES = parted.spec
34 ### ABI Checking scripts ###
36 baseline_file = ${top_srcdir}/scripts/data/abi/baseline_symbols.txt
37 extract_symvers = $(top_srcdir)/scripts/extract_symvers
39 current_symbols.txt: ${extract_symvers}
40 -@(sh ${extract_symvers} libparted/.libs/libparted.so current_symbols.txt)
43 -@(output=${baseline_file}; \
44 if test ! -f $${output}; then \
45 echo "Baseline file doesn't exist."; \
46 echo "Try 'make new-abi-baseline' to create it."; \
51 -@$(mkinstalldirs) ${baseline_dir}
52 -@(output=${baseline_file}; \
53 if test -f $${output}; then \
54 output=$${output}.new; \
55 t=`echo $${output} | sed 's=.*config/abi/=='`; \
56 echo "Baseline file already exists, writing to $${t} instead."; \
58 sh ${extract_symvers} libparted/.libs/libparted.so $${output})
60 # Use 'new-abi-baseline' to create an initial symbol file. Then run
61 # 'check-abi' to test for changes against that file.
62 check-abi: baseline_symbols current_symbols.txt
63 @diff -u ${baseline_file} ./current_symbols.txt 2>&1 \
64 | tee libparted.abi-diff
65 @test `wc -l < libparted.abi-diff` -eq 0 && exit 0 \
66 || echo "ABI has changed. Please, update you ABI package version." \
71 MAINTAINERCLEANFILES += \
78 .PHONY: ss-1024 ss-2048 ss-4096
79 ss-1024 ss-2048 ss-4096:
80 PARTED_SECTOR_SIZE=$(subst ss-,,$@) $(MAKE) check-recursive
82 # Run the regression test suite with different settings,
83 # to ensure it works with simulated partition sizes > 512.
84 .PHONY: check-other-sector_sizes
85 check-other-sector_sizes:
90 check: check-other-sector_sizes
92 # Arrange so that .tarball-version appears only in the distribution
93 # tarball, and never in a checked-out repository.
94 dist-hook: gen-ChangeLog
95 echo $(VERSION) > $(distdir)/.tarball-version
97 gen_start_date = 2000-01-01
100 if test -d .git; then \
101 $(top_srcdir)/build-aux/gitlog-to-changelog \
102 --since=$(gen_start_date) > $(distdir)/cl-t; \
103 rm -f $(distdir)/ChangeLog; \
104 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
107 BUILT_SOURCES = .version
109 echo $(VERSION) > $@-t && mv $@-t $@