Clone of ipxe replica repo
 
 
 
 
 
Go to file
Masahiro Yamada 37c2d10e0c fix build error in a shallow-cloned source tree
Cloning the repository with the --depth option is useful when you do
not need the full git history, but it fails to build core/version.c

  $ git clone --depth 1 git://git.ipxe.org/ipxe.git
  $ cd ipxe/src
  $ make
   [snip]
      [VERSION] bin/version.ipxe.dsk.o
  In file included from include/ipxe/features.h:6,
                   from core/version.c:33:
  <command-line>: error: unsigned conversion from ‘int’ to ‘unsigned char’ changes value from ‘9062’ to ‘102’ [-Werror=overflow]
  include/ipxe/dhcp.h:529:58: note: in definition of macro ‘DHCP_OPTION’
    529 | #define DHCP_OPTION( ... ) VA_ARG_COUNT ( __VA_ARGS__ ), __VA_ARGS__
        |                                                          ^~~~~~~~~~~
    ...

A shallow-cloned repository may not have any tag at all, then it returns
only a commit hash.

  $ git describe --tags --always --long --abbrev=1 --match "v*"
  9062

In such a case, VERSION_MINOR becomes empty, causing the build error.

If 'git describe' does not find any tag, let the version macros fall
back to the default:

  VERSION_MAJOR   = 1
  VERSION_MINOR   = 0
  VERSION_PATCH   = 0
  EXTRAVERSION    = +

Setting sha1 to GITVERSION is still useful.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2021-12-04 10:50:22 +09:00
.github/workflows [linux] Use host glibc system call wrappers 2021-02-28 23:28:23 +00:00
contrib [cloud] Allow multiple images to be imported simultaneously 2021-05-02 12:38:03 +01:00
src fix build error in a shallow-cloned source tree 2021-12-04 10:50:22 +09:00
COPYING [legal] Update GPLv2 licence text 2015-02-26 17:59:53 +00:00
COPYING.GPLv2 [legal] Update GPLv2 licence text 2015-02-26 17:59:53 +00:00
COPYING.UBDL [legal] Add support for the Unmodified Binary Distribution Licence 2015-03-02 12:07:14 +00:00
README [doc] Re-add README file 2010-05-28 00:03:47 +01:00

README

iPXE README File

Quick start guide:

   cd src
   make

For any more detailed instructions, see http://ipxe.org