summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/build-tools/os/msdos/Makefile.in3
-rw-r--r--c/build-tools/scripts/Makefile.in3
-rw-r--r--c/build-tools/src/Makefile.in10
-rw-r--r--c/src/exec/score/tools/generic/Makefile.in5
-rw-r--r--c/src/exec/score/tools/hppa1.1/Makefile.in2
-rw-r--r--c/src/exec/score/tools/unix/Makefile.in2
-rw-r--r--c/src/make/host.cfg.in11
-rw-r--r--c/update-tools/Makefile.in8
-rw-r--r--configure.in1
-rw-r--r--make/host.cfg.in11
-rw-r--r--make/main.cfg2
-rw-r--r--tools/build/os/msdos/Makefile.in3
-rw-r--r--tools/build/scripts/Makefile.in3
-rw-r--r--tools/build/src/Makefile.in10
-rw-r--r--tools/cpu/generic/Makefile.in5
-rw-r--r--tools/cpu/unix/Makefile.in2
-rw-r--r--tools/update/Makefile.in8
17 files changed, 51 insertions, 38 deletions
diff --git a/c/build-tools/os/msdos/Makefile.in b/c/build-tools/os/msdos/Makefile.in
index 4a060f7c37..7321a3a2ea 100644
--- a/c/build-tools/os/msdos/Makefile.in
+++ b/c/build-tools/os/msdos/Makefile.in
@@ -18,10 +18,9 @@ INSTALLED=$(DESTDIR)/ifc.exe \
$(DESTDIR)/fixtimer.exe
all: $(DESTDIR) $(PGMS) install
- echo $(DESTDIR)
$(DESTDIR):
- [ -d $@ ] || $(MKDIR) $@
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
install: $(INSTALLED)
diff --git a/c/build-tools/scripts/Makefile.in b/c/build-tools/scripts/Makefile.in
index 1cecfcc2cb..2634d61562 100644
--- a/c/build-tools/scripts/Makefile.in
+++ b/c/build-tools/scripts/Makefile.in
@@ -23,10 +23,9 @@ PGMS=install-if-change rcs-clean lock-directory unlock-directory \
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
all: $(DESTDIR) $(PGMS) install
- echo $(DESTDIR)
$(DESTDIR):
- [ -d $@ ] || $(MKDIR) $@
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
install: $(INSTALLED)
diff --git a/c/build-tools/src/Makefile.in b/c/build-tools/src/Makefile.in
index d1cfe1a519..4ba4dfd4a2 100644
--- a/c/build-tools/src/Makefile.in
+++ b/c/build-tools/src/Makefile.in
@@ -32,6 +32,7 @@ H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
+# FIXME: building into $(ARCH) doesn't make sense for host programs
PGMS=$(ARCH)/cklength$(EXEEXT) $(ARCH)/eolstrip$(EXEEXT) \
$(ARCH)/packhex$(EXEEXT) $(ARCH)/unhex$(EXEEXT)
@@ -60,5 +61,10 @@ LDFLAGS +=
CLEAN_ADDITIONS += $(HOST_ARCH)
CLOBBER_ADDITIONS +=
-all: $(ARCH) $(SRCS) $(PGMS)
- $(INSTALL) -m 555 $(PGMS) ${PROJECT_RELEASE}/build-tools
+DESTDIR=${PROJECT_RELEASE}/build-tools
+
+$(DESTDIR):
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
+
+all: $(ARCH) $(DESTDIR) $(SRCS) $(PGMS)
+ $(BSDINSTALL) $(INSTBINFLAGS) $(PGMS) $(DESTDIR)
diff --git a/c/src/exec/score/tools/generic/Makefile.in b/c/src/exec/score/tools/generic/Makefile.in
index 419b20b96c..e5fdec7d7f 100644
--- a/c/src/exec/score/tools/generic/Makefile.in
+++ b/c/src/exec/score/tools/generic/Makefile.in
@@ -22,13 +22,12 @@ PGMS=size_rtems
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
all: $(DESTDIR) $(PGMS) install
- echo $(DESTDIR)
$(DESTDIR):
- [ -d $@ ] || $(MKDIR) $@
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
install: $(INSTALLED)
# Install the program
$(DESTDIR)/%: %
- $(make-script)
+ $(BSDINSTALL) $(INSTBINFLAGS) $^ $@
diff --git a/c/src/exec/score/tools/hppa1.1/Makefile.in b/c/src/exec/score/tools/hppa1.1/Makefile.in
index c5cdbb753e..4a8be52b11 100644
--- a/c/src/exec/score/tools/hppa1.1/Makefile.in
+++ b/c/src/exec/score/tools/hppa1.1/Makefile.in
@@ -50,7 +50,7 @@ CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) preinstall $(PGMS)
- $(INSTALL) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin
+ $(INSTALL) $(INSTBINFLAGS) ${PGMS} ${PROJECT_RELEASE}/bin
# Hack
# we are #including files that haven't been installed yet.
diff --git a/c/src/exec/score/tools/unix/Makefile.in b/c/src/exec/score/tools/unix/Makefile.in
index 6041f15730..f49c25c734 100644
--- a/c/src/exec/score/tools/unix/Makefile.in
+++ b/c/src/exec/score/tools/unix/Makefile.in
@@ -50,7 +50,7 @@ CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) $(PGMS)
- $(INSTALL) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin
+ $(BSDINSTALL) $(INSTBINFLAGS) ${PGMS} ${PROJECT_RELEASE}/bin
preinstall:
diff --git a/c/src/make/host.cfg.in b/c/src/make/host.cfg.in
index 8b2350e6da..a68a1b2faf 100644
--- a/c/src/make/host.cfg.in
+++ b/c/src/make/host.cfg.in
@@ -30,13 +30,10 @@ CHMOD=@CHMOD@
SED=@SED@
M4=@M4@
+BSDINSTALL=@INSTALL@
INSTALL=$(PROJECT_TOOLS)/install-if-change
INSTALL_VARIANT=$(PROJECT_TOOLS)/install-if-change -V "$(LIB_VARIANT)"
-FGREP=@FGREP@
-GREP=@GREP@
-EGREP=@EGREP@
-
# FIXME: HACK for a bug in cygwin-hosted egcs which returns a mixture
# of '\\' and '/' as path separators.
# Should be removed as soon as this bug is fixed in egcs.
@@ -70,3 +67,9 @@ define make-script
-e '1,1s?^#!SHELL?#!$(SHELL)?' < $< > $@
$(CHMOD) 0555 $@
endef
+
+INSTBINFLAGS = -m 0755
+INSTDATAFLAGS = -m 0644
+INSTLIBFLAGS = -m 0644
+INSTDIRFLAGS = -m 0755 -d
+INSTINCFLAGS = -m 0644
diff --git a/c/update-tools/Makefile.in b/c/update-tools/Makefile.in
index 025930cdd2..e558bd4b37 100644
--- a/c/update-tools/Makefile.in
+++ b/c/update-tools/Makefile.in
@@ -24,15 +24,15 @@ INSTALL_LIST= $(PGMS) $(MISC_SUPPORT)
INSTALLED=$(INSTALL_LIST:%=$(DESTDIR)/%)
all: $(DESTDIR)
- echo $(DESTDIR)
$(DESTDIR):
- [ -d $@ ] || $(MKDIR) $@
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
install: $(INSTALLED)
# Install the program
+# FIXME: This isn't correct
$(DESTDIR)/%: %
$(make-script)
- $(INSTALL) -m 555 $(PERL_PGMS) ${DESTDIR}
- $(INSTALL) -m 444 $(srcdir)/$(MISC_SUPPORT) ${DESTDIR}
+ $(BSDINSTALL) $(INSTBINFLAGS) $(PERL_PGMS) ${DESTDIR}
+ $(BSDINSTALL) $(INSTDATAFLAGS) $(MISC_SUPPORT) ${DESTDIR}
diff --git a/configure.in b/configure.in
index 1535292f29..7b4aa1de2e 100644
--- a/configure.in
+++ b/configure.in
@@ -94,6 +94,7 @@ AC_PATH_PROG(LN,ln)
AC_PROG_LN_S
AC_PATH_PROG(CHMOD,chmod)
AC_PATH_PROG(SORT,sort)
+AC_PROG_INSTALL
dnl check mkdir behaviour, try to get mkdir -p -m 0755
RTEMS_PATH_MKDIR
diff --git a/make/host.cfg.in b/make/host.cfg.in
index 8b2350e6da..a68a1b2faf 100644
--- a/make/host.cfg.in
+++ b/make/host.cfg.in
@@ -30,13 +30,10 @@ CHMOD=@CHMOD@
SED=@SED@
M4=@M4@
+BSDINSTALL=@INSTALL@
INSTALL=$(PROJECT_TOOLS)/install-if-change
INSTALL_VARIANT=$(PROJECT_TOOLS)/install-if-change -V "$(LIB_VARIANT)"
-FGREP=@FGREP@
-GREP=@GREP@
-EGREP=@EGREP@
-
# FIXME: HACK for a bug in cygwin-hosted egcs which returns a mixture
# of '\\' and '/' as path separators.
# Should be removed as soon as this bug is fixed in egcs.
@@ -70,3 +67,9 @@ define make-script
-e '1,1s?^#!SHELL?#!$(SHELL)?' < $< > $@
$(CHMOD) 0555 $@
endef
+
+INSTBINFLAGS = -m 0755
+INSTDATAFLAGS = -m 0644
+INSTLIBFLAGS = -m 0644
+INSTDIRFLAGS = -m 0755 -d
+INSTINCFLAGS = -m 0644
diff --git a/make/main.cfg b/make/main.cfg
index 7521d4ea99..f35000a989 100644
--- a/make/main.cfg
+++ b/make/main.cfg
@@ -63,7 +63,7 @@ VARIANTS=${TARGET_ARCH} ${TARGET_VARIANTS:%=${TARGET_ARCH}-%}
# List of "recursion-able" targets for directory Makefiles
#
-RECURSE_TARGETS=all clean protos get clobber depend \
+RECURSE_TARGETS=all clean protos get clobber depend install \
$(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_install)
ifeq ($(RTEMS_USE_OWN_PDIR),yes)
diff --git a/tools/build/os/msdos/Makefile.in b/tools/build/os/msdos/Makefile.in
index 4a060f7c37..7321a3a2ea 100644
--- a/tools/build/os/msdos/Makefile.in
+++ b/tools/build/os/msdos/Makefile.in
@@ -18,10 +18,9 @@ INSTALLED=$(DESTDIR)/ifc.exe \
$(DESTDIR)/fixtimer.exe
all: $(DESTDIR) $(PGMS) install
- echo $(DESTDIR)
$(DESTDIR):
- [ -d $@ ] || $(MKDIR) $@
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
install: $(INSTALLED)
diff --git a/tools/build/scripts/Makefile.in b/tools/build/scripts/Makefile.in
index 1cecfcc2cb..2634d61562 100644
--- a/tools/build/scripts/Makefile.in
+++ b/tools/build/scripts/Makefile.in
@@ -23,10 +23,9 @@ PGMS=install-if-change rcs-clean lock-directory unlock-directory \
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
all: $(DESTDIR) $(PGMS) install
- echo $(DESTDIR)
$(DESTDIR):
- [ -d $@ ] || $(MKDIR) $@
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
install: $(INSTALLED)
diff --git a/tools/build/src/Makefile.in b/tools/build/src/Makefile.in
index d1cfe1a519..4ba4dfd4a2 100644
--- a/tools/build/src/Makefile.in
+++ b/tools/build/src/Makefile.in
@@ -32,6 +32,7 @@ H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
+# FIXME: building into $(ARCH) doesn't make sense for host programs
PGMS=$(ARCH)/cklength$(EXEEXT) $(ARCH)/eolstrip$(EXEEXT) \
$(ARCH)/packhex$(EXEEXT) $(ARCH)/unhex$(EXEEXT)
@@ -60,5 +61,10 @@ LDFLAGS +=
CLEAN_ADDITIONS += $(HOST_ARCH)
CLOBBER_ADDITIONS +=
-all: $(ARCH) $(SRCS) $(PGMS)
- $(INSTALL) -m 555 $(PGMS) ${PROJECT_RELEASE}/build-tools
+DESTDIR=${PROJECT_RELEASE}/build-tools
+
+$(DESTDIR):
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
+
+all: $(ARCH) $(DESTDIR) $(SRCS) $(PGMS)
+ $(BSDINSTALL) $(INSTBINFLAGS) $(PGMS) $(DESTDIR)
diff --git a/tools/cpu/generic/Makefile.in b/tools/cpu/generic/Makefile.in
index 419b20b96c..e5fdec7d7f 100644
--- a/tools/cpu/generic/Makefile.in
+++ b/tools/cpu/generic/Makefile.in
@@ -22,13 +22,12 @@ PGMS=size_rtems
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
all: $(DESTDIR) $(PGMS) install
- echo $(DESTDIR)
$(DESTDIR):
- [ -d $@ ] || $(MKDIR) $@
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
install: $(INSTALLED)
# Install the program
$(DESTDIR)/%: %
- $(make-script)
+ $(BSDINSTALL) $(INSTBINFLAGS) $^ $@
diff --git a/tools/cpu/unix/Makefile.in b/tools/cpu/unix/Makefile.in
index 6041f15730..f49c25c734 100644
--- a/tools/cpu/unix/Makefile.in
+++ b/tools/cpu/unix/Makefile.in
@@ -50,7 +50,7 @@ CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) $(PGMS)
- $(INSTALL) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin
+ $(BSDINSTALL) $(INSTBINFLAGS) ${PGMS} ${PROJECT_RELEASE}/bin
preinstall:
diff --git a/tools/update/Makefile.in b/tools/update/Makefile.in
index 025930cdd2..e558bd4b37 100644
--- a/tools/update/Makefile.in
+++ b/tools/update/Makefile.in
@@ -24,15 +24,15 @@ INSTALL_LIST= $(PGMS) $(MISC_SUPPORT)
INSTALLED=$(INSTALL_LIST:%=$(DESTDIR)/%)
all: $(DESTDIR)
- echo $(DESTDIR)
$(DESTDIR):
- [ -d $@ ] || $(MKDIR) $@
+ $(BSDINSTALL) $(INSTDIRFLAGS) $@
install: $(INSTALLED)
# Install the program
+# FIXME: This isn't correct
$(DESTDIR)/%: %
$(make-script)
- $(INSTALL) -m 555 $(PERL_PGMS) ${DESTDIR}
- $(INSTALL) -m 444 $(srcdir)/$(MISC_SUPPORT) ${DESTDIR}
+ $(BSDINSTALL) $(INSTBINFLAGS) $(PERL_PGMS) ${DESTDIR}
+ $(BSDINSTALL) $(INSTDATAFLAGS) $(MISC_SUPPORT) ${DESTDIR}