Commit graph

2 commits

Author SHA1 Message Date
tv
29b0526b9b We already know that bsd.prefs.mk is included before this, so reduce make
parser churn by skipping a second include of it.

Use PKGDIR in preference to .CURDIR as in other .mk files.
2004-11-30 15:09:45 +00:00
jlam
4c79895c31 Add a mini-framework to centralise the handling of "hacks" for getting
particular packages to compile correctly.  bsd.hacks.mk auto-includes
the hacks.mk file in the current directory.  An example hacks file:

-------------8<-------------8<-------------8<-------------8<-------------
.if !defined(FOO_HACKS_MK)
FOO_HACKS_MK=	defined

### [Sun Nov 14 02:08:31 EST 2004 : jlam]
### arm GCC 2.95.x optimisation bug tickled when compiling
### lib/funkyfile.c.  Require a more recent version of GCC as a
### workaround and patch lib/funkyfile.c (patch-ae).
###
.if !empty(MACHINE_ARCH:Marm*)
PKG_HACKS+=	optimisation
GCC_REQD+=	3.0
.endif

.endif  # FOO_HACKS_MK
-------------8<-------------8<-------------8<-------------8<-------------

The comment which heads each individual hack should timestamp when the
hack was added and describe the bug that requires the hack.  By
separating out hacks to a separate file, we should be able to simplify
package Makefiles so that they are more readable.
2004-11-14 07:23:07 +00:00