* device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 29 Aug 2004 12:47:49 +0000 (12:47 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 29 Aug 2004 12:47:49 +0000 (12:47 +0000)
* 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" <agaran AT pld-linux.org>
* doc/sdccman.lyx: added DESTDIR documentation

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3459 4a8a32a2-be11-0410-ad9d-d568d2c75423

26 files changed:
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
device/lib/pic16/Makefile.common.in
doc/Makefile
doc/sdccman.lyx
link/Makefile
link/z80/Makefile.in
packihx/Makefile.in
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/main_in.mk
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

index 405c8bb026ae9fdd6e5cf9003545a9a00e361bdf..ea00cf7f6312f1019dd8d281ee9cea4e238b4f83 100644 (file)
@@ -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@
index 214880a36428fd7e1e9c9f57de7b61e7c703a530..80dd2f62aec51f4160664e2c57bea0dd7ffa6ed1 100644 (file)
@@ -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
index 9ac6e5bb154a371a36167a9cbedb60c46fc7362b..675a6f84a8c7a9234f5437dd49fec14488e3aff0 100644 (file)
@@ -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
index 54c13efd54a8b8b533e62e4b13a04e0eaf8051ea..7b0a204d4c63223da99d36259390a0e29cc94992 100644 (file)
@@ -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
index 5ae5e07d510f1a92a0fb3926179c5f1ecc658c02..50d70befbe5c11eed04a89d7f09ad236e68c2f79 100644 (file)
@@ -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
index 9b6e13c77d2503986ff1a1d4dd4a27d6344af000..9a6c9fc031b3967699632c9c94cac720469a1973 100644 (file)
@@ -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
index 075a5e50566ebf859d0b0520ade59bfafc876b51..61944635febaad6d65073a24fd1e2604e918b8f0 100644 (file)
@@ -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)
 
index d791eedf8cecb6d81f17316940d54f6bfcc8388b..317863ea45f75c09f37edd208d1d6ca2d6bde1a3 100644 (file)
@@ -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
index 2bd5633427017e8d056d42174395f1c293b5558e..c16ff30aabe627db91a99bfb522f4b9dced201ce 100644 (file)
@@ -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
index 25f75328bf2295837a514c4bb3c39d7c3d5d42e9..93353048bcee3dfdf3bd6178061abb77c9de43c7 100644 (file)
@@ -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 $@`
index 582b8366792cb3fa72445d7b6ce3c34f1e7b0703..ef0a41a26f0fe767ef4dbcaaf1f0abb8e45ccfe9 100644 (file)
@@ -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
index 64c568d6d0df4d242a45f4f957af4f1f0cc13e06..31979674f03b08c9e26ec0594d130b00f374f323 100644 (file)
@@ -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
index adc87f421e2becc5c6852ac646365736d4076c30..e51841862da8bd04ebdbcd4aa9a4166ecc8585df 100644 (file)
@@ -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
index f361f6e2c998a63c7e2094de2760aff86c8f6051..a0a15e24781837bce81c3c9b79b685dd3e869b2f 100644 (file)
@@ -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
index 55afbee06b321a894f2f36cf48fbc9d60a658f0c..190cf434b12b1d8f752af21afb50e0aa3106428b 100644 (file)
@@ -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
index 4a996b635e98413123b35e3db8c962d9898a2f05..ddcbc6ee30667475269784c5376bf78a26316522 100644 (file)
@@ -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
index 7afa286e4b1640a2fc770b6ef5db5194117d085c..adfab22fb3eeea8767b7d3c8f7ae755177ef6d24 100644 (file)
@@ -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
index 8b62d78e353a7a86c7fa9b7945cda7fb63567891..9ac8c15af39b034ca11c27c1fefc9fa5656174a7 100644 (file)
@@ -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
index b101d697e9b4b03d476fc73125da62abf8403dc1..3a77bac642c240f6f3ade5f5e4faa5f86fea765f 100644 (file)
@@ -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
index 50b4f37473f6d82622324cb40253d8b2942c7cbd..5f4ec97fac6f62dbb0f3acafdf3b3e77755dda1a 100644 (file)
@@ -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
index 6e682f97c07c52a08ecd66a156a04dfd744bf3b3..fda12e5b9f1c5cf13c0c0c69da27741a0dbca1c7 100644 (file)
@@ -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
index 2dd508308fb657b7fab58dc233f16607a0d19a55..2f5077994cab30d071146aa820829ef304606318 100644 (file)
@@ -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
index ca2e1bf5322c1b5897f0299bf807de6ae822f2ec..46d0e4c6cd78f92b9582265a15a9c9031417eb96 100644 (file)
@@ -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
index 007393cc1854a6fed963dce18014f29d067f6dfd..44d747a6f1caff05fba08ce001034d2172d58443 100644 (file)
@@ -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
 
index c1a6739828b91e321ece49ff8f88f036359a9f52..99092d17c58ce2da81afa68e844977e8ef77cd40 100644 (file)
@@ -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
index 66e49b30858715328d7494214e6b6a4cb4e5bde7..b957b8eeffbea1eb7b233a97c9eba3932316eacd 100644 (file)
@@ -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