Move mongoose library to regression

This commit is contained in:
Fabing Li 2024-05-08 10:33:25 +08:00 committed by Tate, Hongliang Tian
parent 2b67dee1fc
commit fa4ba08862
3 changed files with 5 additions and 4 deletions

View File

@ -23,7 +23,8 @@ TEST_APPS := \
pty \
signal_c \
C_SOURCES := $(shell find . -type f \( -name "*.c" -or -name "*.h" \) )
# The C head and source files of all the apps, excluding the downloaded mongoose files
C_SOURCES := $(shell find . -type f \( -name "*.c" -or -name "*.h" \) ! -name "mongoose.c" ! -name "mongoose.h")
.PHONY: all
all: $(TEST_APPS) scripts

1
regression/apps/mongoose/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
mongoose.*

View File

@ -2,7 +2,7 @@
CUR_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
BUILD_DIR := $(CUR_DIR)/../../build/initramfs/regression/network
MONGOOSE_DIR := $(CUR_DIR)/../../build/mongoose
MONGOOSE_DIR := $(CUR_DIR)
MONGOOSE_C := $(MONGOOSE_DIR)/mongoose.c
MONGOOSE_H := $(MONGOOSE_DIR)/mongoose.h
MONGOOSE_FILES := $(MONGOOSE_C) $(MONGOOSE_H)
@ -28,8 +28,7 @@ $(MONGOOSE_O): $(MONGOOSE_FILES)
$(CC) -c $(MONGOOSE_C) $(CFLAGS) -o $@
$(MONGOOSE_FILES): | $(MONGOOSE_DIR)
wget --header="Accept: application/vnd.github.v3.raw" \
-O $@ "https://api.github.com/repos/cesanta/mongoose/contents/$(notdir $@)?ref=7.13"
wget -O $@ "https://raw.githubusercontent.com/cesanta/mongoose/7.13/$(notdir $@)"
$(BUILD_DIR) $(MONGOOSE_DIR):
@mkdir -p $@