Mercurial > octave
comparison Makefile.am @ 21413:3fb2bdea47a5
check substituted variables against current make variables
* build-aux/check-subst-vars.in.sh: New script.
* Makefile.am (EXTRA_DIST): Include it in the list.
(GEN_CONFIG_SHELL, AUTOCONF_SUBST_VARS, ALL_SUBST_VARS):
New variables.
(config-vars, make-vars, check-subst-vars): New targets.
(CLEANFILES): Include config-vars and make-vars in the list.
* configure.ac (AUTOCONF_SUBST_VARS): Define and substitute.
(OCTAVE_CONFIG_FILES): Include build-aux/check-subst-vars.sh in the
list of generated files.
* build-aux/common.mk: Use := to define version and api_version.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 07 Mar 2016 19:06:35 -0500 |
parents | 9773a1c2b55f |
children | 1562e7e27f6d |
comparison
equal
deleted
inserted
replaced
21412:9773a1c2b55f | 21413:3fb2bdea47a5 |
---|---|
44 COPYING \ | 44 COPYING \ |
45 INSTALL \ | 45 INSTALL \ |
46 NEWS \ | 46 NEWS \ |
47 README \ | 47 README \ |
48 build-aux/OctJavaQry.class \ | 48 build-aux/OctJavaQry.class \ |
49 build-aux/check-subst-vars.in.sh \ | |
49 build-aux/find-files-with-tests.sh \ | 50 build-aux/find-files-with-tests.sh \ |
50 build-aux/mk-default-qt-settings.in.sh \ | 51 build-aux/mk-default-qt-settings.in.sh \ |
51 build-aux/mk-f77-def.in.sh \ | 52 build-aux/mk-f77-def.in.sh \ |
52 build-aux/mk-mxarray-h.in.sh \ | 53 build-aux/mk-mxarray-h.in.sh \ |
53 build-aux/mk-version-h.in.sh \ | 54 build-aux/mk-version-h.in.sh \ |
61 build-aux/subst-f77-isnan-macro.in.sh \ | 62 build-aux/subst-f77-isnan-macro.in.sh \ |
62 build-aux/subst-script-vals.in.sh \ | 63 build-aux/subst-script-vals.in.sh \ |
63 run-octave.in \ | 64 run-octave.in \ |
64 $(BUILT_DISTFILES) | 65 $(BUILT_DISTFILES) |
65 | 66 |
67 GEN_CONFIG_SHELL = \ | |
68 build-aux/mk-default-qt-settings.sh \ | |
69 build-aux/mk-f77-def.sh \ | |
70 build-aux/mk-mxarray-h.sh \ | |
71 build-aux/mk-version-h.sh \ | |
72 build-aux/subst-config-vals.sh \ | |
73 build-aux/subst-cross-config-vals.sh \ | |
74 build-aux/subst-default-vals.sh \ | |
75 build-aux/subst-f77-isnan-macro.sh \ | |
76 build-aux/subst-script-vals.sh | |
77 | |
78 AUTOCONF_SUBST_VARS = @AUTOCONF_SUBST_VARS@ | |
79 ALL_SUBST_VARS = \ | |
80 $(AUTOCONF_SUBST_VARS) \ | |
81 abs_top_builddir \ | |
82 abs_top_srcdir \ | |
83 api_version \ | |
84 version | |
85 | |
66 DIRSTAMP_FILES = | 86 DIRSTAMP_FILES = |
67 | 87 |
68 octave_dirstamp = $(am__leading_dot)octave-dirstamp | 88 octave_dirstamp = $(am__leading_dot)octave-dirstamp |
69 | 89 |
70 $(DIRSTAMP_FILES): | 90 $(DIRSTAMP_FILES): |
171 endif | 191 endif |
172 | 192 |
173 noinst_SCRIPTS = run-octave | 193 noinst_SCRIPTS = run-octave |
174 | 194 |
175 CLEANFILES += \ | 195 CLEANFILES += \ |
176 $(BUILT_SOURCES) | 196 $(BUILT_SOURCES) \ |
197 config-vars \ | |
198 make-vars | |
177 | 199 |
178 DISTCLEANFILES += \ | 200 DISTCLEANFILES += \ |
179 .gdbinit \ | 201 .gdbinit \ |
180 $(DIRSTAMP_FILES) | 202 $(DIRSTAMP_FILES) |
181 | 203 |
211 $(simple_move_if_change_rule) | 233 $(simple_move_if_change_rule) |
212 | 234 |
213 bits/stl_algo.h: build-aux/stl_algo.h-fixed | 235 bits/stl_algo.h: build-aux/stl_algo.h-fixed |
214 $(AM_V_GEN)$(MKDIR_P) bits && \ | 236 $(AM_V_GEN)$(MKDIR_P) bits && \ |
215 $(INSTALL_HEADER) $< $@ | 237 $(INSTALL_HEADER) $< $@ |
238 | |
239 config-vars: $(GEN_CONFIG_SHELL) | |
240 $(AM_V_GEN)rm -f $@-t $@ && \ | |
241 $(SED) -n 's/ *"$$/"/; s/^\([A-Za-z_][A-Za-z0-9_]*\)=" *\(.*\)" *$$/\1 \2/p' $^ | sort -u > $@-t && \ | |
242 mv $@-t $@ | |
243 | |
244 ## We always have to create this file because values for Make variables | |
245 ## may be passed on the command line. | |
246 | |
247 make-vars: | |
248 $(file >$@-t) $(foreach v, $(ALL_SUBST_VARS), $(file >>$@-t,$(v) $(value $(v)))) | |
249 $(AM_V_GEN)mv $@-t $@ | |
250 .PHONY: make-vars | |
251 | |
252 check-subst-vars: build-aux/check-subst-vars.sh make-vars config-vars | |
253 @$(SHELL) -f build-aux/check-subst-vars.sh make-vars config-vars | |
254 .PHONY: check-subst-vars | |
216 | 255 |
217 ## If we aren't trying to fix stl_algo.h, then try to ensure that | 256 ## If we aren't trying to fix stl_algo.h, then try to ensure that |
218 ## there isn't a stray copy sitting in the build tree. | 257 ## there isn't a stray copy sitting in the build tree. |
219 | 258 |
220 nonexistent-file: | 259 nonexistent-file: |