gpt-setup (8) - Linux Manuals
gpt-setup: Create automake and autoconf files to convert
gpt-setup - Create automake and autoconf files to convert software into a package
SYNOPSISgpt-setup name version [directory_containing_source_code] [build_directory]
DESCRIPTIONgpt-setup creates Makefile.am files and a configure.in file as well as other stuff that is used to convert a software distribution into a globus package. name is the name of the package. version is the version of the package. directory_containing_source_code is the top source directory for the distribution (the default is the current directory). build_directory is the top level directory containing the resulting binaries (default is the source directory). The resulting build depends on other files from the globus packaging tools (GPT) as well as the globus_core package. NOTE that the files that gpt-setup creates need to be edited by hand in order for the packaging to be complete. The idea behind gpt-setup is simple; ``It is easier to edit than to create.''.
Description of the Files that gpt-setup Creates
- Makefile.am. gpt-setup creates a Makefile.am in the top level directory and every subdirectory except for those called CVS or RCS. The Makefile.am files contain a list of sources, subdirectories, libraries, programs, and scripts. All libraries will be built as libtool libraries. NOTE that all of the sources found will be included in all of the targets found. All libraries and executables have flags from the autoconf variables GPT_INCLUDES, GPT_CFLAGS, GPT_LDFLAGS, and GPT_LIBS added to them. All of the Makefiles contain directives to include files from globus_core that contain standard make targets and rules.
- configure.in gpt-setup creates a top level configure.in containing the standard GLOBUS_* macros from globus_core. The script detects the occurance of *.in files and headers and adds them to AM_CONFIG_HEADER and AC_OUTPUT.
- bootstrap gpt-setup creates a top level bootstrap script which is used to invoke aclocal, automake, autoheader, and autoconf in the correct order.
- pkgdata gpt-setup creates a pkgdata directory that contains the following:
- pkg_data_src.gpt.in is a file that contains the packaging metadata for the newly created package. gpt-setup inserts the name and version of the package as well as a list of all of the libraries that the package provides.
- MyFilelists.pm is a perl module that is used by gpt_sort_file_list to sort the installed files from the source package into binary packages. The module can be modified to take care of special files.
- Makefile.am is a makefile that assembles the filelists and packaging data into the various files.
Post gpt-setup Tasks (What is Left to the Developer)gpt-setup does not do everything that is needed to compile a package. Some tasks need a developer's touch. Here is a checklist of tasks that may need to be done by hand:
- Dependencies need to be added to pkgdata/pkg_data_src.gpt.in
- You can use the GUI tool gpt-edit or edit the file by hand. The format is explained in Package, SourceDependency, and Version.
- Build Environment flags need to be added to configure.in
- Use the autoconf macros GPT_SET_CFLAGS, GPT_SET_INCLUDES, GPT_SET_LIBS pass build environment flags to both the Makefiles and the packaging metadata. With the exception of GPT_SET_CFLAGS, these flags will be included in the packaging metadata and used when packages using this package are built. See Package for details on the build environment metadata.
- Source needs to be assigned to programs and libraries in the Makefile.am's.
gpt-edit automatically assigns all source found in a directory to
all of the targets found in a directory. For example:
Sources = \ foo.c \ foo.h \ fee.c \ fee.h bin_programs = foo fee foo_SOURCES = $(Sources) fee_SOURCES = $(Sources)
As you can see both programs fee and foo wind up being built with the same set of sources. This is of course wrong and needs to be corrected for every directory where more than one program or library is built.
- Autoconf defines need to be tested for
- Use gpt-undefines to identify all of the preprocesser macros that are used in the source code which are not defined internally. This list will highlight the autoconf tests that need to be added to the configure.in script.
AUTHORMichael Bletzinger <mbletzin.ncsa.uiuc.edu> and Eric Blau <eblau.ncsa.uiuc.edu>