Commit f458fc74 authored by Ophélie Gagnard's avatar Ophélie Gagnard

Makefile: Add clean-dracut. Fix some bugs and flaws.

parent ca7afc1c
......@@ -23,7 +23,7 @@ bin/fluent-bit:
cd build/ ;\
./fluentbit-install.sh ;\
cd .. ;\
cp build/fluent-bit/build/bin/fluent-bit bin/fluent-bit
install -m 744 build/fluent-bit/build/bin/fluent-bit bin/
lib/fluentbit_wendelin.so:
install -d lib/ ;\
......@@ -34,7 +34,7 @@ lib/fluentbit_wendelin.so:
git checkout -b autostop origin/autostop ;\
make install ;\
cd ../../ ;\
install build/fluentbit-plugin-wendelin/libfluentbit_wendelin.so lib/fluentbit_wendelin.so ;\
install -m 644 build/fluentbit-plugin-wendelin/libfluentbit_wendelin.so lib/fluentbit_wendelin.so ;\
#installation/plugin-fluentbit/fluentbit_wendelin_install.sh
install-no-dracut:
......@@ -44,24 +44,24 @@ install-no-dracut:
install -d $(DESTDIR)$(PREFIX)/etc/
install -m 644 flb.conf $(DESTDIR)$(PREFIX)/etc/flb.conf
install -d $(DESTDIR)$(PREFIX)/lib
install lib/fluentbit_wendelin.so $(DESTDIR)$(PREFIX)/lib/fluentbit_wendelin.so
install -m 644 lib/fluentbit_wendelin.so $(DESTDIR)$(PREFIX)/lib/fluentbit_wendelin.so
no-dracut: bin/metadata-collect-agent lib/fluentbit_wendelin.so bin/fluent-bit
clean-no-dracut:
rm -r build/
rm -r bin/
rm -r lib/
rm -rf build/
rm -rf bin/
rm -rf lib/
dracut.module/90metadata-collect/flb.conf:
install flb.conf dracut.module/90metadata-collect/flb.conf
install -m 644 flb.conf dracut.module/90metadata-collect/flb.conf
dracut.module/90metadata-collect/metadata-collect-agent:
install bin/metadata-collect-agent dracut.module/90metadata-collect/metadata-collect-agent
install -m 744 bin/metadata-collect-agent dracut.module/90metadata-collect/metadata-collect-agent
dracut.module/90metadata-collect/fluentbit_wendelin.so:
install lib/fluentbit_wendelin.so dracut.module/90metadata-collect/fluentbit_wendelin.so
install -m 644 lib/fluentbit_wendelin.so dracut.module/90metadata-collect/fluentbit_wendelin.so
dracut.module/90metadata-collect/fluent-bit:
install bin/fluent-bit dracut.module/90metadata-collect-agent/fluent-bit
include collect-sh-template.mk
install -m 744 bin/fluent-bit dracut.module/90metadata-collect-agent/fluent-bit
include dracut.module/collect-sh-template.mk
dracut.module/90metadata-collect/collect.sh:
echo "$${collect_sh}" >> 90metadata-collect/collect.sh
......@@ -69,6 +69,20 @@ dracut-module: dracut.module/90metadata-collect/collect.sh dracut.module/90metad
install-dracut-module:
install -d /usr/lib/dracut/modules.d/90metadata-collect
install dracut.module/90metadata-collect/* /usr/lib/dracut/module.d/90metadata-collect/
install -m 744 dracut.module/90metadata-collect/collect.sh /usr/lib/dracut/module.d/90metadata-collect/
install -m 644 dracut.module/90metadata-collect/flb.conf /usr/lib/dracut/module.d/90metadata-collect/
install -m 744 dracut.module/90metadata-collect/metadata-collect-agent /usr/lib/dracut/module.d/90metadata-collect/
install -m 644 dracut.module/90metadata-collect/fluentbit_wendelin.so /usr/lib/dracut/module.d/90metadata-collect/
install -m 744 dracut.module/90metadata-collect/fluent-bit /usr/lib/dracut/module.d/90metadata-collect/
clean-dracut:
rm -rf /usr/lib/dracut/module.d/90metadata-collect
rm -f dracut.module/90metadata-collect/collect.sh
rm -f dracut.module/90metadata-collect/flb.conf
rm -f dracut.module/90metadata-collect/metadata-collect-agent
rm -f dracut.module/90metadata-collect/fluentbit_wendelin.so
rm -f dracut.module/90metadata-collect/fluent-bit
clean: clean-no-dracut clean-dracut
.PHONY: no-dracut install-no-dracut clean-no-dracut dracut-module install-dracut-module
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