[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [changeset] Re: When do I need autogen and configure?
From: |
Thorsten Meyer |
Subject: |
Re: [changeset] Re: When do I need autogen and configure? |
Date: |
Sun, 08 Feb 2009 19:01:56 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.19 (X11/20090103) |
John W. Eaton wrote:
> The original idea of having both octMakefile and Makefile was that the
> Makefile would be a simple file that any version of Make could run so
> it should not have any targets like .PHONY that are specific to GNU
> Make. I think we have deviated from this goal, but not by much, so it
> should be easy to fix that. Instead of .PHONY, Makefile uses a target
> called FORCE, so the effect is the same as long as a file called FORCE
> is not accidentally created.
>
> Also, the top-level Makefile should not be generated by configure so
> that if users just unpacked Octave and typed "make" the top-level
> Makefile would just check for octMakefile and it if was not present
> print some messages telling people to run configure. I'm not sure why
> it is now distributed as a .in file, as that was never the intent.
> Also, it should not have any substitutions in it anyway.
>
In the attached patch, I tried to do what you sketched above. Could you
have a look, especially if the changes in octMakefile.in are correct?
regards
Thorsten
# HG changeset patch
# User Thorsten Meyer <address@hidden>
# Date 1234115311 -3600
# Node ID 4781f8613ed4d75c5ad5f4ed9bf97f6702e73b72
# Parent b227213a70c3c2848af47db7e94f1d7bd63d72ff
Do not autogenerate Makefile from Makefile.in.
diff -r b227213a70c3 -r 4781f8613ed4 ChangeLog
--- a/ChangeLog Sat Feb 07 12:39:19 2009 -0500
+++ b/ChangeLog Sun Feb 08 18:48:31 2009 +0100
@@ -0,0 +1,8 @@
+2009-02-08 Thorsten Meyer <address@hidden>
+
+ * Makefile.in: Rename to Makefile.
+ * configure.in: Remove Makefile from list of autogenerated
+ configuration files.
+ * octMakefile.in: Remove references to Makefile.in, add Makefile
+ to list of CONF_DISTFILES.
+
diff -r b227213a70c3 -r 4781f8613ed4 Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile Sun Feb 08 18:48:31 2009 +0100
@@ -0,0 +1,125 @@
+# Makefile for octave's src directory
+#
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2003, 2004,
+# 2005, 2006, 2007 John W. Eaton
+#
+# This file is part of Octave.
+#
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING. If not, see
+# <http://www.gnu.org/licenses/>.
+
+TARGETS = octave-bug octave-config mkoctfile libcruft liboctave \
+ dlfcn readline src scripts doc check octave.info \
+ INSTALL.OCTAVE BUGS install install-strip uninstall \
+ tags TAGS dist conf-dist snapshot snapshot-version \
+ .gdbinit run-octave
+
+NO_DEP_TARGETS = clean mostlyclean distclean maintainer-clean
+
+all: header-msg config-check
+ $(MAKE) -f octMakefile all
+
+$(TARGETS): FORCE
+ $(MAKE) -f octMakefile $@
+
+$(NO_DEP_TARGETS): FORCE
+ $(MAKE) -f octMakefile omit_deps=true $@
+
+# Maybe this message will prevent people from asking why the
+# Makefiles don't work for them. Maybe not.
+
+header-msg: FORCE
+ @echo ""
+ @echo "***********************************************************"
+ @echo "*"
+ @echo "* To compile Octave, you will need a recent versions of"
+ @echo "* the following software:"
+ @echo "*"
+ @echo "* GNU Make (a recent version)"
+ @echo "*"
+ @echo "* g++ (preferably a recent 4.x version, though later"
+ @echo "* 3.x versions may also work)"
+ @echo "*"
+ @echo "* flex (2.5.4 or a more recent version) -- required if"
+ @echo "* you need to recreate lex.cc from lex.l"
+ @echo "*"
+ @echo "* bison (1.31 or a more recent version) -- required if"
+ @echo "* you need to recreate parse.cc from parse.y"
+ @echo "*"
+ @echo "* gperf (3.0.1 or a more recent version) -- required if"
+ @echo "* you need to recreate oct-gperf.h from octave.gperf"
+ @echo "*"
+ @echo "* Now would be a good time to read INSTALL.OCTAVE if"
+ @echo "* you have not done so already."
+ @echo "*"
+ @echo "***********************************************************"
+ @echo ""
+
+help: header-msg
+ @echo ""
+ @echo "For more information, please read the files INSTALL,"
+ @echo "INSTALL.OCTAVE, and any other system-specific README"
+ @echo "files that apply (e.g., README.Linux)."
+ @echo ""
+ @echo "The following targets are available:"
+ @echo ""
+ @echo " all build everything"
+ @echo " check run self tests"
+ @echo " install install files"
+ @echo " install-strip same as install but strip binaries"
+ @echo " uninstall delete installed files"
+ @echo ""
+ @echo " dist create a source distribution"
+ @echo " conf-dist create a config files distribution"
+ @echo ""
+ @echo " clean remove files created by make all"
+ @echo " mostlyclean remove most files created by make all"
+ @echo " distclean remove all files not in distribution"
+ @echo " maintainer-clean clean up everything"
+ @echo ""
+ @echo " octave-bug create octave-bug script"
+ @echo " octave-config create octave-config script"
+ @echo " mkoctfile create mkoctfile script"
+ @echo " INSTALL.OCTAVE create INSTALL.OCTAVE doc file"
+ @echo " BUGS create BUGS doc file"
+ @echo " tags create tags files"
+ @echo " TAGS create TAGS files"
+ @echo ""
+ @echo " dlfcn make all in subdirectory dlfcn"
+ @echo " doc make all in subdirectory doc"
+ @echo " libcruft make all in subdirectory libcruft"
+ @echo " liboctave make all in subdirectory liboctave"
+ @echo " scripts make all in subdirectory scripts"
+ @echo " src make all in subdirectory src"
+ @echo ""
+ @echo " help print this message"
+ @echo ""
+
+config-check:
+ @if test -f octMakefile; then \
+ true; \
+ else \
+ echo ""; \
+ echo "*** You must run configure before running make."; \
+ echo "***"; \
+ echo "*** Please read the INSTALL and INSTALL.OCTAVE files"; \
+ echo "*** for more information about how to configure and"; \
+ echo "*** compile Octave."; \
+ echo ""; \
+ exit 1; \
+ fi
+
+FORCE:
+
+.NOTPARALLEL:
diff -r b227213a70c3 -r 4781f8613ed4 Makefile.in
--- a/Makefile.in Sat Feb 07 12:39:19 2009 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-# Makefile for octave's src directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2003, 2004,
-# 2005, 2006, 2007 John W. Eaton
-#
-# This file is part of Octave.
-#
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-#
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING. If not, see
-# <http://www.gnu.org/licenses/>.
-
-TARGETS = octave-bug octave-config mkoctfile libcruft liboctave \
- dlfcn readline src scripts doc check octave.info \
- INSTALL.OCTAVE BUGS install install-strip uninstall \
- tags TAGS dist conf-dist snapshot snapshot-version \
- .gdbinit run-octave
-
-NO_DEP_TARGETS = clean mostlyclean distclean maintainer-clean
-
-all: header-msg config-check
- $(MAKE) -f octMakefile all
-
-$(TARGETS): FORCE
- $(MAKE) -f octMakefile $@
-
-$(NO_DEP_TARGETS): FORCE
- $(MAKE) -f octMakefile omit_deps=true $@
-
-# Maybe this message will prevent people from asking why the
-# Makefiles don't work for them. Maybe not.
-
-header-msg: FORCE
- @echo ""
- @echo "***********************************************************"
- @echo "*"
- @echo "* To compile Octave, you will need a recent versions of"
- @echo "* the following software:"
- @echo "*"
- @echo "* GNU Make (a recent version)"
- @echo "*"
- @echo "* g++ (preferably a recent 4.x version, though later"
- @echo "* 3.x versions may also work)"
- @echo "*"
- @echo "* flex (2.5.4 or a more recent version) -- required if"
- @echo "* you need to recreate lex.cc from lex.l"
- @echo "*"
- @echo "* bison (1.31 or a more recent version) -- required if"
- @echo "* you need to recreate parse.cc from parse.y"
- @echo "*"
- @echo "* gperf (3.0.1 or a more recent version) -- required if"
- @echo "* you need to recreate oct-gperf.h from octave.gperf"
- @echo "*"
- @echo "* Now would be a good time to read INSTALL.OCTAVE if"
- @echo "* you have not done so already."
- @echo "*"
- @echo "***********************************************************"
- @echo ""
-
-help: header-msg
- @echo ""
- @echo "For more information, please read the files INSTALL,"
- @echo "INSTALL.OCTAVE, and any other system-specific README"
- @echo "files that apply (e.g., README.Linux)."
- @echo ""
- @echo "The following targets are available:"
- @echo ""
- @echo " all build everything"
- @echo " check run self tests"
- @echo " install install files"
- @echo " install-strip same as install but strip binaries"
- @echo " uninstall delete installed files"
- @echo ""
- @echo " dist create a source distribution"
- @echo " conf-dist create a config files distribution"
- @echo ""
- @echo " clean remove files created by make all"
- @echo " mostlyclean remove most files created by make all"
- @echo " distclean remove all files not in distribution"
- @echo " maintainer-clean clean up everything"
- @echo ""
- @echo " octave-bug create octave-bug script"
- @echo " octave-config create octave-config script"
- @echo " mkoctfile create mkoctfile script"
- @echo " INSTALL.OCTAVE create INSTALL.OCTAVE doc file"
- @echo " BUGS create BUGS doc file"
- @echo " tags create tags files"
- @echo " TAGS create TAGS files"
- @echo ""
- @echo " dlfcn make all in subdirectory dlfcn"
- @echo " doc make all in subdirectory doc"
- @echo " libcruft make all in subdirectory libcruft"
- @echo " liboctave make all in subdirectory liboctave"
- @echo " scripts make all in subdirectory scripts"
- @echo " src make all in subdirectory src"
- @echo ""
- @echo " help print this message"
- @echo ""
-
-config-check:
- @if test -f octMakefile; then \
- true; \
- else \
- echo ""; \
- echo "*** You must run configure before running make."; \
- echo "***"; \
- echo "*** Please read the INSTALL and INSTALL.OCTAVE files"; \
- echo "*** for more information about how to configure and"; \
- echo "*** compile Octave."; \
- echo ""; \
- exit 1; \
- fi
-
-FORCE:
-
-.NOTPARALLEL:
diff -r b227213a70c3 -r 4781f8613ed4 configure.in
--- a/configure.in Sat Feb 07 12:39:19 2009 -0500
+++ b/configure.in Sun Feb 08 18:48:31 2009 +0100
@@ -2071,7 +2071,7 @@
### Do the substitutions in all the Makefiles.
-AC_CONFIG_FILES([Makefile octMakefile Makeconf test/Makefile
+AC_CONFIG_FILES([octMakefile Makeconf test/Makefile
doc/Makefile doc/faq/Makefile doc/interpreter/Makefile
doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile
examples/Makefile examples/@polynomial/Makefile liboctave/Makefile
diff -r b227213a70c3 -r 4781f8613ed4 octMakefile.in
--- a/octMakefile.in Sat Feb 07 12:39:19 2009 -0500
+++ b/octMakefile.in Sun Feb 08 18:48:31 2009 +0100
@@ -33,14 +33,12 @@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
-BUILT_CONF_DISTFILES = Makefile
-
-CONF_DISTFILES = Makefile.in octMakefile.in Makeconf.in \
+CONF_DISTFILES = Makefile octMakefile.in Makeconf.in \
configure configure.in config.guess config.sub aclocal.m4 \
acx_blas.m4 acx_lapack.m4 acx_blas_f77_func.m4 \
config.h.in install-sh autogen.sh
-BUILT_DISTFILES = $(BUILT_CONF_DISTFILES) BUGS INSTALL.OCTAVE
+BUILT_DISTFILES = BUGS INSTALL.OCTAVE
DISTFILES = $(CONF_DISTFILES) \
COPYING INSTALL NEWS \
@@ -239,7 +237,6 @@
rm -rf `cat .fname`
mkdir `cat .fname`
ln $(CONF_DISTFILES) `cat .fname`
- ln $(BUILT_CONF_DISTFILES) `cat .fname`
for dir in $(CONF_DISTSUBDIRS); do \
mkdir `cat .fname`/$$dir; \
$(MAKE) -C $$dir conf-dist; \