The Gambit distribution comes with makefiles supporting many targets including the following:
% make bootstrap Builds the system and copies the gsc executable to gsc-comp in the root directory. The makefiles call up gsc-comp to compile the Scheme source files in the system if they are modified.
% make mostlyclean Removes all the files that can be regenerated using standard tools (C compiler, TeX, etc). The C files generated by gsc, and the gsi and gsc executables are not removed.
% make clean Removes all the files that can be regenerated by a "make" (object files, C files generated by gsc, etc) **except** gsi and gsc. This is useful to bootstrap from the Scheme sources after gsc has been built with an initial "make bootstrap".
% make realclean Like "make clean", but also removes gsi and gsc, and all the makefiles generated by the configure script.
Some users are surprised that "make clean" does not bring the directory to the state it was in after the tarball was untarred. I guess it is a fairly universal convention that "make clean" should work that way. So I'm thinking of changing the targets as follows:
% make bootstrap No change.
% make mostlyclean Removes all the files that are generated by a "make", except those that are installed by a "make install", such as the gsi and gsc executables, the Gambit libraries and documentation.
% make clean Removes all the files that are generated by a "make", including the gsi and gsc executables.
% make realclean Removes all the files that can be regenerated by the configure script and a "make" after a "make bootstrap". In particular all makefiles and C files generated from Scheme files are removed. This is useful for bootstrapping from the Scheme sources.
So the procedure for building Gambit from the tarball will be:
% tar zxf gambc-v4_3_0-devel.tgz % ./configure % make bootstrap
After that a
% make realclean % ./configure % make
will build the system by regenerating the .c files from .scm files using the gsc-comp built by the "make bootstrap".
If you have strong opinions about this or a better idea, let me know!
Marc
Afficher les réponses par date