From 4622dd15dc12dab47a0381a8a7188f0f0421e01d Mon Sep 17 00:00:00 2001
From: Hans Ulrich Niedermann <hun@n-dimensional.de>
Date: Wed, 20 Nov 2013 00:00:54 +0100
Subject: [PATCH] Preserve file modification time on install

Add -p option to install(1) invocation in order to preserve
the timestamps of the files being installed.
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 942a7a5..290b8a4 100644
--- a/Makefile
+++ b/Makefile
@@ -27,10 +27,10 @@ $(EXEC_NAME): beep.c
 	$(CC) $(FLAGS) $(CFLAGS) -o $(EXEC_NAME) beep.c
 
 install: all
-	$(INSTALL) -m 0755 -d           $(DESTDIR)$(bindir)
-	$(INSTALL) -m 0755 $(EXEC_NAME) $(DESTDIR)$(bindir)/
-	$(INSTALL) -m 0755 -d           $(DESTDIR)$(man1dir)
-	$(INSTALL) -m 0644 $(MAN_FILE)  $(DESTDIR)$(man1dir)/
+	$(INSTALL) -m 0755 -d              $(DESTDIR)$(bindir)
+	$(INSTALL) -m 0755 -p $(EXEC_NAME) $(DESTDIR)$(bindir)/
+	$(INSTALL) -m 0755 -d              $(DESTDIR)$(man1dir)
+	$(INSTALL) -m 0644 -p $(MAN_FILE)  $(DESTDIR)$(man1dir)/
 
 uninstall:
 	rm -f $(DESTDIR)$(bindir)/$(EXEC_NAME)
-- 
2.7.5
