annotate scripts/module.mk @ 21290:1309edb344e1

use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed The build system runs primarily in the top-level directory now, so unless a Make rule changes the working directory before referencing a file, it is not necessary to use the abs_top_X or top_X directory names. * Makefile.am, build-aux/common.mk, doc/module.mk, libgui/graphics/module.mk, libgui/module.mk, libgui/src/module.mk, libinterp/corefcn/module.mk, libinterp/module.mk, liboctave/cruft/module.mk, liboctave/cruft/ranlib/module.mk, liboctave/module.mk, liboctave/numeric/module.mk liboctave/operators/module.mk, scripts/module.mk, src/module.mk: Only use Use $(top_srcdir), $(top_builddir), $(abs_top_srcdir), and $(abs_top_builddir) if necessary.
author John W. Eaton <jwe@octave.org>
date Wed, 17 Feb 2016 13:32:44 -0500
parents b76955e83fe4
children 2f9de06a526e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20366
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
1 scripts_EXTRA_DIST =
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
2
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
3 scripts_CLEANFILES =
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
4 scripts_DISTCLEANFILES =
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
5 scripts_MAINTAINERCLEANFILES =
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
6
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 include scripts/audio/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 include scripts/deprecated/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 include scripts/elfun/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 include scripts/general/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 include scripts/geometry/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 include scripts/gui/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 include scripts/help/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 include scripts/image/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 include scripts/io/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 include scripts/java/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 include scripts/linear-algebra/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18 include scripts/miscellaneous/module.mk
20533
fcb792acab9b Moving ode45, odeset, odeget, and levenshtein from odepkg to core.
jcorno <jacopo.corno@gmail.com>
parents: 20479
diff changeset
19 include scripts/ode/module.mk
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 include scripts/optimization/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 include scripts/path/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 include scripts/pkg/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 include scripts/plot/appearance/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 include scripts/plot/draw/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 include scripts/plot/util/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 include scripts/polynomial/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 include scripts/prefs/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 include scripts/set/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 include scripts/signal/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 include scripts/sparse/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 include scripts/specfun/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 include scripts/special-matrix/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
33 include scripts/startup/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 include scripts/statistics/base/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 include scripts/statistics/distributions/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 include scripts/statistics/models/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 include scripts/statistics/tests/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 include scripts/strings/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 include scripts/testfun/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 include scripts/time/module.mk
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41
21093
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
42 ## include scripts/@ftp/module.mk
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
43 ## The include above fails because Automake cannot process the '@' character.
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
44 ## As a work around, the contents of scripts/@ftp/module.mk are placed directly
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
45 ## in this module.mk file.
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
46 ######################## include scripts/@ftp/module.mk ########################
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
47 FCN_FILE_DIRS += scripts/@ftp
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
48
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
49 scripts_@ftp_FCN_FILES = \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
50 scripts/@ftp/ascii.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
51 scripts/@ftp/binary.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
52 scripts/@ftp/cd.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
53 scripts/@ftp/close.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
54 scripts/@ftp/delete.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
55 scripts/@ftp/dir.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
56 scripts/@ftp/display.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
57 scripts/@ftp/ftp.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
58 scripts/@ftp/loadobj.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
59 scripts/@ftp/mget.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
60 scripts/@ftp/mkdir.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
61 scripts/@ftp/mput.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
62 scripts/@ftp/rename.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
63 scripts/@ftp/rmdir.m \
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
64 scripts/@ftp/saveobj.m
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
65
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
66 scripts_@ftpdir = $(fcnfiledir)/@ftp
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
67
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
68 scripts_@ftp_DATA = $(scripts_@ftp_FCN_FILES)
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
69
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
70 FCN_FILES += $(scripts_@ftp_FCN_FILES)
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
71
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
72 PKG_ADD_FILES += scripts/@ftp/PKG_ADD
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
73
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
74 DIRSTAMP_FILES += scripts/@ftp/$(octave_dirstamp)
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
75 ####################### end include scripts/@ftp/module.mk #####################
0ebb8e26ebbc build: Document Automake failure to 'include scripts/@ftp/module.mk'.
Rik <rik@octave.org>
parents: 21092
diff changeset
76
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
77 image_DATA += $(SCRIPTS_IMAGES)
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
78
20361
bf92a14c0e76 don't include GEN_FCN_FILES in FCN_FILES list
John W. Eaton <jwe@octave.org>
parents: 20355
diff changeset
79 GEN_FCN_FILES_IN = $(GEN_FCN_FILES:.m=.in)
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
80
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
81 ALL_LOCAL_TARGETS += \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
82 $(GEN_FCN_FILES) \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
83 $(PKG_ADD_FILES) \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
84 $(JAR_FILES)
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
85
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
86 if AMCOND_BUILD_DOCS
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
87 ALL_LOCAL_TARGETS += scripts/.DOCSTRINGS
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
88 endif
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
89
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
90 define PKG_ADD_FILE_TEMPLATE
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
91 $(1)/PKG_ADD: $$($(2)_FCN_FILES) $$($(2)_GEN_FCN_FILES) $(1)/$(octave_dirstamp) scripts/mk-pkg-add
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
92 $$(AM_V_GEN)rm -f $$@-t $$@ && \
21281
b76955e83fe4 maint: Run all build shell scripts with SHELL as command interpreter
Mike Miller <mtmiller@octave.org>
parents: 21093
diff changeset
93 $$(SHELL) $$(srcdir)/scripts/mk-pkg-add $(srcdir) $$($(2)_FCN_FILES) -- $$($(2)_GEN_FCN_FILES) > $$@-t && \
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
94 mv $$@-t $$@
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
95 endef
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
96
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
97 $(foreach d, $(FCN_FILE_DIRS), $(eval $(call PKG_ADD_FILE_TEMPLATE, $(d),$(subst /,_,$(subst -,_,$(d))))))
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
98
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
99 define GEN_FCN_FILES_TEMPLATE
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
100 $(1): $(1:.m=.in) Makefile $(dir $(1))$(octave_dirstamp)
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
101 $$(AM_V_GEN)$$(do_subst_config_vals)
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
102 endef
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
103
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
104 $(foreach f, $(GEN_FCN_FILES), $(eval $(call GEN_FCN_FILES_TEMPLATE, $(f))))
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
105
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
106 if AMCOND_BUILD_DOCS
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
107
20393
0fbe2e28ea84 build: Avoid triggering rebuild of docs when DOCSTRINGS regenerated (bug #45567)
Mike Miller <mtmiller@octave.org>
parents: 20366
diff changeset
108 DOCSTRING_FILES += scripts/DOCSTRINGS
0fbe2e28ea84 build: Avoid triggering rebuild of docs when DOCSTRINGS regenerated (bug #45567)
Mike Miller <mtmiller@octave.org>
parents: 20366
diff changeset
109
0fbe2e28ea84 build: Avoid triggering rebuild of docs when DOCSTRINGS regenerated (bug #45567)
Mike Miller <mtmiller@octave.org>
parents: 20366
diff changeset
110 scripts/DOCSTRINGS: | scripts/.DOCSTRINGS
0fbe2e28ea84 build: Avoid triggering rebuild of docs when DOCSTRINGS regenerated (bug #45567)
Mike Miller <mtmiller@octave.org>
parents: 20366
diff changeset
111
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
112 scripts/.DOCSTRINGS: $(FCN_FILES) $(GEN_FCN_FILES) scripts/mkdoc.pl Makefile
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
113 $(AM_V_GEN)rm -f $@-t $@ && \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
114 if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/scripts/DOCSTRINGS ] && [ ! -f scripts/DOCSTRINGS ]; then \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
115 cp $(srcdir)/scripts/DOCSTRINGS scripts/DOCSTRINGS; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
116 touch -r $(srcdir)/scripts/DOCSTRINGS scripts/DOCSTRINGS; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
117 fi && \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
118 $(PERL) $(srcdir)/scripts/mkdoc.pl "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > $@-t && \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
119 mv $@-t $@ && \
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 21281
diff changeset
120 $(SHELL) $(srcdir)/build-aux/move-if-change $@ scripts/DOCSTRINGS && \
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
121 touch $@
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
122
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
123 OCTAVE_INTERPRETER_TARGETS += \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
124 scripts/.DOCSTRINGS
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
125
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
126 endif
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
127
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
128 check-m-sources:
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
129 @echo "checking whether files in source tree are listed in module.mk files..."; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
130 for f in $$(find $(srcdir)/scripts -name '*.m'); do \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
131 found=false; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
132 for m in $(FCN_FILES) $(GEN_FCN_FILES); do \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
133 if [ "$$f" = $(srcdir)/scripts/"$$m" ]; then \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
134 found=true; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
135 break; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
136 fi; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
137 done; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
138 if $$found; then \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
139 true; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
140 else \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
141 missing=$$(echo $$f | $(SED) "s|^$(srcdir)/scripts||"); \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
142 echo "$$missing: not listed in SOURCES"; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
143 fi; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
144 done; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
145 if test -z "$$missing"; then \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
146 echo "yes"; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
147 fi
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
148 .PHONY: check-m-sources
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
149
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
150 check-missing-semicolon:
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
151 @echo "checking for missing semicolons in .m files..."
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
152 ( echo "warning on Octave:missing-semicolon;"; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
153 for m in $(addprefix $(srcdir), $(FCN_FILES)) $(GEN_FCN_FILES); do \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
154 echo "source ('$$m');"; \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
155 done ) | ../run-octave -qf
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
156 .PHONY: check-missing-semicolon
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
157
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
158 ## Add rule to generate ctags.
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
159 ## Automake would normally generate such a rule, but only if there is a
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
160 ## xxx_SOURCES target
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
161 ctags:
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
162 ctags $(addprefix $(srcdir)/, $(FCN_FILES)) $(GEN_FCN_FILES)
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
163
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
164 install-data-local: install-startup-files install-pkg-add
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
165
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
166 uninstall-local: uninstall-startup-files uninstall-pkg-add
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
167
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
168 install-pkg-add:
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
169 for f in $(PKG_ADD_FILES); do \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
170 if [ -n "`cat $$f`" ]; then \
20355
e365a34a1c5c Fix more installation discrepancies in scripts directory
Mike Miller <mtmiller@octave.org>
parents: 20343
diff changeset
171 base=`echo $$f | $(SED) 's,^scripts/,,'`; \
e365a34a1c5c Fix more installation discrepancies in scripts directory
Mike Miller <mtmiller@octave.org>
parents: 20343
diff changeset
172 $(MKDIR_P) $(DESTDIR)$(fcnfiledir)/`echo $$base | $(SED) 's,/[^/]*$$,,'`; \
e365a34a1c5c Fix more installation discrepancies in scripts directory
Mike Miller <mtmiller@octave.org>
parents: 20343
diff changeset
173 $(INSTALL_DATA) $$f $(DESTDIR)$(fcnfiledir)/$$base; \
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
174 fi \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
175 done
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
176 .PHONY: install-pkg-add
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
177
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
178 uninstall-pkg-add:
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
179 for f in $(PKG_ADD_FILES); do \
20364
806a762111d9 Fix uninstallation of PKG_ADD files
Mike Miller <mtmiller@octave.org>
parents: 20361
diff changeset
180 base=`echo $$f | $(SED) 's,^scripts/,,'`; \
806a762111d9 Fix uninstallation of PKG_ADD files
Mike Miller <mtmiller@octave.org>
parents: 20361
diff changeset
181 rm -f $(DESTDIR)$(fcnfiledir)/$$base; \
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
182 done
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
183 .PHONY: uninstall-pkg-add
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
184
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
185 if AMCOND_HAVE_JAVA
20340
22a2f6a7f6dc * scripts/module.mk (scripts-dist-hook): Always define.
John W. Eaton <jwe@octave.org>
parents: 20333
diff changeset
186 scripts-dist-hook:
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
187 else
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
188 scripts-dist-hook:
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
189 @echo "Packaging distribution requires Java." ; exit 1;
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
190 endif
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
191
20366
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
192 scripts_EXTRA_DIST += \
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
193 $(SCRIPTS_IMAGES) \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
194 $(FCN_FILES) \
20361
bf92a14c0e76 don't include GEN_FCN_FILES in FCN_FILES list
John W. Eaton <jwe@octave.org>
parents: 20355
diff changeset
195 $(GEN_FCN_FILES_IN) \
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
196 scripts/DOCSTRINGS \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
197 scripts/mkdoc.pl \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
198 scripts/mk-pkg-add
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
199
20366
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
200 EXTRA_DIST += $(scripts_EXTRA_DIST)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
201
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
202 scripts_DISTCLEANFILES += \
20328
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
203 $(PKG_ADD_FILES) \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
204 $(DIRSTAMP_FILES) \
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
205 $(GEN_FCN_FILES)
fa9fa6ab76f0 eliminate recursive make invocation in scripts directory tree
John W. Eaton <jwe@octave.org>
parents:
diff changeset
206
20409
4300fe896004 build: Don't remove built documentation for distclean target (bug #45646).
Rik <rik@octave.org>
parents: 20393
diff changeset
207 scripts_MAINTAINERCLEANFILES += \
4300fe896004 build: Don't remove built documentation for distclean target (bug #45646).
Rik <rik@octave.org>
parents: 20393
diff changeset
208 scripts/.DOCSTRINGS \
4300fe896004 build: Don't remove built documentation for distclean target (bug #45646).
Rik <rik@octave.org>
parents: 20393
diff changeset
209 scripts/DOCSTRINGS
4300fe896004 build: Don't remove built documentation for distclean target (bug #45646).
Rik <rik@octave.org>
parents: 20393
diff changeset
210
20366
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
211 CLEANFILES += $(scripts_CLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
212 DISTCLEANFILES += $(scripts_DISTCLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
213 MAINTAINERCLEANFILES += $(scripts_MAINTAINERCLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
214
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
215 scripts-clean:
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
216 rm -f $(scripts_CLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
217
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
218 scripts-distclean: scripts-clean
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
219 rm -f $(scripts_DISTCLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
220
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
221 scripts-maintainer-clean: scripts-distclean
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20364
diff changeset
222 rm -f $(scripts_MAINTAINERCLEANFILES)