• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/pkg-autotools.mk
Yann E. MORINYann E. MORIN committed 67f8138a46303 May 2015
Raw file
Source viewDiff to previous
host-autotools-package = $(call inner-autotools-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)
 
1
################################################################################
2
# Autotools package infrastructure
3
#
4
# This file implements an infrastructure that eases development of
5
# package .mk files for autotools packages. It should be used for all
6
# packages that use the autotools as their build system.
7
#
8
# See the Buildroot documentation for details on the usage of this
9
# infrastructure
10
#
11
# In terms of implementation, this autotools infrastructure requires
12
# the .mk file to only specify metadata information about the
13
# package: name, version, download URL, etc.
14
#
15
# We still allow the package .mk file to override what the different
16
# steps are doing, if needed. For example, if <PKG>_BUILD_CMDS is
17
# already defined, it is used as the list of commands to perform to
18
# build the package, instead of the default autotools behaviour. The
19
# package can also define some post operation hooks.
20
#
21
################################################################################
22
​
23
​
24
#
25
# Utility function to upgrade config.sub and config.guess files
26
#
27
# argument 1 : directory into which config.guess and config.sub need
28
# to be updated. Note that config.sub and config.guess are searched
29
# recursively in this directory.
30
#
31
define CONFIG_UPDATE
32
    for file in config.guess config.sub; do \
33
        for i in $$(find $(1) -name $$file); do \
34
            cp support/gnuconfig/$$file $$i; \
35
        done; \
36
    done
37
endef
38
​
39
# This function generates the ac_cv_file_<foo> value for a given
40
# filename. This is needed to convince configure script doing
41
# AC_CHECK_FILE() tests that the file actually exists, since such
42
# tests cannot be done in a cross-compilation context. This function
43
# takes as argument the path of the file. An example usage is:
44
#
45
#  FOOBAR_CONF_ENV = \
46
#   $(call AUTOCONF_AC_CHECK_FILE_VAL,/dev/random)=yes
47
AUTOCONF_AC_CHECK_FILE_VAL = ac_cv_file_$(subst -,_,$(subst /,_,$(subst .,_,$(1))))
48
​
49
#
50
# Hook to update config.sub and config.guess if needed
51
#
52
define UPDATE_CONFIG_HOOK
53
    @$(call MESSAGE,"Updating config.sub and config.guess")
54
    $(call CONFIG_UPDATE,$(@D))
55
endef
56
​
57
#
58
# Hook to patch libtool to make it work properly for cross-compilation
59
#
60
define LIBTOOL_PATCH_HOOK
61
    @$(call MESSAGE,"Patching libtool")
62
    $(Q)for i in `find $($(PKG)_SRCDIR) -name ltmain.sh`; do \
63
        ltmain_version=`sed -n '/^[ \t]*VERSION=/{s/^[ \t]*VERSION=//;p;q;}' $$i | \
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.