OSDN Git Service

maint: remove useless definitions
[android-x86/external-parted.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2 SUBDIRS = po lib libparted parted partprobe include doc debug tests
3
4 EXTRA_DIST =                            \
5   .version                              \
6   .prev-version                         \
7   BUGS                                  \
8   libparted.pc.in                       \
9   parted.spec.in                        \
10   parted.spec                           \
11   .x-sc_GPL_version                     \
12   .x-sc_prohibit_always-defined_macros  \
13   scripts/data/abi/baseline_symbols.txt \
14   scripts/extract_symvers               \
15   cfg.mk                                \
16   dist-check.mk                         \
17   maint.mk                              \
18   GNUmakefile
19
20 aclocaldir=$(datadir)/aclocal
21
22 pcdir = $(libdir)/pkgconfig
23 pc_DATA = libparted.pc
24
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
30         mv $@-tmp $@
31 MAINTAINERCLEANFILES = parted.spec
32
33 distcheck-hook:
34         $(MAKE) my-distcheck
35
36 ### ABI Checking scripts ###
37
38 baseline_file = ${top_srcdir}/scripts/data/abi/baseline_symbols.txt
39 extract_symvers = $(top_srcdir)/scripts/extract_symvers
40
41 current_symbols.txt: ${extract_symvers}
42           -@(sh ${extract_symvers} libparted/.libs/libparted.so current_symbols.txt)
43
44 baseline_symbols:
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."; \
49             exit 1; \
50           fi; true)
51
52 new-abi-baseline:
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."; \
59           fi; \
60           sh ${extract_symvers} libparted/.libs/libparted.so $${output})
61
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." \
69          && exit 1
70
71 MOSTLYCLEANDIRS = m4
72
73 MAINTAINERCLEANFILES += \
74   ABOUT-NLS     \
75   ChangeLog     \
76   INSTALL       \
77   aclocal.m4    \
78   configure
79
80 .PHONY: ss-1024 ss-2048 ss-4096
81 ss-1024 ss-2048 ss-4096:
82         PARTED_SECTOR_SIZE=$(subst ss-,,$@) $(MAKE) check-recursive
83
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:
88         $(MAKE) ss-1024
89         $(MAKE) ss-2048
90         $(MAKE) ss-4096
91
92 check: check-other-sector_sizes
93
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
98
99 gen_start_date = 2000-01-01
100 .PHONY: gen-ChangeLog
101 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;                      \
107         fi
108
109 BUILT_SOURCES = .version
110 .version:
111         echo $(VERSION) > $@-t && mv $@-t $@