From Fedora Project Wiki
fp-wiki>ImportUser
(Imported from MoinMoin)
 
m (PackageMaintainers/Makefile moved to Archive:PackageMaintainers/Makefile: This is out of date and 'make help' should be used instead)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Handling the Makefile =
{{admon/important|This page is outdated.  Use <code>make help</code> instead.}}


The Makefile will include the stock Makefile rules from the Makefile.common file, which defines some common useful targets.
The Makefile will include the stock Makefile rules from the Makefile.common file, which defines some common useful targets.
Line 27: Line 27:
*'''make compile''':
*'''make compile''':
Gets the source, unpacks it and runs a build through it.
Gets the source, unpacks it and runs a build through it.
[[Category:Package maintainers archive]]

Latest revision as of 23:08, 21 February 2009

Important.png
This page is outdated. Use make help instead.

The Makefile will include the stock Makefile rules from the Makefile.common file, which defines some common useful targets. For example, a sample Makefile will look like this:

NAME := kernel
SPECFILE := $(firstword $(wildcard *.spec))
include ../common/Makefile.common

This defines the name of the package and the specfile. (More things can be defined optionally, see the Makefile.common file.) For the overwhelming majority of packages, this simple Makefile is all that is needed to link the package to the build rules of the repository. Note that Makefile.common lies in the common module. CVS magic is done in the CVS's modules file to have the common module checked out every time a package module is checked out.

Makefile.common targets

These are all defined in the common Makefile fragment. A "make help" target is also available for a quick reference.

  • make sources:

Download sources from the lookaside cache, and verify their MD5 sums.

  • make <arch>:

Makes an <arch>; binary RPM Supported archs include noarch i386 i586 i686 x86_64 ia64 s390 s390x ppc ppc64 pseries ppc64pseries iseries ppc64iseries.

  • make export:

Exports a clean CVS checkout.

  • make clean:

Tries to mop up non-CVS files.

  • make prep:

Creates a local source RPM and runs through to %prep in the build.

  • make compile:

Gets the source, unpacks it and runs a build through it.