From 67da89445478477cbda97171c16f8cc2666ce240 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Mon, 5 Jan 2004 20:18:18 +0000 Subject: [PATCH] * 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 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3081 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 9 ++++ device/include/Makefile.in | 2 +- device/lib/Makefile.in | 2 +- doc/Makefile | 36 +++++++------- sdcc.spec | 88 ++++++++++++++++------------------- sim/ucsim/gui.src/Makefile.in | 14 +++--- src/mcs51/gen.c | 6 +-- 7 files changed, 80 insertions(+), 77 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3636cc4b..213ac051 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-01-06 Bernhard Held + + * 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 PIC16 port related changes: diff --git a/device/include/Makefile.in b/device/include/Makefile.in index f4c30613..bdae4465 100644 --- a/device/include/Makefile.in +++ b/device/include/Makefile.in @@ -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 diff --git a/device/lib/Makefile.in b/device/lib/Makefile.in index ee98a9e4..15b25800 100644 --- a/device/lib/Makefile.in +++ b/device/lib/Makefile.in @@ -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 # -------------------------------- diff --git a/doc/Makefile b/doc/Makefile index 31ad2d05..b0270096 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 diff --git a/sdcc.spec b/sdcc.spec index b38b65aa..b7ad9122 100644 --- 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 - -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 +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 diff --git a/sim/ucsim/gui.src/Makefile.in b/sim/ucsim/gui.src/Makefile.in index 1364969c..b1a00771 100644 --- a/sim/ucsim/gui.src/Makefile.in +++ b/sim/ucsim/gui.src/Makefile.in @@ -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 diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 61732fca..649c643e 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -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; -- 2.30.2