Skip to content

Commit c99ec0f

Browse files
michelmnodeece
authored andcommitted
makefile changes after fedora review
as per following comments extracted from: https://bugzilla.redhat.com/show_bug.cgi?id=1563680#c3 * man and doc install in docdir for a noarch rpm %{_pkgdocdir} (i.e /usr/share/doc/libocxl) * Makefile doesn't keep timestamps while installing files. To fix this, replace occurrences of "install" with $(INSTALL) $(INSTALL) variable is set up by %make_install macro, replacing it with install -p, which keeps timestamps. Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
1 parent 3eb443d commit c99ec0f

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ HAS_WGET = $(shell /bin/which wget > /dev/null 2>&1 && echo y || echo n)
1818
HAS_CURL = $(shell /bin/which curl > /dev/null 2>&1 && echo y || echo n)
1919

2020
# Update this to test a single feature from the most recent header we require:
21-
CHECK_OCXL_HEADER_IS_UP_TO_DATE = $(shell /bin/echo -e \\\#include \"$(1)\"\\\nvoid test\(struct ocxl_ioctl_metadata test\)\; | \
21+
CHECK_OCXL_HEADER_IS_UP_TO_DATE = $(shell /bin/echo -e \\\#include $(1)\\\nvoid test\(struct ocxl_ioctl_metadata test\)\; | \
2222
$(CC) $(CFLAGS) -Werror -x c -S -o /dev/null - > /dev/null 2>&1 && echo y || echo n)
2323

2424
check_ocxl_header:
@@ -92,13 +92,13 @@ install: all docs
9292
mkdir -p $(DESTDIR)$(libdir)
9393
mkdir -p $(DESTDIR)$(includedir)
9494
mkdir -p $(DESTDIR)$(mandir)/man3
95-
mkdir -p $(DESTDIR)$(datadir)/libocxl/search
96-
install -m 0755 obj/$(LIBNAME) $(DESTDIR)$(libdir)/
95+
mkdir -p $(DESTDIR)$(docdir)/libocxl/search
96+
$(INSTALL) -m 0755 obj/$(LIBNAME) $(DESTDIR)$(libdir)/
9797
ln -s $(LIBNAME) $(DESTDIR)$(libdir)/$(LIBSONAME)
9898
ln -s $(LIBNAME) $(DESTDIR)$(libdir)/libocxl.so
99-
install -m 0644 src/include/libocxl.h $(DESTDIR)$(includedir)/
100-
install -m 0644 -D docs/man/man3/* $(DESTDIR)$(mandir)/man3
101-
install -m 0644 -D docs/html/*.* $(DESTDIR)$(datadir)/libocxl
102-
install -m 0644 -D docs/html/search/* $(DESTDIR)$(datadir)/libocxl/search
99+
$(INSTALL) -m 0644 src/include/libocxl.h $(DESTDIR)$(includedir)/
100+
$(INSTALL) -m 0644 -D docs/man/man3/* $(DESTDIR)$(mandir)/man3
101+
$(INSTALL) -m 0644 -D docs/html/*.* $(DESTDIR)$(docdir)/libocxl
102+
$(INSTALL) -m 0644 -D docs/html/search/* $(DESTDIR)$(docdir)/libocxl/search
103103

104104
.PHONY: clean all install docs precommit cppcheck cppcheck-xml check_ocxl_header

Makefile.rules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ testobj/%.o-test : unittests/%.c testobj/libocxl.a
3131
datadir ?= $(PREFIX)/share
3232
includedir ?= $(PREFIX)/include
3333
mandir ?= $(datadir)/man
34+
docdir ?= $(datadir)/doc
3435
libdir ?= $(PREFIX)/lib64
36+
INSTALL ?= install -p

0 commit comments

Comments
 (0)