Repository navigation
Expand file tree
/
Copy pathMakefile.am
More file actions
209 lines (177 loc) · 5.98 KB
/
Copy pathMakefile.am
File metadata and controls
209 lines (177 loc) · 5.98 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
## Process this file with automake to produce Makefile.in
#
# Makefile.am
#
ACLOCAL_AMFLAGS = -I m4
# Suppress 'echo' if './configure --enable-silent-rules' or 'make V=0' is used.
# Variables AM_V_* are provided by automake >= 1.13.
ECHO_V = ! $(AM_V_P) || echo
ECHO_V_GEN = @$(AM_V_P) || echo ' GEN $@'; $(ECHO_V)
doc_DATA = \
doc/AUTHORS \
doc/CHANGELOG.md \
COPYING \
doc/INSTALL.md \
README.md
docolddir = $(docdir)/old
docold_DATA = \
doc/old/NEWS-5.0-7.5.txt
examplescripts_DATA = \
doc/examplescripts/README
examplescripts_SCRIPTS = \
doc/examplescripts/Example1 \
doc/examplescripts/Example2 \
doc/examplescripts/Example3 \
doc/examplescripts/Example4 \
doc/examplescripts/Example5 \
doc/examplescripts/Example6 \
doc/examplescripts/Example7 \
doc/examplescripts/Example8
EXTRA_DIST = \
.editorconfig \
autogen.sh \
doc/old/ChangeLog-6.0-7.0.txt \
doc/old/ChangeLog-5.0-6.0.txt \
doc/old/ChangeLog-7.0-7.5.txt \
drivedb/drivedb.h \
util/clang-scan-build.sh \
util/cppcheck.sh \
util/getversion.sh \
util/pe32edit.sh \
$(doc_DATA) \
$(docold_DATA) \
$(examplescripts_DATA) \
$(examplescripts_SCRIPTS)
CLEANFILES = \
cppcheck.txt \
shellcheck.txt \
smartmontools-$(PACKAGE_VERSION).tar \
smartmontools-$(PACKAGE_VERSION)-bin.tar
# 'make maintainer-clean' also removes files generated by './autogen.sh'
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in \
$(srcdir)/aclocal.m4 \
$(srcdir)/compile \
$(srcdir)/configure \
$(srcdir)/configure~ \
$(srcdir)/config.guess \
$(srcdir)/config.h.in \
$(srcdir)/config.h.in~ \
$(srcdir)/config.sub \
$(srcdir)/depcomp \
$(srcdir)/install-sh \
$(srcdir)/ltmain.sh \
$(srcdir)/m4/libtool.m4 \
$(srcdir)/m4/libtool.m4~ \
$(srcdir)/m4/lt*.m4 \
$(srcdir)/m4/lt*.m4~ \
$(srcdir)/missing
SUBDIRS = include lib src
# Avoid automake warning: '.PHONY was already defined in condition ...'
phony = bin-dist cppcheck shellcheck
.PHONY: $(phony)
#
# Additional targets in '*/Makefile.am'
#
SRC_TARGETS = clean-examples htmlman pdfman uninstall-examples
INC_SRC_TARGETS =
LIB_SRC_TARGETS = examples install-examples
if OS_WIN32_MINGW
SRC_TARGETS += cleandist-win32 clean-vc distclean-vc maintainer-clean-vc
INC_SRC_TARGETS += config-vc
LIB_SRC_TARGETS += dist-win32 distdir-win32 install-win32 installer-win32
endif
if OS_DARWIN
LIB_SRC_TARGETS += install-darwin install-darwin-cleanup
endif
phony += $(SRC_TARGETS) $(INC_SRC_TARGETS) $(LIB_SRC_TARGETS)
$(SRC_TARGETS) $(INC_SRC_TARGETS) $(LIB_SRC_TARGETS):
@case ' $(INC_SRC_TARGETS) $(LIB_SRC_TARGETS) ' in *\ $@\ *) \
echo $(MAKE) -C include; $(MAKE) -C include ;; \
esac
@case ' $(LIB_SRC_TARGETS) ' in *\ $@\ *) \
echo $(MAKE) -C lib; $(MAKE) -C lib ;; \
esac
$(MAKE) -C src $@
# Add version information to distribution directory
dist-hook:
$(MAKE) -C include smartmon/version.sh
cp include/smartmon/version.sh $(distdir)/util/dist-version.sh
if REPRODUCIBLE_BUILD
#
# Override the builtin 'dist-*' rules to create reproducible tarballs
#
# Also override the 'dist' rule because starting with automake 1.19 the
# builtin rule builds 'am--dist-gzip' instead of 'dist-gzip'
#
phony += dist-fail
dist dist-all: dist-gzip
dist-gzip: distdir
$(dist_tar) $(distdir) > $(distdir).tar
@if test -n '$(source_date_iso)'; then \
echo "touch -d '$(source_date_iso)' $(distdir).tar"; \
touch -d '$(source_date_iso)' $(distdir).tar; fi
unset GZIP; gzip $(GZIP_ENV) -f -n $(distdir).tar
$(am__post_remove_distdir)
dist-xz: distdir
$(dist_tar) $(distdir) > $(distdir).tar
@if test -n '$(source_date_iso)'; then \
echo "touch -d '$(source_date_iso)' $(distdir).tar"; \
touch -d '$(source_date_iso)' $(distdir).tar; fi
unset XZ_OPT; xz -e -f $(distdir).tar
$(am__post_remove_distdir)
dist-zstd: distdir
$(dist_tar) $(distdir) > $(distdir).tar
@if test -n '$(source_date_iso)'; then \
echo "touch -d '$(source_date_iso)' $(distdir).tar"; \
touch -d '$(source_date_iso)' $(distdir).tar; fi
unset ZSTD_CLEVEL; zstd -19 -f -q --rm $(distdir).tar
$(am__post_remove_distdir)
# List these separately to let automake disable the builtins
dist-bzip2: dist-fail
dist-bzip3: dist-fail
dist-lzip: dist-fail
dist-zip: dist-fail
dist-fail:
@echo "Only 'dist-{gzip,xz,zstd}' are supported if SOURCE_DATE_EPOCH is used." >&2
@exit 1
endif
#
# Create binary distribution tarball 'smartmontools-VERSION-bin.tar.gz'
#
bin_distdir = $(distdir)-bin
bin_distfile = $(bin_distdir).tar.gz
bin-dist:
$(MAKE) DESTDIR="$$(pwd)/$(bin_distdir)" install
( cd $(bin_distdir) && $(dist_tar) * ) > $(bin_distdir).tar
unset GZIP; gzip $(GZIP_ENV) -n < $(bin_distdir).tar > $(bin_distfile)
@if test -n '$(source_date_iso)'; then \
echo "touch -d '$(source_date_iso)' $(bin_distfile)"; \
touch -d '$(source_date_iso)' $(bin_distfile); fi
rm -rf $(bin_distdir) $(bin_distdir).tar
# Create cppcheck report
cppcheck: cppcheck.txt
CPPCHECKFLAGS=
cppcheck.txt:
$(AM_V_GEN)$(srcdir)/util/cppcheck.sh $(CPPCHECKFLAGS) > $@
# Create shellcheck report
shellcheck: shellcheck.txt
SHELLCHECK = shellcheck
SHELLCHECKFLAGS =
shellscripts = \
$(srcdir)/autogen.sh \
$(srcdir)/util/clang-scan-build.sh \
$(srcdir)/util/cppcheck.sh \
$(srcdir)/util/getversion.sh \
$(srcdir)/util/git-set-mtime.sh \
$(srcdir)/util/pe32edit.sh \
src/smartd_warning.sh \
src/update-smart-drivedb
shellcheck.txt: $(shellscripts)
$(ECHO_V_GEN) ' $(SHELLCHECK) $(SHELLCHECKFLAGS) $(shellscripts) > $@'
@$(SHELLCHECK) $(SHELLCHECKFLAGS) $(shellscripts) > $@ || \
if [ $$? = 1 ]; then echo "$@: issues found"; else rm -f $@; exit 1; fi
src/smartd_warning.sh: src/smartd_warning.sh.in
make -C src smartd_warning.sh
src/update-smart-drivedb: src/update-smart-drivedb.in
make -C src update-smart-drivedb