* sdcc.spec: updated
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 5 Jan 2004 20:18:18 +0000 (20:18 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 5 Jan 2004 20:18:18 +0000 (20:18 +0000)
* device/include/Makefile.in: don't install CVS directories
* device/lib/Makefile.in: added removal of CVS directories after install
* doc/Makefile: fixed install, added local_icons
* sim/ucsim/gui.src/Makefile.in: fixed an old typo
* src/mcs51/gen.c (genRightShift): fixed bug #870788

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

ChangeLog
device/include/Makefile.in
device/lib/Makefile.in
doc/Makefile
sdcc.spec
sim/ucsim/gui.src/Makefile.in
src/mcs51/gen.c

index 3636cc4b601cab111e4c5b8de75be4e7f83ba04b..213ac05185aaddcb2352f099386562cee184c9fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-01-06 Bernhard Held <bernhard@bernhardheld.de>
+
+       * sdcc.spec: updated
+       * device/include/Makefile.in: don't install CVS directories
+       * device/lib/Makefile.in: added removal of CVS directories after install
+       * doc/Makefile: fixed install, added local_icons
+       * sim/ucsim/gui.src/Makefile.in: fixed an old typo
+       * src/mcs51/gen.c (genRightShift): fixed bug #870788
+
 2004-01-06 Vangelis Rokas <vrokas@otenet.gr>
 
        PIC16 port related changes:
index f4c30613a808d602101cdb15020f981957cb3189..bdae4465dcee7c8aceb23971d1c0ac62058147d7 100644 (file)
@@ -40,7 +40,7 @@ all:
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(CP) -r asm *.h $(sdcc_includedir)
+       $(CP) asm/*/features.h *.h $(sdcc_includedir)
 
 
 # Deleting all the installed files
index ee98a9e4311c27783e108d511e570450a494a2fe..15b25800543b4f81f46c935545b77adbf0ef2937 100644 (file)
@@ -222,7 +222,7 @@ clean_intermediate:
 install: all installdirs
        cp -r $(BUILDDIR)/* $(sdcc_libdir)
        cp -r ds390 ds400 gbz80 z80 hc08 *.c $(sdcc_libdir)/src
-       rm `find $(sdcc_libdir)/src -name '*.rel' -or -name '*.dump*' -or -name '*.sym' -or -name '*.o' -or -name '*.lst' -or -name '*.asm'`
+       rm -r `find $(sdcc_libdir)/src -name '*.rel' -or -name '*.dump*' -or -name '*.sym' -or -name '*.o' -or -name '*.lst' -or -name '*.asm' -or -name 'CVS'`
 
 # Deleting all the installed files
 # --------------------------------
index 31ad2d050fbc124dbf31dcfe9c86f6c55070378a..b027009665612aa4857abd1b1bad0101f8aae9db 100644 (file)
@@ -4,49 +4,53 @@ MANUAL = sdccman
 TSS = test_suite_spec
 CDB = cdbfileformat
 
-all: $(MANUAL).pdf $(MANUAL).html $(MANUAL).txt \
-       $(TSS).pdf $(TSS).html $(TSS).txt \
-       $(CDB).pdf $(CDB).html $(CDB).txt
+all: $(MANUAL).pdf $(MANUAL).html/index.html $(MANUAL).txt \
+       $(TSS).pdf $(TSS).html/index.html $(TSS).txt \
+       $(CDB).pdf $(CDB).html/index.html $(CDB).txt
 
 install:
        $(INSTALL) -d $(docdir)
        cp -rf *.txt z80 avr $(docdir)
-       $(shell if [ -f $(MANUAL).html ]; then cp -rf $(MANUAL).html $(docdir); fi)
-       $(shell if [ -f $(TSS).html    ]; then cp -rf $(TSS).html    $(docdir); fi)
-       $(shell if [ -f $(CDB).html    ]; then cp -rf $(CDB).html    $(docdir); fi)
-       $(shell if [ -f *.pdf          ]; then cp -rf *.pdf          $(docdir); fi)
+       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
+       find $(docdir) -name "CVS" -type d | xargs rm -r
+       rm -f $(docdir)/*/WARNINGS $(docdir)/*/*.pl $(docdir)/*/images.*
 
 uninstall:
        rm -rf $(docdir)
 
-$(MANUAL).html: $(MANUAL).tex $(MANUAL).ind ;#$(MANUAL).glo
-       mkdir -p $@
+$(MANUAL).html/index.html: $(MANUAL).tex $(MANUAL).ind ;#$(MANUAL).glo
+       mkdir -p `dirname $@`
        # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
        # fixes latex2html problems with \tabularnewline
        mv $< `basename $< .tex`.orig.tex
        sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
        sed 's,\\tabularnewline$$,\\\\,g' > $<
-       -latex2html -split 5 -show_section_numbers -dir $(MANUAL).html $(MANUAL)
+       -latex2html -split 5 -show_section_numbers -local_icons -dir $(MANUAL).html $(MANUAL)
        mv `basename $< .tex`.orig.tex $<
 
-$(TSS).html: $(TSS).tex
-       mkdir -p $@
+$(TSS).html/index.html: $(TSS).tex
+       mkdir -p `dirname $@`
        # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
        # fixes latex2html problems with \tabularnewline
        mv $< `basename $< .tex`.orig.tex
        sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
        sed 's,\\tabularnewline$$,\\\\,g' > $<
-       -latex2html -split 0 -dir $(TSS).html $(TSS)
+       -latex2html -split 0 -local_icons -dir $(TSS).html $(TSS)
        mv `basename $< .tex`.orig.tex $<
 
-$(CDB).html: $(CDB).tex
-       mkdir -p $@
+$(CDB).html/index.html: $(CDB).tex
+       mkdir -p `dirname $@`
        # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
        # fixes latex2html problems with \tabularnewline
        mv $< `basename $< .tex`.orig.tex
        sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
        sed 's,\\tabularnewline$$,\\\\,g' > $<
-       -latex2html -split 0 -show_section_numbers -dir $(CDB).html $(CDB)
+       -latex2html -split 0 -show_section_numbers -local_icons -dir $(CDB).html $(CDB)
        mv `basename $< .tex`.orig.tex $<
 
 %.txt: %.lyx
index b38b65aaba931fbf1fb01e8064c219fd48b21149..b7ad9122eedba3f5f65c2bf9413d2fda129edf54 100644 (file)
--- a/sdcc.spec
+++ b/sdcc.spec
@@ -1,62 +1,52 @@
-Summary: Small Device C Compiler
-Name: sdcc
-Version: 2.3.0
-Release: 2
-Copyright: GPL
-Group: Applications/Engineering
-Source: sdcc-2.3.0.tar.gz
-URL: http://sdcc.sourceforge.net/
-Packager: Stephen Williams <steve@icarus.com>
-
-BuildRoot: /tmp/sdcc
+#
+# spec file for package sdcc
+#
+
+Name:          sdcc
+Requires:      /bin/sh
+License:       GPL, LGPL
+Group:         Applications/Engineering
+Provides:      sdcc
+Summary:       Small Device C Compiler
+Version:       2.3.7
+Release:       4
+Source:        %{name}-%{version}.tar.bz2
+URL:           http://sdcc.sourceforge.net/
+Packager:      Bernhard Held <bernhard@bernhardheld.de>
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
 
 %description
-SDC is a C compiler for 8051 class and similar microcontrollers.
+SDCC is a C compiler for 8051 class and similar microcontrollers.
 The packge includes the compiler, assemblers and linkers, a device
 simulator and a core library. The processors supported (to a varying
-degree) include the 8051, avr, ds390, PIC, and z80.
+degree) include the 8051, ds390, z80, hc08, and PIC.
 
 %prep
 %setup -n sdcc
 
 %build
-./configure --prefix=/usr
-make all
+./configure CFLAGS="$RPM_OPT_FLAGS" --prefix=/usr docdir=$RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
+make
+cd doc
+make
+cd ..
 
 %install
-make prefix=$RPM_BUILD_ROOT/usr  install
-mv $RPM_BUILD_ROOT/usr/doc/ucsim $RPM_BUILD_ROOT/usr/share/doc
-
-# These files need not be distributed.
-rm -rf $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/ds390/CVS
-rm -rf $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/gbz80/CVS
-rm -rf $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/z80/CVS
-
-# These files freak out find-requires if left executable.
-chmod -x $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/ds390/Makefile
-chmod -x $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/gbz80/Makefile
-chmod -x $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/z80/Makefile
+rm -rf $RPM_BUILD_ROOT/usr
+make prefix=$RPM_BUILD_ROOT/usr install
+cd doc
+make install
+cd ..
 
 %files
-
-%attr(-,root,root) /usr/bin/as-gbz80
-%attr(-,root,root) /usr/bin/aslink
-%attr(-,root,root) /usr/bin/asx8051
-%attr(-,root,root) /usr/bin/as-z80
-%attr(-,root,root) /usr/bin/link-gbz80
-%attr(-,root,root) /usr/bin/link-z80
-%attr(-,root,root) /usr/bin/packihx
-%attr(-,root,root) /usr/bin/s51
-%attr(-,root,root) /usr/bin/savr
-%attr(-,root,root) /usr/bin/sdcc
-%attr(-,root,root) /usr/bin/sdcdb
-%attr(-,root,root) /usr/bin/sdcpp
-%attr(-,root,root) /usr/bin/sdcppold
-%attr(-,root,root) /usr/bin/serialview
-%attr(-,root,root) /usr/bin/sz80
-
-%attr(-,root,root) /usr/share/sdcc
-
-
-%attr(-,root,root) %doc /usr/share/doc/sdcc
-%attr(-,root,root) %doc /usr/share/doc/ucsim
+%defattr(-,root,root)
+/usr/bin
+/usr/share/sdcc/include
+/usr/share/sdcc/lib
+%doc %{_defaultdocdir}
+
+%changelog
+* Sun Jan 04 2004 - bernhard@bernhardheld.de
+- updated
+* Sat Apr 27 2002 - steve@icarus.com
+- first version from Stephen Williams
index 1364969cf22067dd3bfb0ae8a28e77619624b7cb..b1a0077134effe528c1a329bde69bf18ddb9d615 100644 (file)
@@ -43,7 +43,7 @@ SERIO_PKG     = serio.src
 else
 SERIO_PKG      =
 endif
-CURSES_PKGS    = $(SERIO.PKG)
+CURSES_PKGS    = $(SERIO_PKG)
 
 # Common code
 OBJECTS                = rec.o
@@ -81,7 +81,7 @@ gui_api: ucsim_lib tool_lib
 # ---------------------------------------------------
 install: install_gui_api
 ifeq ($(curses_ok),yes)
-       @for pkg in $(PKGS); do\
+       @for pkg in $(CURSES_PKGS); do\
          cd $$pkg && $(MAKE) install ; cd ..;\
        done
 endif
@@ -93,7 +93,7 @@ install_gui_api:
 # --------------------------------
 uninstall: uninstall_gui_api
 ifeq ($(curses_ok),yes)
-       @for pkg in $(PKGS); do\
+       @for pkg in $(CURSES_PKGS); do\
          cd $$pkg && $(MAKE) uninstall ; cd ..;\
        done
 endif
@@ -104,14 +104,14 @@ uninstall_gui_api:
 # Performing self-test
 # --------------------
 check: check_local
-       @for pkg in $(PKGS); do\
+       @for pkg in $(CURSES_PKGS); do\
          cd $$pkg && $(MAKE) check ; cd ..;\
        done
 
 check_local:
 
 test: test_local
-       @for pkg in $(PKGS); do\
+       @for pkg in $(CURSES_PKGS); do\
          cd $$pkg && $(MAKE) test ; cd ..;\
        done
 
@@ -121,7 +121,7 @@ test_local:
 # Performing installation test
 # ----------------------------
 installcheck: installcheck_gui_api
-       @for pkg in $(PKGS); do\
+       @for pkg in $(CURSES_PKGS); do\
          cd $$pkg && $(MAKE) installcheck ; cd ..;\
        done
 
@@ -131,7 +131,7 @@ installcheck_gui_api:
 # Creating installation directories
 # ---------------------------------
 installdirs:
-       @for pkg in $(PKGS); do\
+       @for pkg in $(CURSES_PKGS); do\
          cd $$pkg && $(MAKE) installdirs ; cd ..;\
        done
 
index 61732fcac962ba60630025fdba314b124b4383f3..649c643e5ea6f50e6b464777b546b4369137ce52 100644 (file)
@@ -7198,7 +7198,7 @@ static void
 genRightShift (iCode * ic)
 {
   operand *right, *left, *result;
-  sym_link *retype;
+  sym_link *letype;
   int size, offset;
   char *l;
   symbol *tlbl, *tlbl1;
@@ -7207,9 +7207,9 @@ genRightShift (iCode * ic)
 
   /* if signed then we do it the hard way preserve the
      sign bit moving it inwards */
-  retype = getSpec (operandType (IC_RESULT (ic)));
+  letype = getSpec (operandType (IC_LEFT (ic)));
 
-  if (!SPEC_USIGN (retype))
+  if (!SPEC_USIGN (letype))
     {
       genSignedRightShift (ic);
       return;