analyzer/tests/Make.proto
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sun, 05 Oct 2014 00:05:20 +0100
changeset 380 8fe3cb4e607f
parent 265 9b775d27d37e
child 420 b2f2f15cef26
permissions -rw-r--r--
Remove Pharoisms to make code more portable and running on Smalltalk/X * Use ANSI `(Character codePoint: 13)` (`10`) instead of `Character cr` (`lf`), This is more portable and does not depend on dialects interpretation of `#cr` - Smalltalk/X convert it according to platform line end convention (UNIX/Windows/Mac) * Do not assume exact value of a printstring in tests, i.e., instead of `msg includesSubstring: '$a' code `msg includesSubstring: $a printString. This way, the test is independent on the printString value, which may differ among dialects. Q: Is printString value of String and/or Character defined in ANSI? * In assestions, instead of `#equals:` use plain old `#=`, which is more portable. * Removed Character>>- used to create range parser. Use portable `(Interval from: $a to: $z) asParser` instead of just `$a - $z`. Do not use ($a to: $z) asParser as in Pharo, Character>>to: does not create an Interval but an Array (sigh).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
380
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
     1
# $Header$
265
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
#
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
# DO NOT EDIT
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
# automagically generated from the projectDefinition: stx_goodies_petitparser_analyzer_tests.
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
#
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
# Warning: once you modify this file, do not rerun
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
#
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
# The Makefile as generated by this Make.proto supports the following targets:
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
#    make         - compile all st-files to a classLib
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
#    make clean   - clean all temp files
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
#    make clobber - clean all
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
#
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
# This file contains definitions for Unix based platforms.
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
# It shares common definitions with the win32-make in Make.spec.
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
#
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
# position (of this package) in directory hierarchy:
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
# (must point to ST/X top directory, for tools and includes)
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
TOP=../../../..
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
INCLUDE_TOP=$(TOP)/..
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
# subdirectories where targets are to be made:
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
SUBDIRS=
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
# subdirectories where Makefiles are to be made:
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
# (only define if different from SUBDIRS)
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
# ALLSUBDIRS=
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
REQUIRED_SUPPORT_DIRS=
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
# if your embedded C code requires any system includes,
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
# add the path(es) here:,
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
# ********** OPTIONAL: MODIFY the next lines ***
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
# LOCALINCLUDES=-Ifoo -Ibar
380
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    37
LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/goodies/petitparser/analyzer -I$(INCLUDE_TOP)/stx/goodies/petitparser/tests -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic
265
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
# if you need any additional defines for embedded C code,
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
# add them here:,
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
# ********** OPTIONAL: MODIFY the next lines ***
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
LOCALDEFINES=
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
LIBNAME=libstx_goodies_petitparser_analyzer_tests
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
# ********** OPTIONAL: MODIFY the next line ***
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
# additional C-libraries that should be pre-linked with the class-objects
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
LD_OBJ_LIBS=
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
LOCAL_SHARED_LIBS=
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
# ********** OPTIONAL: MODIFY the next line ***
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
# additional C targets or libraries should be added below
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
LOCAL_EXTRA_TARGETS=
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
all:: preMake classLibRule postMake
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
pre_objs::  
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
380
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    73
# Enforce recompilation of package definition class if Mercurial working
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    74
# copy state changes. Together with --guessVersion it ensures that package
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    75
# definition class always contains correct binary revision string.
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    76
ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    77
stx_goodies_petitparser_analyzer_tests.$(O): $(shell hg root)/.hg/dirstate
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    78
endif
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    79
265
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
# run default testsuite for this package
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
test: $(TOP)/goodies/builder/reports
380
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
    85
	$(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
265
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
	$(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
# add more install actions here
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
install::
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
# add more install actions for aux-files (resources) here
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
installAux::
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
# add more preMake actions here
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
preMake::
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
# add more postMake actions here
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
postMake:: cleanjunk
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
# build all mandatory prerequisite packages (containing superclasses) for this package
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
prereq:
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
	cd ../../../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
	cd ../../../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
380
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
   106
	cd ../../../../libbasic3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
265
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
	cd ../../../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
380
8fe3cb4e607f Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 265
diff changeset
   108
	cd ../../ && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
265
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
	cd ../../../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
	cd ../../../sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
	cd ../../tests && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
# build all packages containing referenced classes for this package
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
# they are nor needed to compile the package
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
references:
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
cleanjunk::
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
	-rm -f *.s *.s2
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
clean::
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
	-rm -f *.o *.H
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
clobber:: clean
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
	-rm -f *.so *.dll
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
$(OUTDIR)stx_goodies_petitparser_analyzer_tests.$(O) stx_goodies_petitparser_analyzer_tests.$(H): stx_goodies_petitparser_analyzer_tests.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
# ENDMAKEDEPEND --- do not remove this line
9b775d27d37e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134