Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix installation race #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AM_CPPFLAGS = -Wall -Wextra

pkglibexec_PROGRAMS = tiny_initramfs
noinst_PROGRAMS = tiny_initramfs

tiny_initramfs_SOURCES = tiny_initramfs.c io.c fstab.c mount.c log.c devices.c util.c
if ENABLE_NFS4
Expand All @@ -11,12 +11,19 @@ tiny_initramfs_LDFLAGS = -static

EXTRA_DIST = README.md tiny_initramfs.h nfs4.h

installdirs-local:
$(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)"

if HAVE_VARIANT
install-exec-hook:
cd $(DESTDIR)$(pkglibexecdir) && \
mv -f tiny_initramfs init-@VARIANT@
install-exec-local:
$(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)"
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) tiny_initramfs$(EXEEXT) "$(DESTDIR)$(pkglibexecdir)/init-@VARIANT@$(EXEEXT)"
uninstall-local:
rm -f "$(DESTDIR)$(pkglibexecdir)/init-@VARIANT@$(EXEEXT)"
else
install-exec-hook:
cd $(DESTDIR)$(pkglibexecdir) && \
mv -f tiny_initramfs init
install-exec-local:
$(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)"
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) tiny_initramfs$(EXEEXT) "$(DESTDIR)$(pkglibexecdir)/init$(EXEEXT)"
uninstall-local:
rm -f "$(DESTDIR)$(pkglibexecdir)/init$(EXEEXT)"
endif