# HG changeset patch # User John W. Eaton # Date 1466779475 14400 # Node ID 562eb526d0e9632086ccf6cd40938f1a37032cf4 # Parent 3c3995706dbe597f871be01f79bf8d423675ba11 merge build-aux/common.mk with Makefile.am * build-aux/common.mk: Merge contents with Makefile.am. Delete unused file. diff -r 3c3995706dbe -r 562eb526d0e9 Makefile.am --- a/Makefile.am Fri Jun 24 10:37:04 2016 -0400 +++ b/Makefile.am Fri Jun 24 10:44:35 2016 -0400 @@ -18,7 +18,74 @@ # along with Octave; see the file COPYING. If not, see # . -include build-aux/common.mk +# This Makefile requires GNU Make features. + +export AWK +export GREP +export FIND +export SED +export SHELL +export PERL + +version := ${OCTAVE_VERSION} +api_version := ${OCTAVE_API_VERSION} + +## AM_LIBTOOLFLAGS = --silent + +AM_LFLAGS = @LFLAGS@ + +AM_YFLAGS = -dv + +# Fortran compiler flags. + +AM_FFLAGS = @FFLAGS@ + +# C compiler flags. + +AM_CFLAGS = ${XTRA_CFLAGS} + +# ifeq (${INCLUDE_DEPS},no) +# omit_deps = true; +# endif + +# C++ compiler flags. + +AM_CXXFLAGS = ${XTRA_CXXFLAGS} + +FFTW_XCPPFLAGS = @FFTW_XCPPFLAGS@ +FFTW_XLDFLAGS = @FFTW_XLDFLAGS@ +FFTW_XLIBS = @FFTW_XLIBS@ + +SPARSE_XCPPFLAGS = @SPARSE_XCPPFLAGS@ +SPARSE_XLDFLAGS = @SPARSE_XLDFLAGS@ +SPARSE_XLIBS = @SPARSE_XLIBS@ + +GNULIB_LINK_DEPS = @GNULIB_LINK_DEPS@ + +LIBOCTAVE_LINK_DEPS = @LIBOCTAVE_LINK_DEPS@ +LIBOCTAVE_LINK_OPTS = @LIBOCTAVE_LINK_OPTS@ + +LIBOCTINTERP_LINK_DEPS = @LIBOCTINTERP_LINK_DEPS@ +LIBOCTINTERP_LINK_OPTS = @LIBOCTINTERP_LINK_OPTS@ + +OCTAVE_LINK_DEPS = @OCTAVE_LINK_DEPS@ +OCTAVE_LINK_OPTS = @OCTAVE_LINK_OPTS@ + +OCT_LINK_DEPS = @OCT_LINK_DEPS@ +OCT_LINK_OPTS = @OCT_LINK_OPTS@ + +LIBOCTGUI_LINK_DEPS = @LIBOCTGUI_LINK_DEPS@ +LIBOCTGUI_LINK_OPTS = @LIBOCTGUI_LINK_OPTS@ + +OCTAVE_GUI_LINK_DEPS = @OCTAVE_GUI_LINK_DEPS@ +OCTAVE_GUI_LINK_OPTS = @OCTAVE_GUI_LINK_OPTS@ + +# The arguments passed to configure. + +CONFIG_SUBDIRS = @subdirs@ + +null = +ldpreloadsep = ${null}@ldpreloadsep@${null} image_DATA = octdata_DATA = @@ -372,3 +439,87 @@ maintainer-clean-local: doc-maintainer-clean +define move_if_change_rule + if [ -s $(1) ]; then \ + ${SHELL} ${top_srcdir}/build-aux/move-if-change $(1) $(2); \ + else \ + echo "$(1) is empty!" 1>&2; \ + rm -f $(1); \ + exit 1; \ + fi +endef + +define simple_move_if_change_rule + $(call move_if_change_rule,$@-t,$@) +endef + +define cp_update_rule + if [ "x${srcdir}" != "x." ] && [ -f ${srcdir}/$@ ] && [ ! -f $@ ]; then \ + cp ${srcdir}/$@ $@; \ + touch -r ${srcdir}/$@ $@; \ + fi +endef + +define simple-filter-rule + rm -f $@-t $@ && \ + ${SHELL} $(1) < $< > $@-t && \ + mv $@-t $@ +endef + +define subst-bison-api-decls + case "${BISON_API_PREFIX_DECL_STYLE}" in \ + *api*) \ + case "${BISON_API_PREFIX_DECL_STYLE}" in \ + *brace*) \ + api_prefix_decl='%define api.prefix {$(1)}'; ;; \ + *) \ + api_prefix_decl='%define api.prefix "$(1)"'; ;; \ + esac; \ + ;; \ + *name*) \ + case "${BISON_API_PREFIX_DECL_STYLE}" in \ + *brace*) \ + api_prefix_decl='%name-prefix {$(1)}'; ;; \ + *) \ + api_prefix_decl='%name-prefix="$(1)"'; ;; \ + esac; \ + ;; \ + esac; \ + case "${BISON_PUSH_PULL_DECL_STYLE}" in \ + *quote*) quote='"' ;; \ + *) quote="" ;; \ + esac; \ + case "${BISON_PUSH_PULL_DECL_STYLE}" in \ + *dash*) push_pull_decl="%define api.push-pull $${quote}both$${quote}"; ;; \ + *underscore*) push_pull_decl="%define api.push_pull $${quote}both$${quote}"; ;; \ + esac; \ + ${SED} -e "s/%PUSH_PULL_DECL%/$$push_pull_decl/" \ + -e "s/%API_PREFIX_DECL%/$$api_prefix_decl/" $< > $@-t && \ + mv $@-t $@ +endef + +define gdbinit_install_rule + if [ -f $@ ]; then \ + echo "refusing to overwrite $@ with newer version from $<" 1>&2; \ + else \ + echo "Installing $@ from version at $<" ; \ + cp $< $@; \ + fi +endef + +define test-file-commands + rm -f $@-t $@ && \ + ( echo "## DO NOT EDIT! Generated automatically from $( $@-t && \ + mv $@-t $@ +endef + +%.cc-tst : %.cc + $(AM_V_GEN)$(test-file-commands) + +%.yy-tst : %.yy + $(AM_V_GEN)$(test-file-commands) + +%.ll-tst : %.ll + $(AM_V_GEN)$(test-file-commands) diff -r 3c3995706dbe -r 562eb526d0e9 build-aux/common.mk --- a/build-aux/common.mk Fri Jun 24 10:37:04 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,156 +0,0 @@ -export AWK -export GREP -export FIND -export SED -export SHELL -export PERL - -version := ${OCTAVE_VERSION} -api_version := ${OCTAVE_API_VERSION} - -## AM_LIBTOOLFLAGS = --silent - -AM_LFLAGS = @LFLAGS@ - -AM_YFLAGS = -dv - -# Fortran compiler flags. - -AM_FFLAGS = @FFLAGS@ - -# C compiler flags. - -AM_CFLAGS = ${XTRA_CFLAGS} - -# ifeq (${INCLUDE_DEPS},no) -# omit_deps = true; -# endif - -# C++ compiler flags. - -AM_CXXFLAGS = ${XTRA_CXXFLAGS} - -FFTW_XCPPFLAGS = @FFTW_XCPPFLAGS@ -FFTW_XLDFLAGS = @FFTW_XLDFLAGS@ -FFTW_XLIBS = @FFTW_XLIBS@ - -SPARSE_XCPPFLAGS = @SPARSE_XCPPFLAGS@ -SPARSE_XLDFLAGS = @SPARSE_XLDFLAGS@ -SPARSE_XLIBS = @SPARSE_XLIBS@ - -GNULIB_LINK_DEPS = @GNULIB_LINK_DEPS@ - -LIBOCTAVE_LINK_DEPS = @LIBOCTAVE_LINK_DEPS@ -LIBOCTAVE_LINK_OPTS = @LIBOCTAVE_LINK_OPTS@ - -LIBOCTINTERP_LINK_DEPS = @LIBOCTINTERP_LINK_DEPS@ -LIBOCTINTERP_LINK_OPTS = @LIBOCTINTERP_LINK_OPTS@ - -OCTAVE_LINK_DEPS = @OCTAVE_LINK_DEPS@ -OCTAVE_LINK_OPTS = @OCTAVE_LINK_OPTS@ - -OCT_LINK_DEPS = @OCT_LINK_DEPS@ -OCT_LINK_OPTS = @OCT_LINK_OPTS@ - -LIBOCTGUI_LINK_DEPS = @LIBOCTGUI_LINK_DEPS@ -LIBOCTGUI_LINK_OPTS = @LIBOCTGUI_LINK_OPTS@ - -OCTAVE_GUI_LINK_DEPS = @OCTAVE_GUI_LINK_DEPS@ -OCTAVE_GUI_LINK_OPTS = @OCTAVE_GUI_LINK_OPTS@ - -# The arguments passed to configure. - -CONFIG_SUBDIRS = @subdirs@ - -null = -ldpreloadsep = ${null}@ldpreloadsep@${null} - -# ==================== Octave-specific Makefile rules ==================== - -# The following pattern rules and the substitution functions require -# GNU make. If you don't have it, get it! - -define move_if_change_rule - if [ -s $(1) ]; then \ - ${SHELL} ${top_srcdir}/build-aux/move-if-change $(1) $(2); \ - else \ - echo "$(1) is empty!" 1>&2; \ - rm -f $(1); \ - exit 1; \ - fi -endef - -define simple_move_if_change_rule - $(call move_if_change_rule,$@-t,$@) -endef - -define cp_update_rule - if [ "x${srcdir}" != "x." ] && [ -f ${srcdir}/$@ ] && [ ! -f $@ ]; then \ - cp ${srcdir}/$@ $@; \ - touch -r ${srcdir}/$@ $@; \ - fi -endef - -define simple-filter-rule - rm -f $@-t $@ && \ - ${SHELL} $(1) < $< > $@-t && \ - mv $@-t $@ -endef - -define subst-bison-api-decls - case "${BISON_API_PREFIX_DECL_STYLE}" in \ - *api*) \ - case "${BISON_API_PREFIX_DECL_STYLE}" in \ - *brace*) \ - api_prefix_decl='%define api.prefix {$(1)}'; ;; \ - *) \ - api_prefix_decl='%define api.prefix "$(1)"'; ;; \ - esac; \ - ;; \ - *name*) \ - case "${BISON_API_PREFIX_DECL_STYLE}" in \ - *brace*) \ - api_prefix_decl='%name-prefix {$(1)}'; ;; \ - *) \ - api_prefix_decl='%name-prefix="$(1)"'; ;; \ - esac; \ - ;; \ - esac; \ - case "${BISON_PUSH_PULL_DECL_STYLE}" in \ - *quote*) quote='"' ;; \ - *) quote="" ;; \ - esac; \ - case "${BISON_PUSH_PULL_DECL_STYLE}" in \ - *dash*) push_pull_decl="%define api.push-pull $${quote}both$${quote}"; ;; \ - *underscore*) push_pull_decl="%define api.push_pull $${quote}both$${quote}"; ;; \ - esac; \ - ${SED} -e "s/%PUSH_PULL_DECL%/$$push_pull_decl/" \ - -e "s/%API_PREFIX_DECL%/$$api_prefix_decl/" $< > $@-t && \ - mv $@-t $@ -endef - -define gdbinit_install_rule - if [ -f $@ ]; then \ - echo "refusing to overwrite $@ with newer version from $<" 1>&2; \ - else \ - echo "Installing $@ from version at $<" ; \ - cp $< $@; \ - fi -endef - -define test-file-commands - rm -f $@-t $@ && \ - ( echo "## DO NOT EDIT! Generated automatically from $( $@-t && \ - mv $@-t $@ -endef - -%.cc-tst : %.cc - $(AM_V_GEN)$(test-file-commands) - -%.yy-tst : %.yy - $(AM_V_GEN)$(test-file-commands) - -%.ll-tst : %.ll - $(AM_V_GEN)$(test-file-commands)