summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-06-27 14:04:42 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-06-27 14:04:42 +0000
commitb36f39016c9241b9efb5c626a673dbc4b534c2b8 (patch)
treed2fbf61f4c27093d0ec29c35bdeacb5e776deccb
parenta95f36dfa10db160c15a216018b3f0c9a6f55aa4 (diff)
(MKINSTALLDIRS): New variable.
(install) [all versions]: Add dependency on the directory being installed into. ($(installationdirlist)): New dependency.
-rw-r--r--Makeconf17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makeconf b/Makeconf
index d0a29a15..62356d2c 100644
--- a/Makeconf
+++ b/Makeconf
@@ -67,6 +67,12 @@ top_srcdirinc=-I$(top_srcdir)
endif
CPPFLAGS += -I. $(srcdirinc) -I.. $(top_srcdirinc) -I$(top_srcdir)/include -D_GNU_SOURCE
CFLAGS += -Wall -g -O3
+
+
+# Local programs:
+MKINSTALLDIRS = $(top_srcdir)/mkinstalldirs
+
+
# Decode makemode:
@@ -123,14 +129,14 @@ endif
# Installation
ifeq ($(doinst),one)
all: $(target)
-install: $(installationdir)/$(target)
+install: $(installationdir)/$(target) $(installationdir)
$(installationdir)/$(target): $(target)
$(INSTALL_PROGRAM) $< $@
endif
ifeq ($(doinst),many)
all: $(targets)
-install: $(addprefix $(installationdir)/,$(targets))
+install: $(addprefix $(installationdir)/,$(targets)) $(installationdir)
$(addprefix $(installationdir)/,$(targets)): $(installationdir)/%: %
$(INSTALL_PROGRAM) $< $@
endif
@@ -138,7 +144,7 @@ endif
ifeq ($(makemode),library)
all: libs
libs: $(targets)
-install: $(addprefix $(libdir)/,$(targets)) $(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs))
+install: $(addprefix $(libdir)/,$(targets)) $(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs)) $(libdir) $(includedir)
# Arrange to have the headers installed locally anytime we build the library.
# Not quite perfect, but at least it does end up getting done; and once done
@@ -164,9 +170,14 @@ $(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs)): $(includedir)/$(
$(INSTALL_DATA) $< $@
endif
+
# Provide default.
install:
+# Making installation directories
+$(installationdirlist): %:
+ $(MKINSTALLDIRS) $@
+
# Building the target
ifeq ($(OBJS),)
OBJS=%.o