\r
http://www.fh-wedel.de/pub/fh-wedel/staff/di/lclint/index.html\r
\r
-Edit the makefile "Makefile.os2" and the compile batch "makeos2.cmd" \r
-in the "lclint-?.?\os2" directory. During make execution all important \r
-settings will be written to a config file read by any sub makefile. In\r
-any case you will have to set the variable `$BASEDIR' in Makefile.os2 \r
-and `%base%' in makeos2.cmd according to your setup.\r
+You may want to set the correct date and version to be written into the \r
+lclint.exe binary in the Makefile.os2 file, although it is not strictly \r
+necessary. This should be enough to build the program. During make \r
+execution then some information will be written to a config file read \r
+by the sub makefile in the src/ directory.\r
\r
-Then use the batch file makeos2.cmd from inside the os2/ directory\r
-to build lclint. The options to that batch file are:\r
+Use the batch file makeos2.cmd from inside the os2/ directory to build \r
+lclint. The options to that batch file are:\r
\r
makeos2 [--emx|-e|--gcc|-g|--icc|-i|--oldconf|-o|--test|-t|--package|-p]\r
\r
-Like with make, this batch should be called from inside the os2\r
-directory. The options starting with "e" build LCLint using emx/gcc with \r
-debug code. The letter "g" stands for gcc using the OMF object format \r
-and optimization rather than debug code. For IBMs icc compiler use "i".\r
-Each of the above options will create a new configuration. To continue\r
-a build with an existing configuration use "o". Finally "t" runs the\r
-"quicktest" part of the test suite (other tests are not yet supported).\r
+This batch should be called from inside the os2 directory. The options \r
+starting with "e" build LCLint using emx/gcc with debug code. The letter \r
+"g" stands for gcc using the OMF object format and optimization rather \r
+than debug code. For IBMs icc compiler use "i". Each of the above \r
+options will create a new configuration. To continue a build with an \r
+existing configuration use "o". Finally "t" runs the "quicktest" part \r
+of the test suite (other tests are not yet supported).\r
\r
If you experience problems with the automatic configuration file creation\r
from within Makefile.os2 you may alternatively call makeos2.cmd with the\r
local_constants.h and herald.h files from this directory to have it match \r
your setup.\r
\r
+After building the program you may want to testrun it, using the batch\r
+file `run_lclint.cmd' or go through the test suite using `makeos2 -t'. \r
+Before that you will need to set the environment variables in the \r
+`setenv.cmd' file that is called from the other two batches.\r
+\r
Please, be aware that you need the flex library in order to build lclint.\r
As far as I remember the OS/2 version of flex comes with this library for\r
the emx/gcc compiler. If not, you will easily be able to compile it \r
do this, you will have to get the flex sources from one of the usual \r
ftp sites and compile at least the library. \r
\r
-To compile the flex library using IBM's VisualAge C++ compiler, you only\r
-need to perform the following steps:\r
+To compile the flex library using IBM's VisualAge C++ compiler, you \r
+only need to perform the following steps:\r
\r
- enter the flex source directory.\r
- enter "icc -c -Q -O libmain.c" and "icc -c -Q -O libyywrap.c"\r
-- enter "ilib fl.lib" from the command line (the library must not exist)\r
- and "y", "+libmain.obj+libyywrap.obj" and "<enter>" from the ilib prompt.\r
+- enter "ilib fl.lib" from the command line (the library must not \r
+ exist) and "y", "+libmain.obj+libyywrap.obj" and "<enter>" from the \r
+ ilib prompt.\r
- copy fl.lib somewhere where it gets found, I suggest "ibmcpp\lib".\r
\r
When using emx/gcc you can either produce code using the OMF object format\r
###\r
\r
LCL_VERSION=3.0.0.16\r
-LCL_DATE=25 Sep 2001\r
+LCL_DATE=28 Sep 2001\r
\r
# this gets written into the binary, add your name, your compiler settings\r
# etc. if you like.\r
-TODAY=Monday 25 Sep 19:40 MEST 2001\r
+TODAY=Monday 28 Sep 23:43 MEST 2001\r
ME=herbert\r
MACHINE=i586\r
-COMPILE_MSG=\# define LCL_COMPILE \"Compiled using $(CC)\\n on OS/2 $(TODAY) $(MACHINE) by $(ME),\\n OS/2 specific subversion is 4\"\r
+COMPILE_MSG=\# define LCL_COMPILE \"Compiled using $(CC)\\n on OS/2 $(TODAY) $(MACHINE) by $(ME),\\n OS/2 specific subversion is 5\"\r
\r
### Directory containing system include files:\r
\r
### this should be the complete path for the directory where this\r
### Makefile is, with no trailing / or spaces.\r
\r
-BASEDIR = e:\\usr\\src\\lclint-$(LCL_VERSION)\r
+# BASEDIR = e:\\usr\\src\\lclint-$(LCL_VERSION)\r
\r
###\r
### Then, run:\r
YFLAGS = -v -t -d\r
LFLAGS =\r
\r
-###\r
-### is the test suite available? (must be full path here)\r
-###\r
-\r
-TESTDIR = $(BASEDIR)/test\r
-\r
-### \r
-### if this Makefile is used with one of the\r
-### standard installation packages, no changes should be \r
-### necessary below this line.\r
-###\r
-\r
-.PHONY: install dobinaries dolibraries doimports test \r
-\r
-###\r
-### set this to a different directory\r
-### to install binaries elsewhere\r
-###\r
-\r
-RELEASEDIR = $(BASEDIR)/bin\r
-\r
all: \r
@$(ECHO)\r
@$(ECHO) "Creating configuration file. Syntax error message can be ignored..."\r
@$(ECHO)\r
@$(ECHO) "Creating local constants header file. Syntax error messages can be ignored..."\r
@$(ECHO)\r
- $(MAKE) ARGV=$(ARGV) -f Makefile.os2 --directory=$(BASEDIR)\\src --warn-undefined-variables localconstants \r
+ $(MAKE) ARGV=$(ARGV) -f Makefile.os2 --directory=..\\src --warn-undefined-variables localconstants \r
@$(ECHO)\r
@$(ECHO) "Now building lclint executable file..."\r
@$(ECHO)\r
- $(MAKE) -f Makefile.os2 --directory=$(BASEDIR)\\src --warn-undefined-variables\r
+ $(MAKE) -f Makefile.os2 --directory=..\\src --warn-undefined-variables\r
@$(ECHO)\r
@$(ECHO) "Now moving lclint executable file to bin directory..."\r
@$(ECHO)\r
- $(MV) $(BASEDIR)\src\lclint$E $(RELEASEDIR)\lclint$E\r
+ @if not exist ..\\bin mkdir ..\\bin\r
+ $(MV) ..\src\lclint$E ..\\bin\\lclint$E\r
\r
configinc:\r
$(ECHO) "CC=$(CC)" >config.inc\r
$(ECHO) "MV=$(MV)" >>config.inc\r
$(ECHO) "CP=$(CP)" >>config.inc\r
$(ECHO) "ECHO=\"$(ECHO)\"" >>config.inc\r
- $(CP) $(BASEDIR)\src\Headers\herald.h $(BASEDIR)\src\Headers\herald.last\r
- $(ECHO) "/* herald.h - created automatically from herald.os2 and Makefile.os2 */" >$(BASEDIR)\src\Headers\herald.h\r
- $(ECHO) "/*@constant observer char *LCL_VERSION;@*/" >>$(BASEDIR)\src\Headers\herald.h\r
- $(ECHO) "# define LCL_VERSION \"LCLint $(LCL_VERSION) --- $(LCL_DATE)\"" >>$(BASEDIR)\src\Headers\herald.h\r
- $(ECHO) "/*@constant observer char *LCL_PARSE_VERSION;@*/" >>$(BASEDIR)\src\Headers\herald.h\r
- $(ECHO) "# define LCL_PARSE_VERSION \"LCLint $(LCL_VERSION)\"" >>$(BASEDIR)\src\Headers\herald.h\r
- $(ECHO) "/*@constant observer char *LCL_COMPILE;@*/" >>$(BASEDIR)\src\Headers\herald.h\r
- $(ECHO) "$(COMPILE_MSG)" >>$(BASEDIR)\src\Headers\herald.h\r
-\r
-###\r
-### locations of standard LCLint files\r
-###\r
-### this should NOT have to be edited if you use the standard\r
-### installation package\r
-\r
-LCLINTBINDIR = $(BASEDIR)/bin\r
-\r
-LCLINTLIB = $(BASEDIR)/lib\r
-LCLINTIMPORTS = $(BASEDIR)/imports\r
-\r
-###\r
-### uses recursive make calls directly, so installation\r
-### will continue even if there are errors!\r
-###\r
-\r
-install: \r
- $(MAKE) dobinaries -f Makefile.os2\r
- $(MAKE) dolibraries -f Makefile.os2\r
- $(MAKE) doimports -f Makefile.os2\r
-\r
-dobinaries:\r
- $(INSTALL) $(INSTALLFLAGS) $(LCLINTBINDIR)\lclint$E $(INSTALLDIR)\r
-\r
-dolibraries:\r
- -mkdir$E $(LIBDIR)\r
- $(CP) $(LCLINTLIB)\\* $(LIBDIR)\r
-\r
-doimports:\r
- -mkdir$E $(IMPORTSDIR)\r
- $(CP) $(LCLINTIMPORTS)\\* $(IMPORTSDIR)\r
+ $(CP) ..\src\Headers\herald.h ..\src\Headers\herald.last\r
+ $(ECHO) "/* herald.h - created automatically from herald.os2 and Makefile.os2 */" >..\src\Headers\herald.h\r
+ $(ECHO) "/*@constant observer char *LCL_VERSION;@*/" >>..\src\Headers\herald.h\r
+ $(ECHO) "# define LCL_VERSION \"LCLint $(LCL_VERSION) --- $(LCL_DATE)\"" >>..\src\Headers\herald.h\r
+ $(ECHO) "/*@constant observer char *LCL_PARSE_VERSION;@*/" >>..\src\Headers\herald.h\r
+ $(ECHO) "# define LCL_PARSE_VERSION \"LCLint $(LCL_VERSION)\"" >>..\src\Headers\herald.h\r
+ $(ECHO) "/*@constant observer char *LCL_COMPILE;@*/" >>..\src\Headers\herald.h\r
+ $(ECHO) "$(COMPILE_MSG)" >>..\src\Headers\herald.h\r
\r
fixed since the first official release:\r
\r
version 3.0.0.16:\r
+- Finally fully united the OS/2 port with the main source tree.\r
- Bugfixes.\r
\r
version 3.0.0.14:\r
CC=icc -q -W2 -Dunlink=unlink -O+ -G5 -Gf+ -Gi+ -Gs+ \r
CFLAGS=\r
CPPFLAGS=-I.\Headers -DSTDC_HEADERS=1 -DOS2 \r
-BISON=\r
+BISON=bison\r
FLEX=flex\r
YFLAGS=-v -t -d\r
LFLAGS=\r
@echo off\r
setlocal\r
-set version=3.0.0.16\r
-set base=e:\usr\src\lclint-%version%\r
+call setenv.cmd\r
if "%1"=="" goto icc\r
if "%1"=="--icc" goto icc\r
if "%1"=="-i" goto icc\r
goto end\r
\r
:oldconf\r
-if not exist %base%\src\Headers\local_constants.h copy local_constants.h %base%\src\Headers\local_constants.h\r
-if not exist %base%\src\Headers\heral.h copy local_constants.h %base%\src\Headers\herald.h\r
+if not exist ..\src\Headers\local_constants.h copy local_constants.h ..\src\Headers\local_constants.h\r
+if not exist ..\src\Headers\heral.h copy local_constants.h ..\src\Headers\herald.h\r
make -f Makefile.os2 --directory=../src --warn-undefined-variables %2 %3 %4 %5 %6 %7 %8 %9 \r
+if not exist ..\bin mv ..\src\lclint.exe ..\bin\r
if errorlevel 0 mv ..\src\lclint.exe ..\bin\r
goto end\r
\r
:test\r
-set LARCH_PATH=%base%\lib\r
-set LCLIMPORTDIR=%base%\imports\r
cd ..\test\r
echo it's %LARCH_PATH% and %LCLIMPORTDIR%\r
-make LCLINT=%base%\bin\lclint %2 -e -f Makefile-test.os2\r
+make LCLINT=%basedir%\bin\lclint %2 %3 %4 %4 %5 %6 %7 %8 %9 -e -f Makefile-test.os2\r
cd ..\os2\r
goto end\r
\r
:package\r
-cd %base%\..\r
+cd %basedir%\..\r
rm -f lclint-%version%-os2-*.tar*\r
tar cvf lclint-%version%-os2-bin.tar lclint-%version%\bin lclint-%version%\imports lclint-%version%\lib lclint-%version%\os2 lclint-%version%\test lclint-%version%\BUFFERCHECKING lclint-%version%\LICENSE lclint-%version%\README\r
tar cvf lclint-%version%-os2-all.tar lclint-%version%\r
cd \export\lclint\r
-tar cvf %base%\..\lclint-%version%-os2-add.tar lclint-%version%\r
-gzip %base%\..\lclint-%version%-os2-*.tar\r
+tar cvf %basedir%\..\lclint-%version%-os2-add.tar lclint-%version%\r
+gzip %basedir%\..\lclint-%version%-os2-*.tar\r
goto end\r
\r
:end\r
rem run LCLint from the source\os2 directory with proper environment\r
rem *****************************************************************\r
setlocal\r
-set base=e:\usr\src\lclint-3.0.0.16\r
-set LARCH_PATH=%base%\lib\r
-set LCLIMPORTDIR=%base%\imports\r
-set LCLBINARY=%base%\bin\lclint.exe \r
+call setenv.cmd\r
echo it's %LCLBINARY%, %LARCH_PATH% and %LCLIMPORTDIR%\r
%LCLBINARY% %1 %2 %3 %4 %5 %6 %7 %8 %9\r
endlocal\r
--- /dev/null
+rem **********************************************************************\r
+rem Configure me: This is needed because the test targets are made in\r
+rem different directories, so absolute paths in the \r
+rem environment variables are needed.\r
+rem **********************************************************************\r
+set version=3.0.0.16\r
+set basedir=e:\usr\src\lclint-%version%\r
+set LARCH_PATH=%basedir%\lib\r
+set LCLIMPORTDIR=%basedir%\imports\r
+set LCLBINARY=%basedir%\bin\lclint.exe \r
$(LCLINTR) switch.c -expect 4\r
\r
unsignedcompare:\r
- ${LCLINT} +posixlib unsignedcompare.c -expect 2\r
+ ${LCLINT} +posixlib unsignedcompare.c -expect 4\r
\r
\r
###\r