Mercurial > hg > octave-terminal
changeset 10376:1ed7cc046c52
Makefile.am rules for rebuilding .mk files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 28 Feb 2010 23:20:53 -0500 |
parents | 4217a5402b7e |
children | fb62fbbe28c0 |
files | liboctave/ChangeLog liboctave/Makefile.am liboctave/config-ops.sh src/ChangeLog src/DLD-FUNCTIONS/config-module.sh src/Makefile.am |
diffstat | 6 files changed, 78 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,12 @@ +2010-02-28 John W. Eaton <jwe@octave.org> + + * Makefile.am ($(srcdir)/vx-op-inc.mk, $(srcdir)/mx-op-inc.mk, + $(srcdir)/smx-op-inc.mk, $(srcdir)/vx-op-src.mk, + $(srcdir)/mx-op-src.mk, $(srcdir)/smx-op-src.mk): New targets. + + * config-ops.sh: Accept top_srcdir argument. Work from build + directory too, not just source tree. + 2010-02-28 Michael Goffioul <michael.goffioul@gmail.com> * Array-C.cc (DiagArray2<Complex>::Proxy): Remove explicit
--- a/liboctave/Makefile.am +++ b/liboctave/Makefile.am @@ -258,6 +258,15 @@ include mx-op-inc.mk include smx-op-inc.mk +$(srcdir)/vx-op-inc.mk: $(srcdir)/config-ops.sh $(srcdir)/mk-ops.awk $(srcdir)/vx-ops + $(srcdir)/config-ops.sh $(top_srcdir) + +$(srcdir)/mx-op-inc.mk: $(srcdir)/config-ops.sh $(srcdir)/mk-ops.awk $(srcdir)/mx-ops + $(srcdir)/config-ops.sh $(top_srcdir) + +$(srcdir)/smx-op-inc.mk: $(srcdir)/config-ops.sh $(srcdir)/sparse-mk-ops.awk $(srcdir)/sparse-mx-ops + $(srcdir)/config-ops.sh $(top_srcdir) + BUILT_INCS = \ mx-ops.h \ $(OPT_INC) \ @@ -442,6 +451,15 @@ include mx-op-src.mk include smx-op-src.mk +$(srcdir)/vx-op-src.mk: $(srcdir)/config-ops.sh $(srcdir)/mk-ops.awk $(srcdir)/vx-ops + $(srcdir)/config-ops.sh $(top_srcdir) + +$(srcdir)/mx-op-src.mk: $(srcdir)/config-ops.sh $(srcdir)/mk-ops.awk $(srcdir)/mx-ops + $(srcdir)/config-ops.sh $(top_srcdir) + +$(srcdir)/smx-op-src.mk: $(srcdir)/config-ops.sh $(srcdir)/sparse-mk-ops.awk $(srcdir)/sparse-mx-ops + $(srcdir)/config-ops.sh $(top_srcdir) + BUILT_LIBOCTAVE_CXX_SOURCES = \ $(MX_OP_SRC) \ $(VX_OP_SRC) \
--- a/liboctave/config-ops.sh +++ b/liboctave/config-ops.sh @@ -4,32 +4,43 @@ : ${AWK=awk} -VX_INC=$($AWK -f mk-ops.awk prefix=vx list_h_files=1 vx-ops) +if [ $# -eq 1 ]; then + top_srcdir="$1"; +else + top_srcdir=".." +fi -MX_INC=$($AWK -f mk-ops.awk prefix=mx list_h_files=1 mx-ops) - -SMX_INC=$($AWK -f sparse-mk-ops.awk prefix=smx list_h_files=1 sparse-mx-ops) +liboctave_dir="$top_srcdir/liboctave" -VX_SRC=$($AWK -f mk-ops.awk prefix=vx list_cc_files=1 vx-ops) +mk_ops="$liboctave_dir/mk-ops.awk" +sparse_mk_ops="$liboctave_dir/sparse-mk-ops.awk" -MX_SRC=$($AWK -f mk-ops.awk prefix=mx list_cc_files=1 mx-ops) +VX_INC=$($AWK -f $mk_ops prefix=vx list_h_files=1 $liboctave_dir/vx-ops) -SMX_SRC=$($AWK -f sparse-mk-ops.awk prefix=smx list_cc_files=1 sparse-mx-ops) +MX_INC=$($AWK -f $mk_ops prefix=mx list_h_files=1 $liboctave_dir/mx-ops) -echo "VX_OP_INC = $(echo $VX_INC)" > vx-op-inc.mk-t -../move-if-change vx-op-inc.mk-t vx-op-inc.mk +SMX_INC=$($AWK -f $sparse_mk_ops prefix=smx list_h_files=1 $liboctave_dir/sparse-mx-ops) + +VX_SRC=$($AWK -f $mk_ops prefix=vx list_cc_files=1 $liboctave_dir/vx-ops) -echo "MX_OP_INC = $(echo $MX_INC)" > mx-op-inc.mk-t -../move-if-change mx-op-inc.mk-t mx-op-inc.mk +MX_SRC=$($AWK -f $mk_ops prefix=mx list_cc_files=1 $liboctave_dir/mx-ops) + +SMX_SRC=$($AWK -f $sparse_mk_ops prefix=smx list_cc_files=1 $liboctave_dir/sparse-mx-ops) -echo "SMX_OP_INC = $(echo $SMX_INC)" > smx-op-inc.mk-t -../move-if-change smx-op-inc.mk-t smx-op-inc.mk +echo "VX_OP_INC = $(echo $VX_INC)" > $liboctave_dir/vx-op-inc.mk-t +$top_srcdir/move-if-change $liboctave_dir/vx-op-inc.mk-t $liboctave_dir/vx-op-inc.mk + +echo "MX_OP_INC = $(echo $MX_INC)" > $liboctave_dir/mx-op-inc.mk-t +$top_srcdir/move-if-change $liboctave_dir/mx-op-inc.mk-t $liboctave_dir/mx-op-inc.mk -echo "VX_OP_SRC = $(echo $VX_SRC)" > vx-op-src.mk-t -../move-if-change vx-op-src.mk-t vx-op-src.mk +echo "SMX_OP_INC = $(echo $SMX_INC)" > $liboctave_dir/smx-op-inc.mk-t +$top_srcdir/move-if-change $liboctave_dir/smx-op-inc.mk-t $liboctave_dir/smx-op-inc.mk + +echo "VX_OP_SRC = $(echo $VX_SRC)" > $liboctave_dir/vx-op-src.mk-t +$top_srcdir/move-if-change $liboctave_dir/vx-op-src.mk-t $liboctave_dir/vx-op-src.mk -echo "MX_OP_SRC = $(echo $MX_SRC)" > mx-op-src.mk-t -../move-if-change mx-op-src.mk-t mx-op-src.mk +echo "MX_OP_SRC = $(echo $MX_SRC)" > $liboctave_dir/mx-op-src.mk-t +$top_srcdir/move-if-change $liboctave_dir/mx-op-src.mk-t $liboctave_dir/mx-op-src.mk -echo "SMX_OP_SRC = $(echo $SMX_SRC)" > smx-op-src.mk-t -../move-if-change smx-op-src.mk-t smx-op-src.mk +echo "SMX_OP_SRC = $(echo $SMX_SRC)" > $liboctave_dir/smx-op-src.mk-t +$top_srcdir/move-if-change $liboctave_dir/smx-op-src.mk-t $liboctave_dir/smx-op-src.mk
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-02-28 John W. Eaton <jwe@octave.org> + + * Makefile.am ($(srcdir)/DLD-FUNCTIONS/module.mk): New target. + + * DLD-FUNCTIONS/config-module.sh: Accept top_srcdir argument. + Work from build directory too, not just source tree. + 2010-02-28 Jaroslav Hajek <highegg@gmail.com> * ov-typeinfo.h (octave_value_typeinfo::octave_value_typeinfo):
--- a/src/DLD-FUNCTIONS/config-module.sh +++ b/src/DLD-FUNCTIONS/config-module.sh @@ -4,6 +4,14 @@ : ${AWK=awk} -$AWK -f config-module.awk < module-files > module.mk-t +if [ $# -eq 1 ]; then + top_srcdir="$1"; +else + top_srcdir="../.." +fi -../../move-if-change module.mk-t module.mk +dld_dir=$top_srcdir/src/DLD-FUNCTIONS + +$AWK -f $dld_dir/config-module.awk < $dld_dir/module-files > $dld_dir/module.mk-t + +$top_srcdir/move-if-change $dld_dir/module.mk-t $dld_dir/module.mk
--- a/src/Makefile.am +++ b/src/Makefile.am @@ -455,6 +455,10 @@ $(PT_SRC) include DLD-FUNCTIONS/module.mk + +$(srcdir)/DLD-FUNCTIONS/module.mk: $(srcdir)/DLD-FUNCTIONS/config-module.sh $(srcdir)/DLD-FUNCTIONS/config-module.awk $(srcdir)/DLD-FUNCTIONS//module-files + $(srcdir)/DLD-FUNCTIONS/config-module.sh $(top_srcdir) + include OPERATORS/module.mk include TEMPLATE-INST/module.mk