Commit 60b47a3d 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 0ca3f000
INCLUDE_PYTHON = $(shell pkg-config --cflags python3 | cut -f 1 -d " ")
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 installation/parse_link_errors.py build/metadata-collect-agent/
cd build/metadata-collect-agent/
#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/
cd build/metadata-collect-agent ;\
make
install -m 744 build/metadata-collect-agent/metadata-collect-agent bin/
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:
mkdir -p build/
cd build/
git clone https://lab.nexedi.com/nexedi/fluentbit-plugin-wendelin.git
cd fluentbit-plugin-wendelin
git checkout -b autostop origin/autostop
make install
install -d lib/
install build/fluentbit-plugin-wendelin/libfluentbit_wendelin.so lib/fluentbit_wendelin.so
cd ../../
install -d lib/ ;\
mkdir -p build/ ;\
cd build/ ;\
git clone https://lab.nexedi.com/nexedi/fluentbit-plugin-wendelin.git ;\
cd fluentbit-plugin-wendelin ;\
git checkout -b autostop origin/autostop ;\
make install ;\
cd ../../ ;\
install build/fluentbit-plugin-wendelin/libfluentbit_wendelin.so lib/fluentbit_wendelin.so ;\
#installation/plugin-fluentbit/fluentbit_wendelin_install.sh
install-no-dracut:
#-ln -f ../../metadata-collect-agent metadata-collect-agent
-ln -f metadata-collect-agent ../../dracut.module/90metadata-collect/metadata-collect-agent
#-ln -f metadata-collect-agent ../../debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
install -d /sbin/
install -m 744 bin/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
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