[PATCH] Add support for DESTDIR to the simulator core

Martin Koegler
2005-05-10T20:49:29Z

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

I noticed, that sim is missing the support for DESTDIR in its Makefiles,
which is supported by all automake based programs.

The patch added support for this feature. Is it possible to apply it to the
CVS?

mfg Martin KÃ¶gler
PS: Please CC me on replies.

[-- Attachment #2: sim.korr.patch --]
[-- Type: text/plain, Size: 1531 bytes --]

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/sim/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- Makefile.in 29 Jan 2005 00:53:13 -0000 1.6
+++ Makefile.in 10 May 2005 20:37:38 -0000
@@ -83,6 +83,7 @@
RUNTESTFLAGS=

FLAGS_TO_PASS = \
+ "DESTDIR=$(DESTDIR)" \
"prefix=$(prefix)" \
"exec_prefix=$(exec_prefix)" \
"bindir=$(bindir)" \
Index: common/Make-common.in
===================================================================
RCS file: /cvs/src/src/sim/common/Make-common.in,v
retrieving revision 1.21
diff -u -r1.21 Make-common.in
--- common/Make-common.in 27 Apr 2005 20:38:08 -0000 1.21
+++ common/Make-common.in 10 May 2005 20:37:38 -0000
@@ -616,14 +616,14 @@

install-common: installdirs
n=`echo run | sed '$(program_transform_name)'`; \
- $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
+ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \
- $(INSTALL_DATA) libsim.a $(libdir)/$$n ; \
- ( cd $(libdir) ; $(RANLIB) $$n )
+ $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \
+ ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n )

installdirs:
- $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
- $(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)

check:
cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"