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