From: bernhardheld Date: Sun, 29 Aug 2004 12:47:49 +0000 (+0000) Subject: * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean` X-Git-Url: https://git.gag.com/?p=fw%2Fsdcc;a=commitdiff_plain;h=f1c40004ae349f7cd3a1a5c5c85f62f695196370 * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean` * Makefile.common.in, * as/Makefile, * as/hc08/Makefile.in, * as/mcs51/Makefile.in, * as/z80/Makefile.in, * debugger/mcs51/Makefile.in, * device/include/Makefile.in, * device/lib/Makefile.in, * doc/Makefile, * link/Makefile, * link/z80/Makefile.in, * packihx/Makefile.in, * sim/ucsim/main_in.mk, * sim/ucsim/avr.src/Makefile.in, * sim/ucsim/doc/Makefile.in, * sim/ucsim/gui.src/serio.src/Makefile.in, * sim/ucsim/hc08.src/Makefile.in, * sim/ucsim/s51.src/Makefile.in, * sim/ucsim/xa.src/Makefile.in, * sim/ucsim/z80.src/Makefile.in, * src/Makefile.in, * support/cpp2/Makefile.in, * support/librarian/Makefile, * support/makebin/Makefile: added DESTDIR to the install path proposed by "Maciej 'Agaran' Pijanka" * doc/sdccman.lyx: added DESTDIR documentation git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3459 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/Makefile.common.in b/Makefile.common.in index 405c8bb0..ea00cf7f 100644 --- a/Makefile.common.in +++ b/Makefile.common.in @@ -30,6 +30,7 @@ man2dir = $(mandir)/man2 infodir = @infodir@ srcdir = @srcdir@ docdir = @docdir@ +DESTDIR = include_dir_suffix = @include_dir_suffix@ lib_dir_suffix = @lib_dir_suffix@ diff --git a/as/Makefile b/as/Makefile index 214880a3..80dd2f62 100644 --- a/as/Makefile +++ b/as/Makefile @@ -10,18 +10,18 @@ all: $(MAKE) -C hc08 all E=$(E) BUILDDIR=$(BUILDDIR) install: all install-doc - $(INSTALL) $(PRJDIR)/bin/as-z80$(EXEEXT) `echo $(bindir)/as-z80$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/as-z80$(EXEEXT)|sed '$(transform)'` - $(INSTALL) $(PRJDIR)/bin/as-gbz80$(EXEEXT) `echo $(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'` - $(INSTALL) $(PRJDIR)/bin/as-hc08$(EXEEXT) `echo $(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(PRJDIR)/bin/as-z80$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-z80$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/as-z80$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(PRJDIR)/bin/as-gbz80$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(PRJDIR)/bin/as-hc08$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'` install-doc: - $(INSTALL) -d $(docdir)/aslink - cp -f `find doc -maxdepth 1 -type f` $(docdir)/aslink + $(INSTALL) -d $(DESTDIR)$(docdir)/aslink + cp -f `find doc -maxdepth 1 -type f` $(DESTDIR)$(docdir)/aslink uninstall: - cd $(bindir); rm -f as-z80$(EXEEXT) as-gbz80$(EXEEXT) as-hc08$(EXEEXT) + cd $(DESTDIR)$(bindir); rm -f as-z80$(EXEEXT) as-gbz80$(EXEEXT) as-hc08$(EXEEXT) include clean.mk diff --git a/as/hc08/Makefile.in b/as/hc08/Makefile.in index 9ac6e5bb..675a6f84 100644 --- a/as/hc08/Makefile.in +++ b/as/hc08/Makefile.in @@ -63,15 +63,15 @@ $(ASLINK): $(LKOBJECTS) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) $(ASHC08) `echo $(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'` - $(INSTALL) $(ASLINK) `echo $(bindir)/link-hc08$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/link-hc08$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(ASHC08) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(ASLINK) `echo $(DESTDIR)$(bindir)/link-hc08$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/link-hc08$(EXEEXT)|sed '$(transform)'` # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/as-hc08$(EXEEXT) $(bindir)/link-hc08$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/as-hc08$(EXEEXT) $(DESTDIR)$(bindir)/link-hc08$(EXEEXT) # Performing self-test @@ -87,7 +87,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/as/mcs51/Makefile.in b/as/mcs51/Makefile.in index 54c13efd..7b0a204d 100644 --- a/as/mcs51/Makefile.in +++ b/as/mcs51/Makefile.in @@ -63,15 +63,15 @@ $(ASLINK): $(LKOBJECTS) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) $(ASX8051) `echo $(bindir)/asx8051$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/asx8051$(EXEEXT)|sed '$(transform)'` - $(INSTALL) $(ASLINK) `echo $(bindir)/aslink$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/aslink$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(ASX8051) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(ASLINK) `echo $(DESTDIR)$(bindir)/aslink$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/aslink$(EXEEXT)|sed '$(transform)'` # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/asx8051$(EXEEXT) $(bindir)/aslink$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/asx8051$(EXEEXT) $(DESTDIR)$(bindir)/aslink$(EXEEXT) # Performing self-test @@ -87,7 +87,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/as/z80/Makefile.in b/as/z80/Makefile.in index 5ae5e07d..50d70bef 100644 --- a/as/z80/Makefile.in +++ b/as/z80/Makefile.in @@ -47,12 +47,12 @@ $(ASXZ80): $(ASOBJECTS) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) $(ASXZ80) $(bindir)/as-z80 + $(INSTALL) $(ASXZ80) $(DESTDIR)$(bindir)/as-z80 # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/as-z80 + rm -f $(DESTDIR)$(bindir)/as-z80 # Performing self-test @@ -68,7 +68,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/debugger/mcs51/Makefile.in b/debugger/mcs51/Makefile.in index 9b6e13c7..9a6c9fc0 100644 --- a/debugger/mcs51/Makefile.in +++ b/debugger/mcs51/Makefile.in @@ -56,18 +56,18 @@ all: checkconf $(TARGET) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) $(TARGET) $(bindir)/sdcdb$(EXEEXT) - $(STRIP) $(bindir)/sdcdb$(EXEEXT) - cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(bindir)/sdcdb.el - cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(bindir)/sdcdbsrc.el + $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)/sdcdb$(EXEEXT) + $(STRIP) $(DESTDIR)$(bindir)/sdcdb$(EXEEXT) + cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(DESTDIR)$(bindir)/sdcdb.el + cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(DESTDIR)$(bindir)/sdcdbsrc.el # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/sdcdb$(EXEEXT) - rm -f $(bindir)/sdcdb.el - rm -f $(bindir)/sdcdbsrc.el + rm -f $(DESTDIR)$(bindir)/sdcdb$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/sdcdb.el + rm -f $(DESTDIR)$(bindir)/sdcdbsrc.el # Performing self-test # -------------------- @@ -82,7 +82,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/device/include/Makefile.in b/device/include/Makefile.in index 075a5e50..61944635 100644 --- a/device/include/Makefile.in +++ b/device/include/Makefile.in @@ -28,7 +28,7 @@ srcdir = @srcdir@ include_dir_suffix = @include_dir_suffix@ -sdcc_includedir = $(datadir)/$(include_dir_suffix) +sdcc_includedir = $(DESTDIR)$(datadir)/$(include_dir_suffix) CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR) diff --git a/device/lib/Makefile.in b/device/lib/Makefile.in index d791eedf..317863ea 100644 --- a/device/lib/Makefile.in +++ b/device/lib/Makefile.in @@ -32,7 +32,7 @@ srcdir = @srcdir@ lib_dir_suffix = @lib_dir_suffix@ -sdcc_libdir = $(datadir)/$(lib_dir_suffix) +sdcc_libdir = $(DESTDIR)$(datadir)/$(lib_dir_suffix) CPPFLAGS = -I$(INCDIR) CFLAGS = $(MODELFLAGS) --nostdinc diff --git a/device/lib/pic16/Makefile.common.in b/device/lib/pic16/Makefile.common.in index 2bd56334..c16ff30a 100644 --- a/device/lib/pic16/Makefile.common.in +++ b/device/lib/pic16/Makefile.common.in @@ -24,5 +24,6 @@ MV = @MV@ LS = @LS@ SED = @SED@ -MM = -MM -MODELFLAGS = -mpic16 \ No newline at end of file +# Quick+dirty fix: this should be defined elsewhere, +# but it's needed for `make clean`; Bernhard +MM = -MM \ No newline at end of file diff --git a/doc/Makefile b/doc/Makefile index 25f75328..93353048 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -9,19 +9,19 @@ all: $(MANUAL).pdf $(MANUAL).html/index.html $(MANUAL).txt \ $(CDB).pdf $(CDB).html/index.html $(CDB).txt install: - $(INSTALL) -d $(docdir) - cp -rf *.txt z80 avr $(docdir) - if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(docdir); fi - if [ -f $(TSS).html/index.html ]; then cp -rf $(TSS).html $(docdir); fi - if [ -f $(CDB).html/index.html ]; then cp -rf $(CDB).html $(docdir); fi - if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(docdir); fi - if [ -f $(TSS).pdf ]; then cp -rf $(TSS).pdf $(docdir); fi - if [ -f $(CDB).pdf ]; then cp -rf $(CDB).pdf $(docdir); fi - rm -rf `find $(docdir) -name CVS -type d` - rm -f $(docdir)/*/WARNINGS $(docdir)/*/*.pl $(docdir)/*/images.* + $(INSTALL) -d $(DESTDIR)$(docdir) + cp -rf *.txt z80 avr $(DESTDIR)$(docdir) + if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(DESTDIR)$(docdir); fi + if [ -f $(TSS).html/index.html ]; then cp -rf $(TSS).html $(DESTDIR)$(docdir); fi + if [ -f $(CDB).html/index.html ]; then cp -rf $(CDB).html $(DESTDIR)$(docdir); fi + if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(DESTDIR)$(docdir); fi + if [ -f $(TSS).pdf ]; then cp -rf $(TSS).pdf $(DESTDIR)$(docdir); fi + if [ -f $(CDB).pdf ]; then cp -rf $(CDB).pdf $(DESTDIR)$(docdir); fi + rm -rf `find $(DESTDIR)$(docdir) -name CVS -type d` + rm -f $(DESTDIR)$(docdir)/*/WARNINGS $(DESTDIR)$(docdir)/*/*.pl $(DESTDIR)$(docdir)/*/images.* uninstall: - rm -rf $(docdir) + rm -rf $(DESTDIR)$(docdir) $(MANUAL).html/index.html: $(MANUAL).tex $(MANUAL).ind ;#$(MANUAL).glo mkdir -p `dirname $@` diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index 582b8366..ef0a41a2 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -1957,6 +1957,21 @@ make install prefix=$(HOME)/local/sdcc \layout Standard Of course this doesn't change the search paths compiled into the binaries. +\newline + +\newline +Moreover the install path can be changed by defining DESTDIR +\begin_inset LatexCommand \index{DESTDIR} + +\end_inset + +: +\layout LyX-Code + +make install DESTDIR=$(HOME)/sdcc.rpm/ +\layout Standard + +Please note that DESTDIR must have a trailing slash! \layout Section Search Paths diff --git a/link/Makefile b/link/Makefile index 64c568d6..31979674 100644 --- a/link/Makefile +++ b/link/Makefile @@ -8,12 +8,12 @@ all: $(MAKE) -C z80 _link-z80 _link-gbz80 E=$(E) BUILDDIR=../../bin/ install: all - $(INSTALL) $(PRJDIR)/bin/link-z80$(EXEEXT) `echo $(bindir)/link-z80$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/link-z80$(EXEEXT)|sed '$(transform)'` - $(INSTALL) $(PRJDIR)/bin/link-gbz80$(EXEEXT) `echo $(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(PRJDIR)/bin/link-z80$(EXEEXT) `echo $(DESTDIR)$(bindir)/link-z80$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/link-z80$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(PRJDIR)/bin/link-gbz80$(EXEEXT) `echo $(DESTDIR)$(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'` uninstall: - cd $(bindir); rm -f link-z80$(EXEEXT) link-gbz80$(EXEEXT) + cd $(DESTDIR)$(bindir); rm -f link-z80$(EXEEXT) link-gbz80$(EXEEXT) include clean.mk diff --git a/link/z80/Makefile.in b/link/z80/Makefile.in index adc87f42..e5184186 100644 --- a/link/z80/Makefile.in +++ b/link/z80/Makefile.in @@ -54,12 +54,12 @@ $(LKZ80): $(SLIBOBJS) $(LKOBJECTS) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) $(LKZ80) $(bindir)/link-z80$(EXEEXT) + $(INSTALL) $(LKZ80) $(DESTDIR)$(bindir)/link-z80$(EXEEXT) # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/link-z80$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/link-z80$(EXEEXT) # Performing self-test @@ -75,7 +75,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/packihx/Makefile.in b/packihx/Makefile.in index f361f6e2..a0a15e24 100644 --- a/packihx/Makefile.in +++ b/packihx/Makefile.in @@ -13,13 +13,13 @@ TARGET = $(PRJDIR)/bin/packihx$(EXEEXT) all: $(TARGET) install: all installdirs - $(INSTALL) $(TARGET) `echo $(bindir)/packihx$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/packihx$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/packihx$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/packihx$(EXEEXT)|sed '$(transform)'` # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/packihx$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/packihx$(EXEEXT) # Performing self-test # -------------------- @@ -34,7 +34,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/sim/ucsim/avr.src/Makefile.in b/sim/ucsim/avr.src/Makefile.in index 55afbee0..190cf434 100644 --- a/sim/ucsim/avr.src/Makefile.in +++ b/sim/ucsim/avr.src/Makefile.in @@ -64,13 +64,13 @@ all: checkconf otherlibs avr.src # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) -s savr$(EXEEXT) $(bindir) + $(INSTALL) -s savr$(EXEEXT) $(DESTDIR)$(bindir) # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/savr + rm -f $(DESTDIR)$(bindir)/savr # Performing self-test @@ -88,7 +88,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - test -d $(bindir) || $(INSTALL) -d $(bindir) + test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/sim/ucsim/doc/Makefile.in b/sim/ucsim/doc/Makefile.in index 4a996b63..ddcbc6ee 100644 --- a/sim/ucsim/doc/Makefile.in +++ b/sim/ucsim/doc/Makefile.in @@ -35,16 +35,16 @@ doc: checkconf # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - cp *.html $(docdir) - cp *.gif $(docdir) - cp *.jpg $(docdir) - cp *.fig $(docdir) + cp *.html $(DESTDIR)$(docdir) + cp *.gif $(DESTDIR)$(docdir) + cp *.jpg $(DESTDIR)$(docdir) + cp *.fig $(DESTDIR)$(docdir) # Deleting all the installed files # -------------------------------- uninstall: - rm -rf $(docdir) + rm -rf $(DESTDIR)$(docdir) # Performing self-test @@ -62,7 +62,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - test -d $(docdir) || $(INSTALL) -d $(docdir) + test -d $(DESTDIR)$(docdir) || $(INSTALL) -d $(DESTDIR)$(docdir) # Creating dependencies diff --git a/sim/ucsim/gui.src/serio.src/Makefile.in b/sim/ucsim/gui.src/serio.src/Makefile.in index 7afa286e..adfab22f 100644 --- a/sim/ucsim/gui.src/serio.src/Makefile.in +++ b/sim/ucsim/gui.src/serio.src/Makefile.in @@ -50,13 +50,13 @@ endif # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) -s serialview$(EXEEXT) $(bindir) + $(INSTALL) -s serialview$(EXEEXT) $(DESTDIR)$(bindir) # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/serialview$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/serialview$(EXEEXT) # Performing self-test @@ -74,7 +74,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - test -d $(bindir) || $(INSTALL) -d $(bindir) + test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/sim/ucsim/hc08.src/Makefile.in b/sim/ucsim/hc08.src/Makefile.in index 8b62d78e..9ac8c15a 100644 --- a/sim/ucsim/hc08.src/Makefile.in +++ b/sim/ucsim/hc08.src/Makefile.in @@ -66,13 +66,13 @@ tests: $(TEST_OBJ) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) -s shc08$(EXEEXT) $(bindir) + $(INSTALL) -s shc08$(EXEEXT) $(DESTDIR)$(bindir) # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/shc08$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/shc08$(EXEEXT) # Performing self-test @@ -90,7 +90,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - test -d $(bindir) || $(INSTALL) -d $(bindir) + test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/sim/ucsim/main_in.mk b/sim/ucsim/main_in.mk index b101d697..3a77bac6 100644 --- a/sim/ucsim/main_in.mk +++ b/sim/ucsim/main_in.mk @@ -69,10 +69,10 @@ install: all installdirs # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/s51$(EXEEXT) - rm -f $(bindir)/savr$(EXEEXT) - rm -f $(bindir)/serialview$(EXEEXT) - rm -f $(bindir)/portmon$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/s51$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/savr$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/serialview$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/portmon$(EXEEXT) # Performing self-test diff --git a/sim/ucsim/s51.src/Makefile.in b/sim/ucsim/s51.src/Makefile.in index 50b4f374..5f4ec97f 100644 --- a/sim/ucsim/s51.src/Makefile.in +++ b/sim/ucsim/s51.src/Makefile.in @@ -68,13 +68,13 @@ all: checkconf otherlibs s51.src # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) -s s51$(EXEEXT) $(bindir) + $(INSTALL) -s s51$(EXEEXT) $(DESTDIR)$(bindir) # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/s51$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/s51$(EXEEXT) # Performing self-test @@ -94,7 +94,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - test -d $(bindir) || $(INSTALL) -d $(bindir) + test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/sim/ucsim/xa.src/Makefile.in b/sim/ucsim/xa.src/Makefile.in index 6e682f97..fda12e5b 100644 --- a/sim/ucsim/xa.src/Makefile.in +++ b/sim/ucsim/xa.src/Makefile.in @@ -57,13 +57,13 @@ tests: $(TEST_OBJ) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) -s sxa$(EXEEXT) $(bindir) + $(INSTALL) -s sxa$(EXEEXT) $(DESTDIR)$(bindir) # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/sxa$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/sxa$(EXEEXT) # Performing self-test @@ -79,7 +79,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - test -d $(bindir) || $(INSTALL) -d $(bindir) + test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/sim/ucsim/z80.src/Makefile.in b/sim/ucsim/z80.src/Makefile.in index 2dd50830..2f507799 100644 --- a/sim/ucsim/z80.src/Makefile.in +++ b/sim/ucsim/z80.src/Makefile.in @@ -72,13 +72,13 @@ tests: $(TEST_OBJ) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) -s sz80$(EXEEXT) $(bindir) + $(INSTALL) -s sz80$(EXEEXT) $(DESTDIR)$(bindir) # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/sz80$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/sz80$(EXEEXT) # Performing self-test @@ -96,7 +96,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - test -d $(bindir) || $(INSTALL) -d $(bindir) + test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/src/Makefile.in b/src/Makefile.in index ca2e1bf5..46d0e4c6 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -57,14 +57,14 @@ $(PRJDIR)/support/gc/libgc.a: # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs - $(INSTALL) $(TARGET) `echo $(bindir)/sdcc$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/sdcc$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/sdcc$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/sdcc$(EXEEXT)|sed '$(transform)'` # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/sdcc$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/sdcc$(EXEEXT) # Performing self-test # -------------------- @@ -79,7 +79,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/support/cpp2/Makefile.in b/support/cpp2/Makefile.in index 007393cc..44d747a6 100644 --- a/support/cpp2/Makefile.in +++ b/support/cpp2/Makefile.in @@ -108,12 +108,12 @@ OBSTACK=obstack.o # End of variables for you to override. install: all - mkdir -p $(bindir) - $(INSTALL) $(TARGET) `echo $(bindir)/sdcpp$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/sdcpp$(EXEEXT)|sed '$(transform)'` + mkdir -p $(DESTDIR)$(bindir) + $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/sdcpp$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/sdcpp$(EXEEXT)|sed '$(transform)'` uninstall: - rm -f $(bindir)/sdcpp$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/sdcpp$(EXEEXT) clean: -rm -f $(TARGET) *.o core libcpp.a diff --git a/support/librarian/Makefile b/support/librarian/Makefile index c1a67398..99092d17 100644 --- a/support/librarian/Makefile +++ b/support/librarian/Makefile @@ -13,13 +13,13 @@ TARGET = $(PRJDIR)/bin/sdcclib$(EXEEXT) all: $(TARGET) install: all installdirs - $(INSTALL) $(TARGET) `echo $(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'` # Deleting all the installed files # -------------------------------- uninstall: - rm -f $(bindir)/sdcclib$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/sdcclib$(EXEEXT) # Performing self-test # -------------------- @@ -34,7 +34,7 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - $(INSTALL) -d $(bindir) + $(INSTALL) -d $(DESTDIR)$(bindir) # Creating dependencies diff --git a/support/makebin/Makefile b/support/makebin/Makefile index 66e49b30..b957b8ee 100644 --- a/support/makebin/Makefile +++ b/support/makebin/Makefile @@ -11,11 +11,11 @@ $(BIN): $(OBJ) $(CC) $(LDFLAGS) -o $(BIN) $(OBJ) install: all - mkdir -p $(bindir) - $(INSTALL) $(BIN) `echo $(bindir)/makebin$(EXEEXT)|sed '$(transform)'` - $(STRIP) `echo $(bindir)/makebin$(EXEEXT)|sed '$(transform)'` + mkdir -p $(DESTDIR)$(bindir) + $(INSTALL) $(BIN) `echo $(DESTDIR)$(bindir)/makebin$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(DESTDIR)$(bindir)/makebin$(EXEEXT)|sed '$(transform)'` uninstall: - rm -f $(bindir)/makebin$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/makebin$(EXEEXT) include clean.mk