aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2008-10-16 11:55:30 +0100
committerEric B Munson <ebmunson@us.ibm.com>2008-10-17 09:34:03 +0100
commita40a889d9eb9fdbcc1d49af33ca3b2a5e27a27a8 (patch)
tree47b5d06253a876edcc0bc897fc9fb123da26cac0 /Makefile
parent35e36ac19e2f1b5db40d96d1a2d746c1b65ae276 (diff)
downloadlibhugetlbfs-a40a889d9eb9fdbcc1d49af33ca3b2a5e27a27a8.tar.gz
Allow individual installation of manual pages, utilities or library with linker scripts
Currently the install target installs the library, utilities and the manual pages. In the situation where the user has downloaded libhugetlbfs for the utilities, it is relatively difficult to build utilities that use the main system paths, but do not override the distribution-supported version of libhugetlbfs. This patch allows a user to do something like $ make PREFIX=/usr $ make install-bin $ make install-man and get the utilities and manual pages using the distribution-supported library. The install target still installs everything and should be functionally equivilant. The only difference is a clarification in output that INSTALL32 is really INSTALL-LIB32 Signed-off-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 21 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 438d046..2d5a120 100644
--- a/Makefile
+++ b/Makefile
@@ -296,12 +296,12 @@ ifeq (,$(findstring <$(MAKECMDGOALS)>,$(NODEPTARGETS)))
endif
obj32/install:
- @$(VECHO) INSTALL32 $(LIBDIR32)
+ @$(VECHO) INSTALL-LIB32 $(LIBDIR32)
$(INSTALL) -d $(DESTDIR)$(LIBDIR32)
$(INSTALL) $(INSTALL_OBJ_LIBS:%=obj32/%) $(DESTDIR)$(LIBDIR32)
obj64/install:
- @$(VECHO) INSTALL64 $(LIBDIR64)
+ @$(VECHO) INSTALL-LIB64 $(LIBDIR64)
$(INSTALL) -d $(DESTDIR)$(LIBDIR64)
$(INSTALL) $(INSTALL_OBJ_LIBS:%=obj64/%) $(DESTDIR)$(LIBDIR64)
@@ -309,24 +309,22 @@ objscript.%: %
@$(VECHO) OBJSCRIPT $*
sed "s!### SET DEFAULT LDSCRIPT PATH HERE ###!HUGETLB_LDSCRIPT_PATH=$(LDSCRIPTDIR)!" < $< > $@
-install: libs tools $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%)
- @$(VECHO) INSTALL
- $(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR)
+install-libs: libs $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%)
$(INSTALL) -d $(DESTDIR)$(HEADERDIR)
- $(INSTALL) -d $(DESTDIR)$(MANDIR1)
- $(INSTALL) -d $(DESTDIR)$(MANDIR3)
- $(INSTALL) -d $(DESTDIR)$(MANDIR7)
- $(INSTALL) -d $(DESTDIR)$(MANDIR8)
+ $(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR)
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
$(INSTALL) -m 644 -t $(DESTDIR)$(HEADERDIR) $(INSTALL_HEADERS)
$(INSTALL) -m 644 $(INSTALL_LDSCRIPTS:%=ldscripts/%) $(DESTDIR)$(LDSCRIPTDIR)
- $(INSTALL) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -d $(DESTDIR)$(EXEDIR)
- @$(VECHO) INSTALLBIN $(DESTDIR)$(EXEDIR)
- for x in $(INSTALL_BIN); do \
- $(INSTALL) -m 755 $(BIN_OBJ_DIR)/$$x $(DESTDIR)$(EXEDIR); done
for x in $(INSTALL_OBJSCRIPT); do \
$(INSTALL) -m 755 objscript.$$x $(DESTDIR)$(BINDIR)/$$x; done
- @$(VECHO) INSTALLMAN $(DESTDIR)manX
+ cd $(DESTDIR)$(BINDIR) && ln -sf ld.hugetlbfs ld
+
+install-man:
+ @$(VECHO) INSTALL_MAN $(DESTDIR)manX
+ $(INSTALL) -d $(DESTDIR)$(MANDIR1)
+ $(INSTALL) -d $(DESTDIR)$(MANDIR3)
+ $(INSTALL) -d $(DESTDIR)$(MANDIR7)
+ $(INSTALL) -d $(DESTDIR)$(MANDIR8)
for x in $(INSTALL_MAN1); do \
$(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR1); \
gzip -f $(DESTDIR)$(MANDIR1)/$$x; \
@@ -345,7 +343,14 @@ install: libs tools $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%)
$(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR8); \
gzip -f $(DESTDIR)$(MANDIR8)/$$x; \
done
- cd $(DESTDIR)$(BINDIR) && ln -sf ld.hugetlbfs ld
+
+install-bin:
+ @$(VECHO) INSTALL_BIN $(DESTDIR)$(EXEDIR)
+ $(INSTALL) -d $(DESTDIR)$(EXEDIR)
+ for x in $(INSTALL_BIN); do \
+ $(INSTALL) -m 755 $(BIN_OBJ_DIR)/$$x $(DESTDIR)$(EXEDIR); done
+
+install: install-libs install-bin install-man
install-docs:
$(INSTALL) -d $(DESTDIR)$(DOCDIR)