---
name: "gpt-setup"
section: "8"
platform: "linux"
package: "grid-packaging-tools"
version: "3.2globus2-5"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/gpt-setup"
---

# gpt-setup(8)

Create automake and autoconf files to convert software into a package

## NAME

**gpt-setup** - Create automake and autoconf files to convert software into a package

## SYNOPSIS

gpt-setup name version \[directory\_containing\_source\_code\] \[build\_directory\]

## DESCRIPTION

**gpt-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.

## SEE ALSO

*gpt-edit*(8) [*gpt-undefines*(8)](/gpt-undefines/8.md) [*automake*(1)](/automake/1.md) [*autoconf*(1)](/autoconf/1.md) *Package*(3) *Version*(3) *SourceDependency*(3)

## AUTHOR

Michael Bletzinger \<mbletzin.ncsa.uiuc.edu\> and Eric Blau \<eblau.ncsa.uiuc.edu\>
