Skip to content

Commit

Permalink
Merge pull request #6 from sodero/master
Browse files Browse the repository at this point in the history
Sync with sodero
  • Loading branch information
gareth-smyth authored Apr 9, 2020
2 parents a2b60a2 + 7789617 commit 4dca419
Show file tree
Hide file tree
Showing 114 changed files with 6,347 additions and 4,825 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
*.swp
build/_*
build/Installer
build/Installer68k
build/Installer.exe
build/Installer.tmp.*
build/massif.out.*
build/leak.tmp.*
build/err.tmp.*
build/Catalogs/
/cmake-build-debug/
.idea/
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
language:
- c

script:
- make -C build quick || (cat build/err.tmp.* build/leak.tmp.* 2> /dev/null && false)
jobs:
include:
- stage: Cppcheck
script: cd src && for f in *.c; do cppcheck $f; done
- stage: Test
script: make -C build smoke || (cat build/err.tmp.* 2> /dev/null && false)
- stage: Valgrind
script: make -C build quick || (cat build/err.tmp.* build/leak.tmp.* 2> /dev/null && false)

addons:
apt:
packages:
- valgrind
- cppcheck
24 changes: 17 additions & 7 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ DATE := $(shell date +%d.%m.%Y || echo Unknown)
APP := InstallerLG
EXE := Installer

INTERFACE := GUI
ifeq ($(INTERFACE),CLI)
OBJ := $(filter-out gui.o,$(OBJ))
else
OBJ := $(filter-out cli.o,$(OBJ))
endif

#---------------------------------------------------------------------------------#
# OS
#---------------------------------------------------------------------------------#
Expand All @@ -18,7 +25,13 @@ CDEF = -D_DEFAULT_SOURCE -D_GNU_SOURCE
else
ifeq ($(OS),Darwin)
CGEN = -g -std=c99
CWRN += -Werror -Weverything -Wno-format-nonliteral -Wno-date-time
CWRN += -Werror -Weverything -Wno-format-nonliteral -Wno-padded
else
ifeq ($(OS),Windows_NT)
CC = x86_64-w64-mingw32-gcc.exe
CWRN = -Wall -Wextra -Werror
CGEN = -g -std=c99
CDEF = -D_DEFAULT_SOURCE -D_GNU_SOURCE -D__USE_MINGW_ANSI_STDIO
else
CC ?= gcc
AMIGA = true
Expand All @@ -30,13 +43,14 @@ LDLIBS += -noixemul
endif
endif
endif
endif

ifneq ($(AMIGA),true)
DD = ..
endif

CINC += -I . -I $(VPATH)
CDEF += -D__AMIGADATE__="\"($(DATE))\""
CDEF += -D__AMIGADATE__="\"($(DATE))\"" $(CEXT)
CFLAGS += $(CINC) $(CGEN) $(CWRN) $(CDEF)
YACC = bison
LEX = flex
Expand Down Expand Up @@ -90,13 +104,9 @@ cat:
#---------------------------------------------------------------------------------#
.PHONY: test
test: $(EXE)
ifneq ($(AMIGA),true)
@chmod a+rwx _?* 2> /dev/null || true
@$(RM) -R $(EXE).tmp.* leak.* err.* massif.* _?*
@sh ../test/run.sh ./$(EXE) ../test
else
@echo "[SKIPPED] @sh ../test/run.sh ./$(EXE) ../test"
endif

.PHONY: smoke
smoke:
Expand All @@ -108,7 +118,7 @@ quick:

.PHONY: fail
fail:
@LG_QUICK=yes $(MAKE) test
@LG_FAIL=yes $(MAKE) test

.PHONY: debug
debug:
Expand Down
100 changes: 54 additions & 46 deletions build/Makefile.vbcc
Original file line number Diff line number Diff line change
@@ -1,87 +1,95 @@
#
# Makefile automatically generated by MKMK V6.55
# Tue Mar 26 16:52:45 2019
#
VBCC?=vbcc:
VPATH=../src/:../build/

INTERFACE := GUI
ifeq ($(INTERFACE),CLI)
INTERFACE_OBJ= cli.o
INTERFACE_FLAGS=
else
INTERFACE_OBJ= gui.o
INTERFACE_FLAGS= -I$(VBCC)MUI/C/include -DMUIA_Dtpic_Name=0x80423d72
endif

CC= vc +aos68k
OBJS= alloc.o symbol.o init.o resource.o util.o error.o file.o control.o \
exit.o gui.o logic.o probe.o procedure.o media.o prompt.o strcasestr.o \
exit.o $(INTERFACE_OBJ) logic.o probe.o procedure.o media.o prompt.o strcasestr.o \
strop.o wb.o args.o arithmetic.o comparison.o eval.o external.o \
information.o ../build/parser.o ../build/lexer.o
CFLAGS= -c99 -Ivbcc:PosixLib/include -I. -I../build -O -dontwarn=153 -DAMIGA -DMUIA_Dtpic_Name=0x80423d72 -DKPrintF=printf #-DLG_TEST
information.o ../build/parser.o ../build/lexer.o debug.o
CFLAGS= -c99 -I$(VBCC)PosixLib/include $(INTERFACE_FLAGS) -I. -I../build -I../src -O -dontwarn=153 -DAMIGA -DKPrintF=printf -DYYERROR_VERBOSE -DLG_TEST

Installer: $(OBJS)
$(CC) -o /$@68k $(OBJS) -Lvbcc:PosixLib/AmigaOS3 -lposix -lamiga -lauto -lmieee
$(CC) -o $@68k $(OBJS) -L$(VBCC)PosixLib/AmigaOS3 -lposix -lamiga -lauto -lmieee -g

../build/lexer.o: ../build/lexer.c
$(CC) -o /build/lexer.o -c $(CFLAGS) -DYYERROR_VERBOSE $?
parser.o: ../build/parser.c
$(CC) -o ../build/parser.o -c $(CFLAGS) -DYYERROR_VERBOSE $?

../build/parser.o: ../build/parser.c
$(CC) -o /build/parser.o -c $(CFLAGS) $?
lexer.o: ../build/lexer.c
$(CC) -o ../build/lexer.o -c $(CFLAGS) $?

alloc.o: alloc.c alloc.h error.h control.h procedure.h util.h types.h
media.o: media.c alloc.h error.h eval.h file.h gui.h media.h util.h types.h

symbol.o: symbol.c alloc.h error.h eval.h symbol.h util.h types.h
procedure.o: procedure.c alloc.h error.h eval.h procedure.h strop.h util.h \
types.h

init.o: init.c alloc.h args.h control.h exit.h gui.h information.h init.h \
media.h procedure.h symbol.h util.h version.h types.h file.h
strop.o: strop.c alloc.h error.h eval.h strop.h util.h types.h

resource.o: resource.c error.h resource.h types.h
symbol.o: symbol.c alloc.h error.h eval.h symbol.h util.h types.h

util.o: util.c alloc.h error.h eval.h util.h types.h
probe.o: probe.c alloc.h error.h eval.h file.h gui.h probe.h util.h types.h

error.o: error.c error.h gui.h util.h types.h file.h
information.o: information.c alloc.h args.h error.h eval.h gui.h \
information.h resource.h util.h types.h file.h

file.o: file.c alloc.h error.h eval.h file.h gui.h probe.h resource.h strop.h \
util.h types.h
external.o: external.c alloc.h error.h eval.h external.h file.h gui.h \
resource.h util.h types.h

control.o: control.c alloc.h control.h error.h eval.h util.h types.h
file.o: file.c alloc.h debug.h error.h eval.h file.h gui.h probe.h resource.h \
strop.h util.h types.h

exit.o: exit.c alloc.h error.h eval.h exit.h gui.h procedure.h resource.h \
util.h types.h file.h
util.o: util.c alloc.h debug.h error.h eval.h util.h types.h

gui.o: gui.c gui.h version.h resource.h file.h types.h
wb.o: wb.c alloc.h error.h eval.h file.h util.h wb.h types.h

logic.o: logic.c alloc.h logic.h error.h eval.h util.h types.h
comparison.o: comparison.c alloc.h comparison.h error.h eval.h util.h types.h

probe.o: probe.c alloc.h error.h eval.h file.h gui.h probe.h util.h types.h
resource.o: resource.c error.h resource.h types.h

procedure.o: procedure.c alloc.h error.h eval.h procedure.h strop.h util.h \
types.h
args.o: args.c args.h resource.h strop.h util.h types.h

media.o: media.c alloc.h error.h eval.h file.h gui.h media.h util.h types.h
control.o: control.c alloc.h control.h error.h eval.h util.h types.h

exit.o: exit.c alloc.h error.h eval.h exit.h gui.h procedure.h resource.h \
util.h types.h file.h

prompt.o: prompt.c alloc.h gui.h error.h eval.h prompt.h resource.h util.h \
types.h file.h

strcasestr.o: strcasestr.c
alloc.o: alloc.c alloc.h error.h control.h procedure.h util.h types.h

strop.o: strop.c alloc.h error.h eval.h strop.h util.h types.h
eval.o: eval.c alloc.h args.h error.h eval.h exit.h gui.h media.h resource.h \
util.h types.h file.h

wb.o: wb.c alloc.h error.h eval.h file.h util.h wb.h types.h
debug.o: debug.c alloc.h error.h eval.h debug.h util.h types.h

args.o: args.c args.h resource.h strop.h util.h types.h
gui.o: gui.c gui.h version.h resource.h file.h types.h

arithmetic.o: arithmetic.c alloc.h arithmetic.h error.h eval.h util.h types.h

comparison.o: comparison.c alloc.h comparison.h error.h eval.h util.h types.h
cli.o: cli.c gui.h file.h types.h

eval.o: eval.c alloc.h args.h error.h eval.h exit.h gui.h media.h resource.h \
util.h types.h file.h
error.o: error.c error.h gui.h util.h types.h file.h

external.o: external.c alloc.h error.h eval.h external.h file.h gui.h \
resource.h util.h types.h
logic.o: logic.c alloc.h logic.h error.h eval.h util.h types.h

information.o: information.c alloc.h args.h error.h eval.h gui.h \
information.h resource.h util.h types.h file.h
strcasestr.o: strcasestr.c


# 1164 test(s) failed
# 1498 test(s) passed
# 78 test(s) failed
# 2962 test(s) passed
test:
cp ../Installer68k T:
cp Installer68k T:
sh ../test/run.sh T:Installer68k ../test $(REXTRA)

clean:
-delete $(OBJS) /build/parser.o /build/lexer.o
delete FORCE err.tmp.* _st_* _??_ Installer.tmp.*
$(RM) $(OBJS) ../build/parser.o ../build/lexer.o
$(RM) err.tmp.* _st_* _??_ Installer.tmp.*
6 changes: 6 additions & 0 deletions build/README
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ to execute the tests on other systems with a POSIX shell (e.g MacOS) but then no
checks for memory leaks / illegal reads / writes or leaking file handles will be
done. By running 'make test', all tests will be executed. This is currently not
possible on AROS or MorphOS.

To build an interactive cli-based version of the installer the variable INTERFACE
can be set to CLI. E.g.

make INTERFACE=CLI
make -f Makefile.vbcc INTERFACE=CLI
Loading

0 comments on commit 4dca419

Please sign in to comment.