]> andersk Git - splint.git/commitdiff
Some work on the files in os2/, removed unnecessary
authorherbert <herbert>
Sat, 29 Sep 2001 13:22:08 +0000 (13:22 +0000)
committerherbert <herbert>
Sat, 29 Sep 2001 13:22:08 +0000 (13:22 +0000)
configuration stuff. Changed the expect in unsignedcompare test
target.

os2/BUILD.OS2
os2/Makefile.os2
os2/README.OS2
os2/config.inc
os2/makeos2.cmd
os2/run_lclint.cmd
os2/setenv.cmd [new file with mode: 0755]
test/Makefile-test.os2

index 6f1f813ca4f809bba86eac089bedc1a85e581254..c0215bdf2ed30d14610637e645d07c67163add85 100644 (file)
@@ -14,24 +14,24 @@ My fixes can be found at:
 \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
@@ -40,6 +40,11 @@ IBMC, else edit it by hand). In that case you may also want to edit the
 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
@@ -51,13 +56,14 @@ emx/gcc. However you can compile the lib with IBM's compiler, too. To
 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
index 9cd27107f5c585df26add8748573f23434936253..6b1888546f0b44d591262a67c030b04201cb51d0 100644 (file)
 ###\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
@@ -81,7 +81,7 @@ INSTALLDIR = \\usr\\bin
 ### 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
@@ -183,27 +183,6 @@ FLEX      = flex
 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
@@ -212,15 +191,16 @@ all:
        @$(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
@@ -242,44 +222,12 @@ configinc:
        $(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
index e61528cf9f0810fcfdc5f3167ba582fa16fb0a36..a7c3e480501a850fd1335112a5a6db707fece234 100644 (file)
@@ -95,6 +95,7 @@ The following things specific to the OS/2 version of lclint have changed /
 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
index 6bc67ed55e442f763d652abb7803aa70f6fd0a07..97ba4741d8d00ed5aef9a67c44cf07b226b1a490 100644 (file)
@@ -1,7 +1,7 @@
 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
index 6a8708c9994b999baecd8a6bd93a05d8d6766dee..821954ab921b08dbc212dc4074f6c72923a88c57 100755 (executable)
@@ -1,7 +1,6 @@
 @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
@@ -35,29 +34,28 @@ sh -c "export TODAY=`date.exe`; export LCL_DATE=`date.exe | cut -d ' ' -f 2,3,6`
 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
index 35fc3d925fc1de4c22c9251bf0e013f91707b7f5..6e8c958901c332722f3c05b674d174d9369a5cdc 100755 (executable)
@@ -3,10 +3,7 @@ rem *****************************************************************
 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
diff --git a/os2/setenv.cmd b/os2/setenv.cmd
new file mode 100755 (executable)
index 0000000..e6a767e
--- /dev/null
@@ -0,0 +1,10 @@
+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
index 44514987e2674db40c75ec878993319e657d5be4..ad3b06fecb0b32e3fd7d06fdaf3c909e398283c1 100644 (file)
@@ -530,7 +530,7 @@ unreachable:
        $(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
This page took 0.072707 seconds and 5 git commands to generate.