From 9b66bf5cb688217f2e3c6d0f3e92a4fa5c1ea46e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 17 Sep 2019 18:36:32 +0000 Subject: [PATCH] Makefile: New file implementing `make install` See https://github.com/cgwalters/build-api With this for example, we can just have the Fedora spec file do `make install DESTDIR=$RPM_BUILD_ROOT` just like everything else; helping to ensure that as much logic as possible remains upstream. Mainly I want this for hacking so I can just `make install DESTDIR=/srv/walters/fcos/overrides/rootfs` without building an RPM or copying files manually. --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..132f8c9 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +.PHONY: all +all: + @echo "(No build step)" + +.PHONY: install +install: all + for x in dracut/*; do \ + bn=$$(basename $$x); \ + install -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x/*; \ + done + install -D -t $(DESTDIR)/usr/lib/systemd/system systemd/* + install -D -t $(DESTDIR)/etc/grub.d grub/*