From: borutr Date: Sun, 4 May 2008 07:04:12 +0000 (+0000) Subject: * support/regression/Makefile.in, X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=68cf035ac940c45599b4c0e3b72856e1d14447d4;p=fw%2Fsdcc * support/regression/Makefile.in, support/regression/fwk/lib/testfwk.c, support/regression/ports/ds390/spec.mk, support/regression/ports/hc08/spec.mk, support/regression/ports/mcs51-common/spec.mk, support/regression/ports/mcs51-large/spec.mk, support/regression/ports/mcs51-medium/spec.mk, support/regression/ports/mcs51-small/spec.mk, support/regression/ports/mcs51-stack-auto/spec.mk, support/regression/ports/mcs51-xstack-auto/spec.mk, support/regression/ports/pic14/spec.mk, support/regression/ports/pic16/spec.mk, support/regression/ports/ucz80/spec.mk: added possibility to define the sdcc binary directory SDCC_BIN_PATH used to run regeression tests git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5152 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index f34c872d..4dcf432b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-05-04 Borut Razem + + * support/regression/Makefile.in, + support/regression/fwk/lib/testfwk.c, + support/regression/ports/ds390/spec.mk, + support/regression/ports/hc08/spec.mk, + support/regression/ports/mcs51-common/spec.mk, + support/regression/ports/mcs51-large/spec.mk, + support/regression/ports/mcs51-medium/spec.mk, + support/regression/ports/mcs51-small/spec.mk, + support/regression/ports/mcs51-stack-auto/spec.mk, + support/regression/ports/mcs51-xstack-auto/spec.mk, + support/regression/ports/pic14/spec.mk, + support/regression/ports/pic16/spec.mk, + support/regression/ports/ucz80/spec.mk: + added possibility to define the sdcc binary directory SDCC_BIN_PATH + used to run regeression tests + 2008-05-01 Raphael Neider * doc/sdccman.lyx, support/scripts/inc2h-pic16.pl: updated list of diff --git a/support/regression/Makefile.in b/support/regression/Makefile.in index 3c7fe53c..c3ba9764 100644 --- a/support/regression/Makefile.in +++ b/support/regression/Makefile.in @@ -151,11 +151,14 @@ PORT_RESULTS_DIR = $(RESULTS_DIR)/$(PORT) PORT_RESULTS = $(ALL_TESTS:$(TESTS_DIR)/%.c=$(PORT_RESULTS_DIR)/%.out) SDCC_EXTRA_DIR = $(top_builddir)/../sdcc-extra -INC_DIR = $(top_srcdir)/device/include # Defaults. Override in spec.mk if required. # Path to SDCC -SDCC = $(top_builddir)/bin/sdcc +ifdef SDCC_BIN_PATH + SDCC = $(SDCC_BIN_PATH)/sdcc +else + SDCC = $(top_builddir)/bin/sdcc +endif # Base flags. SDCCFLAGS += --fverbose-asm -DNO_VARARGS # Extension of object intermediate files @@ -172,7 +175,7 @@ endif make_library: $(MAKE_LIBRARY) -SDCCFLAGS += -I$(srcdir)/fwk/include -I$(srcdir)/tests -I$(INC_DIR) +SDCCFLAGS += -I$(srcdir)/fwk/include -I$(srcdir)/tests # List of intermediate files to keep. Pretty much keep everything as # disk space is free. diff --git a/support/regression/ports/ds390/spec.mk b/support/regression/ports/ds390/spec.mk index 0809f0d0..46da096a 100644 --- a/support/regression/ports/ds390/spec.mk +++ b/support/regression/ports/ds390/spec.mk @@ -1,19 +1,24 @@ -# Port specification for the ds390 port running with uCsim +# Regression test specification for the ds390 target running with uCsim ifndef DEV_NULL DEV_NULL = /dev/null endif # path to uCsim -S51A = $(top_builddir)/sim/ucsim/s51.src/s51 -S51B = $(top_builddir)/bin/s51 +ifdef SDCC_BIN_PATH + S51 = $(SDCC_BIN_PATH)/s51 +else + S51A = $(top_builddir)/sim/ucsim/s51.src/s51 + S51B = $(top_builddir)/bin/s51 -S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi) + S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi) -SDCCFLAGS +=-mds390 --nostdinc --less-pedantic -DREENTRANT=reentrant -Wl-r -I$(top_srcdir) -LINKFLAGS = --nostdlib + SDCCFLAGS += --nostdinc + LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/ds390 +endif + +SDCCFLAGS +=-mds390 --less-pedantic -DREENTRANT=reentrant -Wl-r -I$(top_srcdir) LINKFLAGS += libds390.lib libsdcc.lib liblong.lib libint.lib libfloat.lib -LIBDIR = $(top_builddir)/device/lib/build/ds390 OBJEXT = .rel EXEEXT = .ihx @@ -22,7 +27,7 @@ EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT) # Rule to link into .ihx %$(EXEEXT): %$(OBJEXT) $(EXTRAS) - $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@ + $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@ %$(OBJEXT): %.c $(SDCC) $(SDCCFLAGS) -c $< -o $@ diff --git a/support/regression/ports/hc08/spec.mk b/support/regression/ports/hc08/spec.mk index 7257b692..0db5e330 100644 --- a/support/regression/ports/hc08/spec.mk +++ b/support/regression/ports/hc08/spec.mk @@ -1,13 +1,25 @@ +# Regression test specification for the hc08 target running with uCsim +# + # path to uCsim -UCHC08A = $(top_builddir)/sim/ucsim/hc08.src/shc08 -UCHC08B = $(top_builddir)/bin/shc08 +ifdef SDCC_BIN_PATH + UCHC08 = $(SDCC_BIN_PATH)/shc08 + + AS_HC08 = $(SDCC_BIN_PATH)/as-hc08 +else + UCHC08A = $(top_builddir)/sim/ucsim/hc08.src/shc08 + UCHC08B = $(top_builddir)/bin/shc08 + + UCHC08 = $(shell if [ -f $(UCHC08A) ]; then echo $(UCHC08A); else echo $(UCHC08B); fi) + + AS_HC08 = $(top_builddir)/bin/as-hc08 -UCHC08 = $(shell if [ -f $(UCHC08A) ]; then echo $(UCHC08A); else echo $(UCHC08B); fi) + SDCCFLAGS += --nostdinc + LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/hc08 +endif -SDCCFLAGS +=-mhc08 --nostdinc --less-pedantic --out-fmt-ihx -DREENTRANT=reentrant -I$(top_srcdir) -LINKFLAGS = --nostdlib +SDCCFLAGS +=-mhc08 --less-pedantic --out-fmt-ihx -DREENTRANT=reentrant -I$(top_srcdir) LINKFLAGS += hc08.lib -LIBDIR = $(top_builddir)/device/lib/build/hc08 OBJEXT = .rel EXEEXT = .ihx @@ -18,10 +30,10 @@ EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT) #%$(EXEEXT): %$(OBJEXT) $(EXTRAS) %$(EXEEXT): %$(OBJEXT) $(EXTRAS) - $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@ + $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@ %$(OBJEXT): %.asm - $(top_builddir)/bin/as-hc08 -plosgff $< + $(AS_HC08) -plosgff $< %$(OBJEXT): %.c $(SDCC) $(SDCCFLAGS) -c $< -o $@ diff --git a/support/regression/ports/mcs51-common/spec.mk b/support/regression/ports/mcs51-common/spec.mk index c2030cd6..a2ddf22b 100644 --- a/support/regression/ports/mcs51-common/spec.mk +++ b/support/regression/ports/mcs51-common/spec.mk @@ -1,17 +1,23 @@ -# Common specification for the mcs51 ports running with uCsim +# Common regression test specification for the mcs51 targets running with uCsim ifndef DEV_NULL DEV_NULL = /dev/null endif # path to uCsim -S51A = $(top_builddir)/sim/ucsim/s51.src/s51 -S51B = $(top_builddir)/bin/s51 +ifdef SDCC_BIN_PATH + S51 = $(SDCC_BIN_PATH)/s51 +else + S51A = $(top_builddir)/sim/ucsim/s51.src/s51 + S51B = $(top_builddir)/bin/s51 -S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi) + S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi) -SDCCFLAGS +=--nostdinc --less-pedantic -DREENTRANT=reentrant -I$(INC_DIR)/mcs51 -I$(top_srcdir) -LINKFLAGS = --nostdlib + SDCCFLAGS += --nostdinc + LINKFLAGS += --nostdlib +endif + +SDCCFLAGS += --less-pedantic -DREENTRANT=reentrant -I$(INC_DIR)/mcs51 -I$(top_srcdir) LINKFLAGS += mcs51.lib libsdcc.lib liblong.lib libint.lib libfloat.lib OBJEXT = .rel @@ -22,7 +28,7 @@ FWKLIB = $(PORT_CASES_DIR)/T2_isr$(OBJEXT) # Rule to link into .ihx %$(EXEEXT): %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORT_CASES_DIR)/fwk.lib - $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@ + $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@ %$(OBJEXT): %.c $(SDCC) $(SDCCFLAGS) -c $< -o $@ diff --git a/support/regression/ports/mcs51-large/spec.mk b/support/regression/ports/mcs51-large/spec.mk index e919a49e..de4a71b3 100644 --- a/support/regression/ports/mcs51-large/spec.mk +++ b/support/regression/ports/mcs51-large/spec.mk @@ -1,4 +1,4 @@ -# Port specification for the mcs51-large port running with uCsim +# Regression test specification for the mcs51-large target running with uCsim # # model large diff --git a/support/regression/ports/mcs51-medium/spec.mk b/support/regression/ports/mcs51-medium/spec.mk index a6014ab7..ca8e875c 100644 --- a/support/regression/ports/mcs51-medium/spec.mk +++ b/support/regression/ports/mcs51-medium/spec.mk @@ -1,4 +1,4 @@ -# Port specification for the mcs51-medium port running with uCsim +# Regression test specification for the mcs51-medium target running with uCsim # # model medium diff --git a/support/regression/ports/mcs51-small/spec.mk b/support/regression/ports/mcs51-small/spec.mk index 58a0616d..f685a9af 100644 --- a/support/regression/ports/mcs51-small/spec.mk +++ b/support/regression/ports/mcs51-small/spec.mk @@ -1,4 +1,4 @@ -# Port specification for the mcs51 port running with uCsim +# Regression test specification for the mcs51 target running with uCsim # # model small diff --git a/support/regression/ports/mcs51-stack-auto/spec.mk b/support/regression/ports/mcs51-stack-auto/spec.mk index 4727dccd..12d7a412 100644 --- a/support/regression/ports/mcs51-stack-auto/spec.mk +++ b/support/regression/ports/mcs51-stack-auto/spec.mk @@ -1,4 +1,4 @@ -# Port specification for the mcs51-stack-auto port running with uCsim +# Regression test specification for the mcs51-stack-auto target running with uCsim # # model small stack-auto diff --git a/support/regression/ports/mcs51-xstack-auto/spec.mk b/support/regression/ports/mcs51-xstack-auto/spec.mk index 6537e7ee..efbea3c3 100644 --- a/support/regression/ports/mcs51-xstack-auto/spec.mk +++ b/support/regression/ports/mcs51-xstack-auto/spec.mk @@ -1,4 +1,4 @@ -# Port specification for the mcs51-xstack-auto port running with uCsim +# Regression test specification for the mcs51-xstack-auto target running with uCsim # # model small xstack-auto diff --git a/support/regression/ports/pic14/spec.mk b/support/regression/ports/pic14/spec.mk index c2cd52ba..accf671a 100644 --- a/support/regression/ports/pic14/spec.mk +++ b/support/regression/ports/pic14/spec.mk @@ -1,4 +1,4 @@ -# Port specification for the pic14 port running with gpsim +# Regression test specification for the pic14 target running with gpsim # path to gpsim ifdef GPSIM_PATH @@ -7,10 +7,13 @@ else GPSIM := gpsim endif -SDCCFLAGS += -mpic14 -pp16f877 -I$(top_srcdir)/device/include/pic --nostdinc --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir) -LINKFLAGS = --nostdlib +ifndef SDCC_BIN_PATH + SDCCFLAGS += --nostdinc + LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/pic +endif + +SDCCFLAGS += -mpic14 -pp16f877 -I$(top_srcdir)/device/include/pic --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir) LINKFLAGS += libsdcc.lib libm.lib -LIBDIR = $(top_builddir)/device/lib/build/pic OBJEXT = .o EXEEXT = .cod @@ -19,7 +22,7 @@ EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT) # Rule to link into .ihx %$(EXEEXT): %$(OBJEXT) $(EXTRAS) - -$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@ + -$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@ %$(OBJEXT): %.c -$(SDCC) $(SDCCFLAGS) -c $< -o $@ diff --git a/support/regression/ports/pic16/spec.mk b/support/regression/ports/pic16/spec.mk index 83728787..d6e2339f 100644 --- a/support/regression/ports/pic16/spec.mk +++ b/support/regression/ports/pic16/spec.mk @@ -1,4 +1,4 @@ -# Port specification for the pic16 port running with gpsim +# Regression test specification for the pic16 target running with gpsim # path to gpsim ifdef GPSIM_PATH @@ -7,10 +7,14 @@ else GPSIM := gpsim endif -SDCCFLAGS += -mpic16 -pp18f452 -I$(top_srcdir)/device/include/pic16 --nostdinc --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir) -LINKFLAGS = --nostdlib +ifndef SDCC_BIN_PATH + SDCCFLAGS += --nostdinc + LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/pic16 +endif + +SDCCFLAGS += -mpic16 -pp18f452 -I$(top_srcdir)/device/include/pic16 --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir) +SDCCFLAGS += --no-peep LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib -LIBDIR = $(top_builddir)/device/lib/build/pic16 OBJEXT = .o EXEEXT = .cod @@ -19,7 +23,7 @@ EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT) # Rule to link into .ihx %$(EXEEXT): %$(OBJEXT) $(EXTRAS) - -$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@ + -$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@ %$(OBJEXT): %.c -$(SDCC) $(SDCCFLAGS) -c $< -o $@ diff --git a/support/regression/ports/ucz80/spec.mk b/support/regression/ports/ucz80/spec.mk index a2daa053..04e1b06b 100644 --- a/support/regression/ports/ucz80/spec.mk +++ b/support/regression/ports/ucz80/spec.mk @@ -1,18 +1,26 @@ -# Port specification for the xxxx port running with uCsim +# Regression test specification for the z80 target running with uCsim # # path to uCsim -# path to uCsim -SZ80A = $(top_builddir)/sim/ucsim/z80.src/sz80 -SZ80B = $(top_builddir)/bin/sz80 +ifdef SDCC_BIN_PATH + UCZ80 = $(SDCC_BIN_PATH)/sz80 + + AS_Z80 = $(SDCC_BIN_PATH)/as-z80 +else + SZ80A = $(top_builddir)/sim/ucsim/z80.src/sz80 + SZ80B = $(top_builddir)/bin/sz80 + + UCZ80 = $(shell if [ -f $(SZ80A) ]; then echo $(SZ80A); else echo $(SZ80B); fi) + + AS_Z80 = $(top_builddir)/bin/as-z80 -UCZ80 = $(shell if [ -f $(SZ80A) ]; then echo $(SZ80A); else echo $(SZ80B); fi) + SDCCFLAGS += --nostdinc + LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/z80 +endif SDCCFLAGS +=-mz80 --less-pedantic --profile -DREENTRANT= -I$(top_srcdir) #SDCCFLAGS +=--less-pedantic -DREENTRANT=reentrant -LINKFLAGS = --nostdlib LINKFLAGS += z80.lib -LIBDIR = $(top_builddir)/device/lib/build/z80 #OBJEXT = .o EXEEXT = .ihx @@ -21,10 +29,10 @@ EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT) # Rule to link into .ihx %.ihx: %.c $(EXTRAS) - $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@ + $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@ $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm - $(top_builddir)/bin/as-z80 -plosgff $@ $< + $(AS_Z80) -plosgff $@ $< %$(OBJEXT): %.c $(SDCC) $(SDCCFLAGS) -c $< -o $@