1 ACLOCAL_AMFLAGS = -I m4
2 SUBDIRS = po lib include libparted parted partprobe 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
33 sudo sh -c '$(MAKE) check; t=$$?; chown -R $(USER) .; exit $$t'
35 # Not everyone who runs "make distcheck" will want to or even
36 # be able to run the root tests. If you want to skip them,
37 # run make like this: "make distcheck root-check="
38 root_check ?= root-check
39 distcheck-hook: $(root_check)
42 ### ABI Checking scripts ###
44 baseline_file = ${top_srcdir}/scripts/data/abi/baseline_symbols.txt
45 extract_symvers = $(top_srcdir)/scripts/extract_symvers
47 current_symbols.txt: ${extract_symvers}
48 -@(sh ${extract_symvers} libparted/.libs/libparted.so current_symbols.txt)
51 -@(output=${baseline_file}; \
52 if test ! -f $${output}; then \
53 echo "Baseline file doesn't exist."; \
54 echo "Try 'make new-abi-baseline' to create it."; \
59 -@$(mkinstalldirs) ${baseline_dir}
60 -@(output=${baseline_file}; \
61 if test -f $${output}; then \
62 output=$${output}.new; \
63 t=`echo $${output} | sed 's=.*config/abi/=='`; \
64 echo "Baseline file already exists, writing to $${t} instead."; \
66 sh ${extract_symvers} libparted/.libs/libparted.so $${output})
68 # Use 'new-abi-baseline' to create an initial symbol file. Then run
69 # 'check-abi' to test for changes against that file.
70 check-abi: baseline_symbols current_symbols.txt
71 @diff -u ${baseline_file} ./current_symbols.txt 2>&1 \
72 | tee libparted.abi-diff
73 @test `wc -l < libparted.abi-diff` -eq 0 && exit 0 \
74 || echo "ABI has changed. Please, update you ABI package version." \
79 MAINTAINERCLEANFILES += \
86 .PHONY: ss-1024 ss-2048 ss-4096
87 ss-1024 ss-2048 ss-4096:
88 PARTED_SECTOR_SIZE=$(subst ss-,,$@) $(MAKE) check-recursive
90 # Run the regression test suite with different settings,
91 # to ensure it works with simulated partition sizes > 512.
92 .PHONY: check-other-sector_sizes
93 check-other-sector_sizes:
98 check: check-other-sector_sizes
100 # Arrange so that .tarball-version appears only in the distribution
101 # tarball, and never in a checked-out repository.
102 dist-hook: gen-ChangeLog
103 echo $(VERSION) > $(distdir)/.tarball-version
105 gen_start_date = 2000-01-01
106 .PHONY: gen-ChangeLog
108 if test -d .git; then \
109 $(top_srcdir)/build-aux/gitlog-to-changelog \
110 --since=$(gen_start_date) > $(distdir)/cl-t; \
111 rm -f $(distdir)/ChangeLog; \
112 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
115 BUILT_SOURCES = .version
117 echo $(VERSION) > $@-t && mv $@-t $@