summaryrefslogtreecommitdiff
path: root/mk/buildlink3
AgeCommit message (Collapse)AuthorFilesLines
2007-01-25Absolute never use .x11-buildlink. Some cases get nasty to fix, sojoerg1-1/+5
back to this.
2007-01-17Renamed BUILDLINK_TRANSFORM.* to BUILDLINK_FNAME_TRANSFORM.*, to makerillig1-5/+9
clear that these variables are completely unrelated to BUILDLINK_TRANSFORM. Added a legacy check that catches appearances of BUILDLINK_TRANSFORM.*. XXX: Where should incompatible changes in pkgsrc be documented?
2006-12-20For modular Xorg disable xpkgwedge (will be made a hard error later).joerg1-12/+12
Don't add ${X11BASE}/bin to PATH, don't include mk/x11.buildlink3.mk when USE_X11BASE is set and don't use BUILDLINK_X11_DIR and related magic. OKed by wiz@
2006-12-15Remove trailing tabs.martti1-2/+2
2006-12-15Remove trailing spaces.martti1-2/+2
2006-11-17Added a check for whether X11BASE is set correctly. Currently the errorrillig1-1/+5
message is Syntax error: word unexpected (expecting ")") which is not helpful at all.
2006-11-09Fixed two scripts so that they also run when "set -u" is in effect.rillig2-4/+5
2006-11-05Special case LOCALBASE before X11BASE, as they can be identical injoerg1-1/+2
the case of modular Xorg and the latter is more specific.
2006-09-10ensure that -I and -L paths are correctly rewritten even if ${LOCALBASE}schwarz1-4/+15
contains ${X11BASE} (e.g. ${LOCALBASE} being /usr/local and ${X11BASE} being /usr)
2006-09-10Fix PR pkg/34139 in a diffent way:tron2-7/+13
Setting "WRAPPER_SKIP_TRANSFORM" to "yes" isn't enough because "imake" will invoke the C compiler which might be a wrapper script which always fails because the package didn't use "USE_LANGUAGES+= c". The "imake-check" script now simply uses the original command path before "bsd.pkg.mk" modified and will therefore avoid using any wrappers.
2006-09-03Call imake(1) with `WRAPPER_SKIP_TRANSFORM=yes'. The argumentshira1-2/+3
should not be transformed by wrapper. This fixes PR pkg/34139. Reviewed by tron@.
2006-08-28Add missing $NetBSD$dmcmahill1-0/+2
2006-08-09Drop .ORDER declarations since pkgsrc doesn't support "make -j ...".jlam1-3/+1
2006-07-22Modify the barrier so that we always invoke the recursive make processjlam1-2/+2
when passing through the barrier. This ensures the PATH (passed via PKGSRC_MAKE_ENV) is correctly set for all phases after the barrier. This fixes a bug in "interactive" pkgsrc use, where if you have no work directory and type "make build && make install", then the "install" step does not have a PATH set to include all the wrapper and tools directories.
2006-07-10Fix typo in comment.wiz1-2/+2
2006-07-10Always add dependencies for packages pulled in indirectly buildlink3 thatjlam1-22/+13
are build dependencies. This should fix PR pkg/33940. Thanks to Joerg for the debugging hint.
2006-07-08Change the format of BUILDLINK_ORDER to contain depth information as well,jlam2-1/+28
and add a new helper target and script, "show-buildlink3", that outputs a listing of the buildlink3.mk files included as well as the depth at which they are included. For example, "make show-buildlink3" in fonts/Xft2 displays: zlib fontconfig iconv zlib freetype2 expat freetype2 Xrender renderproto
2006-07-07Rename <phase>_COOKIE variables to _COOKIE.<phase>. These are privatejlam1-2/+2
variables so there are no user-visible changes. This change just makes it a little easier to write for loops.
2006-07-05Flatten out recursive makes into a single re-invocation of make byjlam1-20/+7
introducing the concept of a "barrier". We separate the user-invokable targets into ones that must happen before the barrier, and ones that must happen after the barrier. The ones that happen after the barrier are run in a sub-make process. In this case, the targets that must be run after the barrier are from the "wrapper" step and beyond. We rewrite the various "flow" targets, e.g. wrapper, configure, build, etc., so that they of the right form to use the barrier target. This now completely removes the concept of PKG_PHASE from pkgsrc. It is replaced with the concept of "before" and "after" the barrier, and this state can be checked by testing for the existence of the barrier cookie file. Because we've removed most of the recursive makes, there is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove them for now. As part of this commit, put back the logic that conditionalized the sources for the various cookie files. Because the sources are all "phony" targets, they were always run, regardless of whether or not the cookie file already existed. Now, if a cookie file exists, then that entire phase associated with that cookie file is skipped. Lastly, fix a thinko in configure/bsd.configure.mk where setting NO_CONFIGURE in a package Makefile would manage to skip the "wrapper" step altogether. Fix this by correctly noting "wrapper" and not "patch" as the preceding step to "configure".
2006-06-09pkglint says, the :Q operator should not be used in double quotes.rillig1-20/+20
The code here only worked due to many conincidences: Let's assume a variable has the value "a b" and is used with the :Q operator, which results in "a\ b" (a, backslash, space, b). When used in double quotes, the shell command looks like: echo "a\ b" which, depending on the shell, may output the backslash literally or not. In the case of this file, the ":Q" string was not passed to echo(1), but to sed(1). sed(1) in turn interprets (backslash, space) in the replacement text as equivalent to (space), and that's where the backslash finally disappears. So it's only to this coincident that the code worked although it was not correct.
2006-06-07Use ERROR_MSG for an error message.jlam1-3/+3
2006-06-06Remove PKG_PHASEs that no longer exist from the various *_PHASE_* lists.jlam1-4/+3
2006-06-04Band-aid for dependency handling due to the stricter rules from thejoerg1-2/+2
dependency cookie. We now want all dependencies in the default phase, since depends is run before/outside real-extract. This can be seen e.g. by textproc/troffcvt, which has a build dependency in a build dependency. Discussed and tested with seb@.
2006-05-06If USE_ABI_DEPENDS=no, do not add the BUILDLINK_ABI_DEPENDS.$pkgreed1-3/+4
to BUILD_DEPENDS. (I posted about this to pkgsrc-users on April 14.)
2006-04-14If we can't find the package with pkg_info when computing BUILDLINK_PREFIX,jlam1-3/+5
make the resulting error message more useful for debugging purposes by including the name of the variable in a null statement that is part of the command executed.
2006-04-10Correct typo in example Makefile snippet.tron1-2/+2
2006-04-06Over 1200 files touched but no revisions bumped :)reed2-16/+16
RECOMMENDED is removed. It becomes ABI_DEPENDS. BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo. BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo. BUILDLINK_DEPENDS does not change. IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS which defaults to "yes". Added to obsolete.mk checking for IGNORE_RECOMMENDED. I did not manually go through and fix any aesthetic tab/spacing issues. I have tested the above patch on DragonFly building and packaging subversion and pkglint and their many dependencies. I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I have used IGNORE_RECOMMENDED for a long time). I have been an active user of IGNORE_RECOMMENDED since it was available. As suggested, I removed the documentation sentences suggesting bumping for "security" issues. As discussed on tech-pkg. I will commit to revbump, pkglint, pkg_install, createbuildlink separately. Note that if you use wip, it will fail! I will commit to pkgsrc-wip later (within day).
2005-12-09Fix build of the packages which pass .la files to libtool by relativehira2-3/+6
path. This allows to use symbolic linked path as WRKOBJDIR and should fix PR pkg/31337.
2005-08-10If we need imake, then also pull in any other tools that imake needs tojlam1-4/+5
work.
2005-08-05Hardcode a workaround for perl's DynaLoader.a which is definitely ajlam1-1/+14
PIC code archive, but libtool isn't smart enough to realize it. Munge the name within cmd-sink-libtool into something that will make libtool recognize it as a PIC code archive. We unmunge it in arg-pp-main so non-libtool wrappers see the right thing. This let's us use libtool to link applications with an embedded Perl interpreter. I feel so dirty...
2005-07-19Tools that are marked with ":pkgsrc" are needed very early on, probablyjlam1-3/+4
too early for pkgsrc to adequately cope. In this case, imake-check.mk was marking "imake" as a tool that was used to perform some tests. This was causing xpkgwedge to be unnecessarily marked as a build dependency since using imake in pkgsrc pretty much requires xpkgwedge. However, in the case where we are running the "imake checks", we don't need xpkgwedge around. Solve this issue by marking all the tools in imake-check.mk with ":pkgsrc", and modify the xpkgwedge dependency test to not care about "imake:pkgsrc".
2005-07-15Drop distinction between PKGSRC_USE_TOOLS and USE_TOOLS by makingjlam3-13/+13
PKGSRC_USE_TOOLS go away. There is now only a single USE_TOOLS variable that specifies all of the tools we need to build/run the package.
2005-06-22We were writing the wrong directory path for the location to thejlam1-2/+2
uninstalled libtool archive in the case where we build it into some place other than the current directory. Older versions of libtool didn't allow you to build a *.la file anywhere other than the current directory, and libtool-fix-la made use of this assumption in libtool's behavior. More recent versions of libtool *do* let you build a *.la file anywhere you'd like, so instead of blindly assuming it's the current directory, use the path to the argument of the -o option. This embeds the proper directory path into the uninstalled libtool archive. This has no impact on packages that just build libtool archives into the current directory. The packages that *are* impacted are the ones that: (1) pkgsrc converted to use libtool, and, (2) build shared libraries that are linked into other things as part of the build, and, (3) builds the libtool archives in some place other than the current directory.
2005-06-20Allow for explicit PREFER.<pkg> settings to override PREFER_NATIVE andjlam1-6/+7
PREFER_PKGSRC.
2005-06-15Avoid generating a blank line as the first command of a target as thatjlam1-1/+2
isn't understood by some make programs, e.g. /usr/ccs/bin/make.
2005-06-03Coalesce the common makefile code in the builtin.mk file that inspectjlam2-0/+167
the X11 distribution using imake into mk/buildlink3/imake-check.mk. imake-check.mk calls out to a helper shell script mk/buildlink3/imake-check that generates the required Imakefiles and runs imake. Remove the now extraneous builtin-imake.mk files as the builtin.mk files can now contain the name of the imake symbol to check.
2005-06-01Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc.jlam4-102/+179
Several changes are involved since they are all interrelated. These changes affect about 1000 files. The first major change is rewriting bsd.builtin.mk as well as all of the builtin.mk files to follow the new example in bsd.builtin.mk. The loop to include all of the builtin.mk files needed by the package is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk is now included by each of the individual builtin.mk files and provides some common logic for all of the builtin.mk files. Currently, this includes the computation for whether the native or pkgsrc version of the package is preferred. This causes USE_BUILTIN.* to be correctly set when one builtin.mk file includes another. The second major change is teach the builtin.mk files to consider files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most of the builtin.mk files test for the presence of built-in software by checking for the existence of certain files, e.g. <pthread.h>, and we now assume that if that file is under ${LOCALBASE}, then it must be from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The exceptions to this new check are the X11 distribution packages, which are handled specially as noted below. The third major change is providing builtin.mk and version.mk files for each of the X11 distribution packages in pkgsrc. The builtin.mk file can detect whether the native X11 distribution is the same as the one provided by pkgsrc, and the version.mk file computes the version of the X11 distribution package, whether it's built-in or not. The fourth major change is that the buildlink3.mk files for X11 packages that install parts which are part of X11 distribution packages, e.g. Xpm, Xcursor, etc., now use imake to query the X11 distribution for whether the software is already provided by the X11 distribution. This is more accurate than grepping for a symbol name in the imake config files. Using imake required sprinkling various builtin-imake.mk helper files into pkgsrc directories. These files are used as input to imake since imake can't use stdin for that purpose. The fifth major change is in how packages note that they use X11. Instead of setting USE_X11, package Makefiles should now include x11.buildlink3.mk instead. This causes the X11 package buildlink3 and builtin logic to be executed at the correct place for buildlink3.mk and builtin.mk files that previously set USE_X11, and fixes packages that relied on buildlink3.mk files to implicitly note that X11 is needed. Package buildlink3.mk should also include x11.buildlink3.mk when linking against the package libraries requires also linking against the X11 libraries. Where it was obvious, redundant inclusions of x11.buildlink3.mk have been removed.
2005-05-24Add BUILTIN_PACKAGES, this will contain all builtin dependencies usedxtraeme1-1/+10
in packages, e.g on my NetBSD system: $ cd pkgsrc/graphics/gimp && make show-var VARNAME=BUILTIN_PACKAGES bzip2 heimdal openssl db1 gettext iconv zlib pthread $ Ok'ed by jlam.
2005-05-24Add a new file find-libs.mk that can be included by builtin.mk filesjlam1-0/+75
to detect the presence of libraries in the base system. The input variable is BUILDLINK_FIND_LIBS, which is a list of library names, e.g. ncurses, iconv, etc., that will be sought in the base system. BUILDLINK_LIB_FOUND.<lib> is set to "yes" or "no" depending on the result of the search. An example use is: BUILDLINK_FIND_LIBS:= intl iconv .include "../../mk/buildlink3/find-libs.mk" # ${BUILDLINK_LIB_FOUND.intl} and ${BUILDLINK_LIB_FOUND.iconv} are now # either "yes" or "no".
2005-05-11Rename MAKE_VARS to MAKEVARS so that it more closely resemblesjlam1-4/+4
"MAKEFLAGS". Both "MAKEVARS" and "MAKEFLAGS" affect the package-level make process, not the software's own make process.
2005-05-09Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file thatjlam1-8/+8
caches variable definitions that were computed by make. These variables are specified by listing them in MAKE_VARS, e.g., .if !defined(FOO) FOO!= very_time_consuming_command .endif MAKE_VARS+= FOO bsd.pkg.mk will include only the one generated during the most recent phase. A particular phase's makevars.mk file consists of variable definitions that are a superset of all of the ones produced in previous phases of the build. The caching is useful because bsd.pkg.mk invokes make recursively, which in the example above has the potential to run the very time-consuming command each time unless we cause FOO to be defined for the sub-make processes. We don't cache via MAKE_FLAGS because MAKE_FLAGS isn't consistently applied to every invocation of make, and also because MAKE_FLAGS can overflow the maximum length of a make variable very quickly if we add many values to it. One important and desirable property of variables cached via MAKE_VARS is that they only apply to the current package, and not to any dependencies whose builds may have been triggered by the current package. The makevars.mk files are generated by new targets fetch-vars, extract-vars, patch-vars, etc., and these targets are built during the corresponding real-* target to ensure that they are being invoked with PKG_PHASE set to the proper value. Also, remove the variables cache file that bsd.wrapper.mk was generating since the new makevars.mk files provide the same functionality at a higher level. Change all WRAPPER_VARS definitions that were used by the old wrapper-phase cache file into MAKE_VARS definitions.
2005-03-24USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per mailtv2-51/+7
to tech-pkg: ===== * USE_BUILDLINK3=YES will be unconditional. (In fact, USE_BUILDLINK3 will be ignored altogether by mk/; but see below.) * NO_BUILDLINK and NO_WRAPPER will be ignored by mk/. If a build happens, these phases will happen. * The existing NO_BUILD will imply the previous NO_BUILDLINK and NO_WRAPPER. If no build happens, those phases are not needed. * NO_TOOLS will be ignored by mk/. The tools phase, which provides much more than just the C compiler, will always happen regardless of package. This will make metapackage builds only slightly slower, in trade for far less user error.
2005-02-17Revert previous. This breaks databases/postgresql74-lib for me on NetBSDseb1-3/+1
current.
2005-02-16Add ${BUILDLINK_VARS} to WRAPPER_VARS.seb1-1/+3
Since the bsd.wrapper.mk framework was introduced, hence the removal of BUILDLINK_VARS handling from bsd.buildlink3.mk, none of the variables listed in BUILDLINK_VARS were "cached" in any way.
2005-02-15The libtool wrapper should always do the compiler wrapper transformations,jlam1-1/+7
so move the setting for _WRAP_ARG_PP.LIBTOOL out of conditional areas of bsd.wrapper.mk and set it globally in bsd.buildlink3.mk with the rest of the libtool wrapper variables.
2004-12-01"the the" -> "the"wiz2-5/+5
2004-11-30Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,jlam1-3/+3
are handled. The idea now is to simply remove the paths in the values of these variables, leaving behind only the basename plus any arguments, e.g.: CC= /usr/local/bin/gcc becomes CC= gcc CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E The wrapper scripts are generated for every unique executable mentioned by the toolchain variables, so for the example above, only a "gcc" wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.} are the paths to the executables wrapped by the wrapper scripts. Note that it's now possible to set "CC" to something more than just the path to the compiler, e.g. CC= cc -ffast-math -funroll-loops -fomit-frame-pointer and the full value of ${CC} will be passed through via CONFIGURE_ENV and MAKE_ENV.
2004-11-28Remove pre-buildlink and post-buildlink as part of getting pkgsrc readyjlam1-11/+3
for pkgsrc-2004Q4. The "buildlink" phase was removed for the last branch, and this is the final cleanup. "post-buildlink" is now "post-wrapper".
2004-11-17Generalize BUILDLINK_AUTO_LIBS.<pkg> to BUILDLINK_AUTO_VARS.<pkg>,jlam1-19/+20
which is "yes" or "no" for whether the values of any of BUILDLINK_{CPPFLAGS,CFLAGS,LDFLAGS,LIBS}.<pkg> should be appended automatically to their respective variables.
2004-11-17BUILDLINK_AUTO_LIBS.<pkg> is "yes" or "no" for whether BUILDLINK_LIBS.<pkg>jlam1-6/+13
should automatically be appended to LIBS. It defaults to "yes".