Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (39 sloc) 1.128 kb
#
# Sub-makefile for prepping the native build environment.
#
include mk/macros.mk
$(call varchklist_call,\
BUILDRUNCMD)
rootsh = \
$(pound)! /bin/bash\
\neval \"\$$@\"
rootyum = $(BUILDRUNCMD) \
"rpm -q '$(1)' > /dev/null || \
sudo yum install -y $(2) '$(1)'"
yumpkgs = rpm-build iptables-devel kernel-devel
yumpkgsopt =
ifeq ($(OSMACRO),rhel_version)
ifeq ($(OSMACROVER),505)
yumpkgs += redhat-rpm-config
endif
ifeq ($(OSMACROVER),600)
yumpkgs += redhat-rpm-config
yumpkgsopt += kabi-whitelists
endif
endif
clean_files = $(BUILDRUNCMD)
clobber_files = $(clean_files)
distclean_files = $(clobber_files)
all: create_buildenv prep_buildenv
prep_buildenv: $(BUILDRUNCMD)
$(foreach r,$(yumpkgs),$(call rootyum,$r) || \
{ echo >&2 "Build requires '$r' rpm."; exit 1; }$(nl))
$(foreach r,$(yumpkgsopt),$(call rootyum,$r) || exit 0$(nl))
create_buildenv:
$(BUILDRUNCMD):
rm -f -- "$@"
echo -e "$(rootsh)" > "$@"
chmod 0555 -- "$@"
clean clobber distclean::
$(call scrub_files_cmd_call,$($@_files))
.PHONY: all prep_buildenv create_buildenv clean clobber distclean
Jump to Line
Something went wrong with that request. Please try again.