summaryrefslogtreecommitdiff
path: root/doc/Makefile-example
blob: eecb359b447b1d5f110765cda7542a512a2b20fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# $NetBSD: Makefile-example,v 1.4 2004/02/15 14:09:25 jlam Exp $

# First paragraph - distfile and binary package data
# DISTNAME PKGNAME PKGREVISION SVR4_PKGNAME CATEGORIES MASTER_SITES
# DYNAMIC_MASTER_SITES MASTER_SITE_SUBDIR EXTRACT_SUFX DISTFILES
DISTNAME=		make-3.80
PKGNAME=		gmake-3.80	# only to be added if the package name is different from DISTNAME
#PKGREVISION=		2		# should be added/incremented for user-visible changes
CATEGORIES=		devel gnu	# multiple categories are allowed
MASTER_SITES=		${MASTER_SITE_GNU:=make/}
#EXTRACT_SUFX=		.tar.bz2	# .tar.gz is the default, only needed in unusual circumstances

# Second paragraph - MAINTAINER, HOMEPAGE and COMMENT
MAINTAINER=		tech-pkg@NetBSD.org	# set this to your email address, tech-pkg@ is the default
HOMEPAGE=		http://www.gnu.org/software/make/make.html
COMMENT=		GNU version of 'make' utility	# start with a capital, no articles at start

# Third paragraph - licensing information
# Please set RESTRICTED to the relevant reason, and use it to define NO_{SRC,BIN}_ON_{FTP,CDROM}
# Any specific licence should be added to the pkgsrc/licenses directory
RESTRICTED=		"Redistribution of unmodified source only; resale prohibited."
NO_SRC_ON_CDROM=	${RESTRICTED}
NO_BIN_ON_FTP=		${RESTRICTED}
NO_BIN_ON_CDROM=	${RESTRICTED}
LICENSE=		hptools-license

# Fourth paragraph - PKG_INSTALLATION_TYPES
PKG_INSTALLATION_TYPES=	overwrite pkgviews	# needed for package views-ready packages

# Fifth paragraph - all build definitions
# WRKSRC, USE_BUILDLINK2, USE_BUILDLINK3, GNU_CONFIGURE, HAS_CONFIGURE,
# USE_PKGLOCALEDIR, USE_INSTALL, TEXINFO_REQD, USE_JAVA, USE_PERL5
# INFO_FILES, DIST_SUBDIR, CONFIGURE_ENV, CONFIGURE_ARGS, MAKE_ENV
# etc
DIST_SUBDIR=		gmake
GNU_CONFIGURE=		yes
INFO_FILES=		make.info	# any info files, whitespace delimited
TEXINFO_REQD=		4.0		# version of texinfo which is necessary
USE_BUILDLINK3=		yes
USE_PKGLOCALEDIR=	yes
WRKSRC=			${WRKDIR}/src

# Sixth paragraph - different targets
# ALL_TARGET, INSTALL_TARGET, TEST_TARGET
TEST_TARGET=		check

# always include bsd.prefs.mk before any .if or .ifdef statements
.include "../../mk/bsd.prefs.mk"

.if defined(GNU_PROGRAM_PREFIX)
# indent nested "if" by 2 spaces please
.  if ${GNU_PROGRAM_PREFIX} == "g"
CONFIGURE_ARGS+=	--program-prefix=${GNU_PROGRAM_PREFIX}
.  endif
.endif
PLIST_SUBST+=		GNU_PROGRAM_PREFIX=${GNU_PROGRAM_PREFIX}
BUILD_DEFS+=		GNU_PROGRAM_PREFIX

# buildlink[23] files should come after all variables have been set,
# sorted alphabetically.
.include "../../devel/gettext-lib/buildlink3.mk"

# The section that handles pthreads should come after all other buildlink[23]
# files have been included.
.include "../../mk/pthread.buildlink3.mk"
.if ${PTHREAD_TYPE} == "none"
CONFIGURE_ARGS+=	--disable-threads
.endif

# Makefile targets should occur after all the other definitions in the file
post-install:
	${CHMOD} g-s ${PREFIX}/bin/${GNU_PROGRAM_PREFIX}make
	${CHGRP} ${BINGRP} ${PREFIX}/bin/${GNU_PROGRAM_PREFIX}make
.if !defined(GNU_PROGRAM_PREFIX) || ${GNU_PROGRAM_PREFIX} != "g"
	# Solaris's "ln -fs" is not the same as on *BSD - use an explicit rm(1) instead
	${RM} -f ${PREFIX}/bin/gmake
	${LN} -s ${GNU_PROGRAM_PREFIX}make ${PREFIX}/bin/gmake
.endif

# Finally, please include bsd.pkg.mk
.include "../../mk/bsd.pkg.mk"