Commit 32983a24 authored by Ophélie Gagnard's avatar Ophélie Gagnard

Implement the "make; make install" workflow. First working version with "make...

Implement the "make; make install" workflow. First working version with "make no-dracut; make install-no-dracut". Needs root privilege for the "install" stage.
parent 026c9a86
INCLUDE_PYTHON = $(shell pkg-config --cflags python3 | cut -f 1 -d " ") INCLUDE_PYTHON = $(shell pkg-config --cflags python3 | cut -f 1 -d " ")
bin/metadata-collect-agent: bin/metadata-collect-agent:
mkdir -p build/metadata-collect-agent/logs #Error expected here (line -g++ ...), writing a C program using the error messages
install -d bin/ ;\
mkdir -p build/ ;\
cp -r installation/metadata-collect-agent/ build/metadata-collect-agent ;\
mkdir -p build/metadata-collect-agent/logs ;\
cp src/main.cpp build/metadata-collect-agent/ cp src/main.cpp build/metadata-collect-agent/
cp installation/parse_link_errors.py build/metadata-collect-agent/ cd build/metadata-collect-agent ;\
make
cd build/metadata-collect-agent/ install -m 744 build/metadata-collect-agent/metadata-collect-agent bin/
#Error expected here, writing a C program using the error messages
-g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread $(INCLUDE_PYTHON) main.cpp -lcrypto -lfmt -o main 2> logs/link_errors
./parse_link_errors.py < logs/link_errors
make fake_python.o
g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread $(INCLUDE_PYTHON) main.cpp fake_python.o -lcrypto -lfmt -o metadata-collect-agent
install -d ../../bin/
install -m 744 metadata-collect-agent ../../bin/
bin/fluentbit: bin/fluentbit:
installation/fluentbit/fluentbit-install.sh install -d bin/ ;\
mkdir -p build/ ;\
cp installation/fluentbit-install.sh build/fluentbit-install.sh ;\
cd build/ ;\
./fluentbit-install.sh ;\
cd .. ;\
cp build/fluent-bit/build/bin/fluent-bit bin/fluent-bit
lib/fluentbit_wendelin.so: lib/fluentbit_wendelin.so:
mkdir -p build/ install -d lib/ ;\
cd build/ mkdir -p build/ ;\
git clone https://lab.nexedi.com/nexedi/fluentbit-plugin-wendelin.git cd build/ ;\
cd fluentbit-plugin-wendelin git clone https://lab.nexedi.com/nexedi/fluentbit-plugin-wendelin.git ;\
git checkout -b autostop origin/autostop cd fluentbit-plugin-wendelin ;\
make install git checkout -b autostop origin/autostop ;\
install -d lib/ make install ;\
install build/fluentbit-plugin-wendelin/libfluentbit_wendelin.so lib/fluentbit_wendelin.so cd ../../ ;\
cd ../../ install build/fluentbit-plugin-wendelin/libfluentbit_wendelin.so lib/fluentbit_wendelin.so ;\
#installation/plugin-fluentbit/fluentbit_wendelin_install.sh #installation/plugin-fluentbit/fluentbit_wendelin_install.sh
install-no-dracut: install-no-dracut:
#-ln -f ../../metadata-collect-agent metadata-collect-agent install -d /sbin/
-ln -f metadata-collect-agent ../../dracut.module/90metadata-collect/metadata-collect-agent install -m 744 bin/metadata-collect-agent /sbin/metadata-collect-agent
#-ln -f metadata-collect-agent ../../debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent install -m 744 bin/fluent-bit /sbin/fluent-bit
install -d /etc/
install -m 644 flb.conf /etc/flb.conf
install lib/fluentbit_wendelin.so /etc/fluentbit_wendelin.so
no-dracut: bin/metadata-collect-agent bin/fluentbit lib/fluentbit_wendelin.so no-dracut: bin/metadata-collect-agent lib/fluentbit_wendelin.so bin/fluent-bit
.PHONY: no-dracut install-no-dracut .PHONY: no-dracut install-no-dracut
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment