+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:
# 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
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
# --------------------------------
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
-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
else
SERIO_PKG =
endif
-CURSES_PKGS = $(SERIO.PKG)
+CURSES_PKGS = $(SERIO_PKG)
# Common code
OBJECTS = rec.o
# ---------------------------------------------------
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
# --------------------------------
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
# 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
# Performing installation test
# ----------------------------
installcheck: installcheck_gui_api
- @for pkg in $(PKGS); do\
+ @for pkg in $(CURSES_PKGS); do\
cd $$pkg && $(MAKE) installcheck ; cd ..;\
done
# Creating installation directories
# ---------------------------------
installdirs:
- @for pkg in $(PKGS); do\
+ @for pkg in $(CURSES_PKGS); do\
cd $$pkg && $(MAKE) installdirs ; cd ..;\
done
genRightShift (iCode * ic)
{
operand *right, *left, *result;
- sym_link *retype;
+ sym_link *letype;
int size, offset;
char *l;
symbol *tlbl, *tlbl1;
/* 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;