summaryrefslogtreecommitdiffstats
path: root/tools/build
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-17 15:49:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-17 15:49:12 +0000
commitf95d2b53f24320c1490b468d809f933c4023939c (patch)
tree901e80a357b3cf6a17f44334624835315411016c /tools/build
parentAdded scitab directory. (diff)
downloadrtems-f95d2b53f24320c1490b468d809f933c4023939c.tar.bz2
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. Comments:
* Added support for bsd "install" ($(BSDINSTALL)) to host.cfg.in, i.e. the standard "install" program that most packages (including automake) use. In Makefiles outside of rtems, "install" normally is referenced by $(INSTALL), but rtems already uses $(INSTALL) for install-if-change, hence I used $(BSDINSTALL) instead to keep up backward compatibility. * Removed references to @GREP@ etc. from host.cfg.in, as configure.in doesn't check for them (Minor cleanup). * Added installation flags INST*FLAGS to host.cfg.in, which should replace -m XXXX flags for installation calls. *Changes to gcc.cfg to enable it to build host programs from multiple sources files. Should not disturb existing sources, but neccessary. * There was a not-so-minor bug in the configuration files: "make install" and "make debug_install" don't work in all subdirectories!! I tried to fix this by adding "install" to MTARGETS in main.cfg, which seems to solve most of the problems. But there still seem to be rare (?) cases where "make debug_install" still seems to have problems. * Changes to many host related tool-Makefiles to demonstrate the abilities of INST*FLAGS, BSDINSTALL and the new rules in gcc.cfg. ..of cause ... but BSDINSTALL is THE standard method to install files in most program packages besides rtems. This part of the patch fixes some minor protection setting problems, but doesn't support TARGET_VARIANTS NOTE: I hope you will like the BSDINSTALL, INST*FLAGS stuff. It is a step to get rid of "install-if-change" and to rely on a more standard installation procedure. If you don't like BSDINSTALL, removing it from the patch isn't difficult- just grep for BSDINSTALL and replace BSDINSTALL with INSTALL or MKDIR. FINALLY: I still have another patch pending (well, not a complete patch yet, it's a partial patch to demonstrate the principle), which adds automatic rebuilding of files generated by autoconf/configure. At the moment I don't dare to submit it, because integrating this patch would require to modify all Makefile.ins because we'd need to add a new "include " line to each Makefile.in.
Diffstat (limited to 'tools/build')
-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
3 files changed, 10 insertions, 6 deletions
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)