Mercurial > hg > octave-terminal
changeset 6152:2eb0723b4fad
[project @ 2006-11-11 19:07:17 by jwe]
author | jwe |
---|---|
date | Sat, 11 Nov 2006 19:07:18 +0000 |
parents | 12c50a17f20f |
children | e60688a1ea07 |
files | ChangeLog Makeconf.in doc/ChangeLog doc/interpreter/Makefile.in examples/Makefile.in libcruft/ChangeLog libcruft/Makerules.in liboctave/ChangeLog liboctave/Makefile.in scripts/ChangeLog scripts/miscellaneous/copyfile.m src/ChangeLog src/Makefile.in |
diffstat | 13 files changed, 103 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-11-11 John W. Eaton <jwe@octave.org> + + * examples/Makefile.in (octave.desktop): + Use $(simple-move-if-change-rule) here. + + * Makeconf.in (simple-move-if-change-rule, + (builddir-move-if-change-rule): New macros. + +2006-11-11 Soren Hauberg <soren@hauberg.org> + + * examples/Makefile.in (uninstall): Add missing semicolon. + 2006-11-09 John W. Eaton <jwe@octave.org> * examples/Makefile.in (uninstall): New target.
--- a/Makeconf.in +++ b/Makeconf.in @@ -429,6 +429,26 @@ $(foreach d, $(SUBDIRS), $(do-subdir-for-command)) endef +define simple-move-if-change-rule +if [ -s $@-t ]; then \ + $(top_srcdir)/move-if-change $@-t $@; \ +else \ + echo "$@-t is empty!" 1>&2; \ + rm -f $@-t; \ + exit 1; \ +fi +endef + +define builddir-move-if-change-rule +if [ -s $(@F)-t ]; then \ + $(top_srcdir)/move-if-change $(@F)-t $(@F); \ +else \ + echo "$(@F)-t is empty!" 1>&2; \ + rm -f $(@F)-t; \ + exit 1; \ +fi +endef + # Yes, the second sed command near the end is needed, to avoid limits # in command lengths for some versions of sed. UGLY_DEFS is often # quite large, so it makes sense to split this command there. @@ -517,7 +537,7 @@ -e "s|%OCTAVE_CONF_YFLAGS%|\"${YFLAGS}\"|" \ -e "s|%OCTAVE_CONF_config_opts%|\"${config_opts}\"|" | \ $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t -$(top_srcdir)/move-if-change $@-t $@ +$(simple-move-if-change-rule) endef define do-subst-default-vals @@ -558,7 +578,7 @@ -e "s|%OCTAVE_API_VERSION%|\"${api_version}\"|" \ -e "s|%OCTAVE_RELEASE%|\"${OCTAVE_RELEASE}\"|" \ -e "s|%OCTAVE_VERSION%|\"${version}\"|" -$(top_srcdir)/move-if-change $@-t $@ +$(simple-move-if-change-rule) endef define do-subst-texinfo-vals @@ -570,7 +590,7 @@ -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \ -e "s|%TEXINFO_UMFPACK%|${TEXINFO_UMFPACK}|" | \ $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t -$(top_srcdir)/move-if-change $@-t $@ +$(simple-move-if-change-rule) endef define do-subst-script-vals @@ -581,7 +601,7 @@ -e "s|%top_srcdir%|${top_srcdir}|" \ -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \ -e "s|%builddir%|$(shell pwd)|" > $@-t -$(top_srcdir)/move-if-change $@-t $@ +$(simple-move-if-change-rule) endef define do-subst-f77-mangling @@ -590,7 +610,7 @@ -e "s|%F77_TOLOWER%|${F77_TOLOWER}|g" \ -e "s|%F77_APPEND_UNDERSCORE%|${F77_APPEND_UNDERSCORE}|" \ -e "s|%F77_APPEND_EXTRA_UNDERSCORE%|${F77_APPEND_EXTRA_UNDERSCORE}|" > $@-t -$(top_srcdir)/move-if-change $@-t $@ +$(simple-move-if-change-rule) endef define do-mkpkgadd
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2006-11-11 John W. Eaton <jwe@octave.org> + + * interpreter/Makefile.in (%.texi : %.txi): + Use $(simple-move-if-change-rule) here. + 2006-10-29 John W. Eaton <jwe@octave.org> * interpreter/Makefile.in (run-octave): Call it here.
--- a/doc/interpreter/Makefile.in +++ b/doc/interpreter/Makefile.in @@ -103,8 +103,8 @@ @echo making $@ from $< @./munge-texi \ -d $(TOPDIR)/src/DOCSTRINGS \ - -d $(TOPDIR)/scripts/DOCSTRINGS < $< > $@.t - @$(top_srcdir)/move-if-change $@.t $@ + -d $(TOPDIR)/scripts/DOCSTRINGS < $< > $@-t + @$(simple-move-if-change-rule) octave.info: $(IMAGES_TXT) $(TEXINFO) -$(MAKEINFO) -I.. -I$(srcdir) -I$(srcdir)/.. $(MAIN_TEXINFO)
--- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -40,7 +40,7 @@ $(SED) < $< > $@-t \ -e "s|%OCTAVE_IMAGEDIR%|${imagedir}|" \ -e "s|%OCTAVE_PREFIX%|${prefix}|" - $(top_srcdir)/move-if-change $@-t $@ + $(simple-move-if-change-rule) install install-strip: for f in $(SCRIPTS); do \ @@ -65,7 +65,7 @@ rm -f $(DESTDIR)$(imagedir)/$$f; \ done if test -n "$(DESKTOP_FILE_INSTALL)"; then \ - rm -f $(DESTDIR)$(datadir)/applications/octave.desktop \ + rm -f $(DESTDIR)$(datadir)/applications/octave.desktop; \ fi .PHONY: uninstall
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,7 @@ +2006-11-11 John W. Eaton <jwe@octave.org> + + * Makerules.in (%.def : %.f): Use $(simple-move-if-change-rule) here. + 2006-11-03 John W. Eaton <jwe@octave.org> * Makefile.in (DLL_CXXDEFS): Rename from XTRA_CXXDEFS.
--- a/libcruft/Makerules.in +++ b/libcruft/Makerules.in @@ -70,8 +70,8 @@ %.def : %.f @echo "making $@ from $<" - @$(TOPDIR)/libcruft/mkf77def < $< > $@.t - $(top_srcdir)/move-if-change $@.t $@ + @$(TOPDIR)/libcruft/mkf77def < $< > $@-t + @$(simple-move-if-change-rule) install:: all .PHONY: install
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2006-11-11 John W. Eaton <jwe@octave.org> + + * Makefile.in ($(OPTS_INC), mx-ops.h): + Use $(simple-move-if-change-rule) here. + 2006-11-09 David Bateman <dbateman@free.fr> * sparse-base-chol.cc (sparse_base_chol_rep::Q): Cast perms(i) to
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -338,7 +338,7 @@ $(OPTS_INC) : %.h : %.in $(top_srcdir)/mk-opts.pl @echo making $@ from $< @perl $(top_srcdir)/mk-opts.pl --opt-class-header $< > $@-t - @$(top_srcdir)/move-if-change $@-t $@ + @$(simple-move-if-change-rule) $(VX_OP_INC) $(VX_OP_SRC) : $(srcdir)/mk-ops.awk vx-ops $(AWK) -f $(srcdir)/mk-ops.awk prefix=vx $(srcdir)/vx-ops @@ -351,7 +351,7 @@ mx-ops.h : $(srcdir)/mk-ops.awk mx-ops $(AWK) -f $(srcdir)/mk-ops.awk prefix=mx make_inclusive_header=mx-ops.h $(srcdir)/mx-ops > $@-t - $(top_srcdir)/move-if-change $@-t $@ + $(simple-move-if-change-rule) # If missing, GNU make attempts to create them in the reverse of the
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2006-11-11 Søren Hauberg <soren@hauberg.org> + + * miscellaneous/copyfile.m: Fix docs to match function. + 2006-11-08 John W. Eaton <jwe@octave.org> * plot/legend.m: New function, adapted from Octave Forge.
--- a/scripts/miscellaneous/copyfile.m +++ b/scripts/miscellaneous/copyfile.m @@ -18,16 +18,17 @@ ## 02110-1301, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{status}, @var{msg}, @var{msgid}] =} movefile (@var{f1}, @var{f2}) -## Move the file @var{f1} to the new name @var{f2}. The name @var{f1} +## @deftypefn {Function File} {[@var{status}, @var{msg}, @var{msgid}] =} copyfile (@var{f1}, @var{f2}, @var{force}) +## Copy the file @var{f1} to the new name @var{f2}. The name @var{f1} ## may contain globbing patterns. If @var{f1} expands to multiple file -## names, @var{f2} must be a directory. +## names, @var{f2} must be a directory. If @var{force} is given and equals +## the string "f" the copy operation will be forced. ## ## If successful, @var{status} is 1, with @var{msg} and @var{msgid} empty\n\ ## character strings. Otherwise, @var{status} is 0, @var{msg} contains a\n\ ## system-dependent error message, and @var{msgid} contains a unique\n\ ## message identifier.\n\ -## @seealso{glob} +## @seealso{glob, movefile} ## @end deftypefn function [status, msg, msgid] = copyfile (f1, f2, force)
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2006-11-11 John W. Eaton <jwe@octave.org> + + * Makefile.in (parse.cc): Avoid creating empty files. + (%.df : %cc, builtins.cc, mkbuiltins, PKG_ADD, DOCSTRINGS, + doc-files, gendoc.cc, ops.cc, $(OPT_HANDLERS), oct-errno.cc, + oct-gperf.h): Use $(simple-move-if-change-rule) here. + (lex.cc, __gnuplot_raw__.cc): + Use $(destdir-move-if-change-rule) here. + (ifndef omit_deps): Don't include stamp-prereq here. + ($(DEF_FILES), $(MAKEDEPS)): Also depend on stamp-prereq. + 2006-11-10 John W. Eaton <jwe@octave.org> * ov-str-mat.cc (octave_char_matrix_str::load_ascii,
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -29,7 +29,7 @@ @(egrep '^(///*|/\*) *PKG_ADD:' $< ; \ $(CXXCPP) $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) -DMAKE_BUILTINS $< \ | $(srcdir)/mkdefs) > $@-t - @mv $@-t $@ + @$(simple-move-if-change-rule) # How to make a .oct file from a .o file: @@ -343,26 +343,26 @@ @echo DEF_FILES = $(DEF_FILES) @echo $(DEF_FILES) > def-files @$(srcdir)/mkbuiltins def-files > $@-t - @$(top_srcdir)/move-if-change $@-t $@ + @$(simple-move-if-change-rule) PKG_ADD: $(DLD_DEF_FILES) $(srcdir)/mk-pkg-add $(DLD_DEF_FILES) > $@-t - mv $@-t $@ + @$(simple-move-if-change-rule) DOCSTRINGS: gendoc$(BUILD_EXEEXT) ./gendoc > $@-t - mv $@-t $@ + @$(simple-move-if-change-rule) doc-files: $(DOC_FILES) @echo making $@ @echo DOC_FILES = $(DOC_FILES) @echo $(DOC_FILES) > $@-t - @mv $@-t $@ + @$(simple-move-if-change-rule) gendoc.cc: doc-files mkgendoc @echo making $@ @$(srcdir)/mkgendoc doc-files > $@-t - @$(top_srcdir)/move-if-change $@-t $@ + @$(simple-move-if-change-rule) gendoc$(BUILD_EXEEXT): gendoc.cc $(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS) @@ -370,15 +370,15 @@ ops.cc: $(OP_SRC) mkops @echo making $@ from $(OP_SRC) @$(srcdir)/mkops $(OP_SRC) > $@-t - @$(top_srcdir)/move-if-change $@-t $@ + @$(simple-move-if-change-rule) stamp-liboctave-prereq: $(MAKE) -C ../liboctave stamp-prereq touch stamp-liboctave-prereq -$(DEF_FILES): stamp-liboctave-prereq mkdefs defun-int.h defun-dld.h defun.h defaults.h oct-conf.h +$(DEF_FILES): stamp-prereq stamp-liboctave-prereq mkdefs defun-int.h defun-dld.h defun.h defaults.h oct-conf.h -$(MAKEDEPS): stamp-liboctave-prereq defaults.h oct-gperf.h oct-conf.h +$(MAKEDEPS): stamp-prereq stamp-liboctave-prereq defaults.h oct-gperf.h oct-conf.h @bsd_gcc_kluge_targets_frag@ @@ -518,18 +518,26 @@ $(OPT_HANDLERS) : %.cc : $(top_srcdir)/liboctave/%.in $(top_srcdir)/mk-opts.pl @echo making $@ from $< @$(PERL) $(top_srcdir)/mk-opts.pl --opt-handler-fcns $< > $@-t - @$(top_srcdir)/move-if-change $@-t $@ + @$(simple-move-if-change-rule) parse.cc : parse.y @echo "expect 14 shift/reduce conflicts" $(YACC) $(YFLAGS) $< - @$(top_srcdir)/move-if-change y.tab.c $(@F) + @if [ -s y.tab.c ]; then \ + $(top_srcdir)/move-if-change y.tab.c $(@F); \ + else \ + echo "y.tab.c is empty!" 1>&2; \ + rm -f y.tab.c; \ + exit 1; \ + fi lex.cc : lex.l - $(LEX) $(LFLAGS) $< > $(@F) + $(LEX) $(LFLAGS) $< > $(@F)-t + @$(builddir-move-if-change-rule) __gnuplot_raw__.cc : DLD-FUNCTIONS/__gnuplot_raw__.l - $(LEX) $(LFLAGS) $< > $(@F) + $(LEX) $(LFLAGS) $< > $(@F)-t + @$(builddir-move-if-change-rule) ## We want to force an update of defaults.h and oct-conf.h every ## time make is run because some values may come from the command @@ -555,22 +563,14 @@ else \ $(SED) '/@SYSDEP_ERRNO_LIST@/D' $< > $@-t; \ fi - @if [ -s $@-t ]; then \ - $(top_srcdir)/move-if-change $@-t $@; \ - else \ - exit 1; \ - fi + @$(simple-move-if-change-rule) oct-gperf.h: octave.gperf @echo "making $@ from $<" @$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< | \ $(SED) 's,lookup\[,gperf_lookup[,' > $@-t \ || (rm -f $@-t; exit 1) - @if [ -s $@-t ]; then \ - $(top_srcdir)/move-if-change $@-t $@; \ - else \ - exit 1; \ - fi + @$(simple-move-if-change-rule) # How to make a .oct file from a .o file: @@ -595,11 +595,6 @@ check: all .PHONY: check -# If missing, GNU make attempts to create them in the reverse of the -# order in which they are listed here. We rely on that fact to ensure -# that defaults.h is created before trying to create the .d files. -# Hmm. I wonder if we can count on that... - ifndef omit_deps --include $(MAKEDEPS) stamp-prereq +-include $(MAKEDEPS) endif