ipsec: fix logic in ext_hdr_is_pre_esp
[vpp.git] / build / external / packages.mk
index d1126db..eba7022 100644 (file)
@@ -71,40 +71,10 @@ $(B)/.$1.extract.ok: $(B)/.$1.download.ok
 .PHONY: $1-extract
 $1-extract: $(B)/.$1.extract.ok
 
-##############################################################################
-# Git clone & checkout
-##############################################################################
-
-$(B)/.$1.clone.ok:
-       $$(call h1,"Cloning $1 $($1_repository)")
-       @mkdir -p $$($1_src_dir)
-       @git clone --recursive $$($1_repository) $$($1_src_dir)
-ifneq ($$($1_version),)
-       $$(call h1,"Checking out $1 $($1_version)")
-       cd $$($1_src_dir) && git -c advice.detachedHead=false checkout $$($1_version)
-       cd $$($1_src_dir) && git submodule update --init
-endif
-       @touch $$@
-
-.PHONY: $1-clone
-$1-clone: $(B)/.$1.clone.ok
-
-##############################################################################
-# Fetch source : clone or extract
-##############################################################################
-
-ifeq ($$($1_repository),)
-$(B)/.$1.fetchsrc.ok: $(B)/.$1.extract.ok
-       @touch $$@
-else
-$(B)/.$1.fetchsrc.ok: $(B)/.$1.clone.ok
-       @touch $$@
-endif
-
 ##############################################################################
 # Patch
 ##############################################################################
-$(B)/.$1.patch.ok: $(B)/.$1.fetchsrc.ok
+$(B)/.$1.patch.ok: $(B)/.$1.extract.ok
        $$(call h1,"patching $1 $($1_version)")
 ifneq ($$(wildcard $$($1_patch_dir)/*.patch),)
        @for f in $$($1_patch_dir)/*.patch ; do \
@@ -131,11 +101,18 @@ define $1_config_cmds
 endef
 endif
 
-$(B)/.$1.config.ok: $(B)/.$1.patch.ok $(addsuffix -install,$($1_depends))
+ifneq ($(filter $1,$(VPP_SKIP_EXTERNAL)), $1)
+$(B)/.$1.config.ok: $(B)/.$1.patch.ok $(addprefix $(B)/.,$(addsuffix .install.ok,$($1_depends)))
        $$(call h1,"configuring $1 $($1_version) - log: $$($1_config_log)")
        @mkdir -p $$($1_build_dir)
        $$(call $1_config_cmds)
        @touch $$@
+else
+$(B)/.$1.config.ok:
+       $$(call h1,"Skipping $1 $($1_version)")
+       @mkdir -p $(B)
+       @touch $$@
+endif
 
 .PHONY: $1-config
 $1-config: $(B)/.$1.config.ok
@@ -150,10 +127,17 @@ define $1_build_cmds
 endef
 endif
 
+ifneq ($(filter $1,$(VPP_SKIP_EXTERNAL)), $1)
 $(B)/.$1.build.ok: $(B)/.$1.config.ok
        $$(call h1,"building $1 $($1_version) - log: $$($1_build_log)")
        $$(call $1_build_cmds)
        @touch $$@
+else
+$(B)/.$1.build.ok:
+       $$(call h1,"Skipping $1 $($1_version)")
+       @mkdir -p $(B)
+       @touch $$@
+endif
 
 .PHONY: $1-build
 $1-build: $(B)/.$1.build.ok
@@ -168,13 +152,24 @@ define $1_install_cmds
 endef
 endif
 
+ifneq ($(filter $1,$(VPP_SKIP_EXTERNAL)), $1)
 $(B)/.$1.install.ok: $(B)/.$1.build.ok
        $$(call h1,"installing $1 $($1_version) - log: $$($1_install_log)")
        $$(call $1_install_cmds)
        @touch $$@
+else
+$(B)/.$1.install.ok:
+       $$(call h1,"Skipping $1 $($1_version)")
+       @mkdir -p $(B)
+       @touch $$@
+endif
 
 .PHONY: $1-install
 $1-install: $(B)/.$1.install.ok
 
+.PHONY: $1-show-%
+$1-show-%:
+       @echo $$($$*)
+
 ALL_TARGETS += $1-install
 endef