Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Makefile: New file implementing make install
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit f06c020)
  • Loading branch information
cgwalters authored and jlebon committed Oct 23, 2019
1 parent 4213583 commit c3314f4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.PHONY: all
all:
@echo "(No build step)"

.PHONY: install
install: all
for x in dracut/*; do \
if ! [ -d "${x}" ]; then continue; fi; \
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/*

0 comments on commit c3314f4

Please sign in to comment.