Mail Archives: djgpp/1998/06/18/20:31:26
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote, and I reply...
>Why do you need to hack them at all? Did you try to install the DJGPP
>port of Bash and auxiliary utilities, and just run the thing
>unaltered?
No. I've got *all* of the stuff you've mentioned installed and (i think)
working. i use bash regularly. (except i can't hack scripts yet!)
>In most cases, this should either work or bring you very
>close.
I know. I've used and compiled other programs using makefiles in the
past. It's just this one!
>In the latter case, post the relevant Makefile/shell script
>fragments and error messages, and ask for help here.
> - Make sure the Makefiles have this line somewhere inside (if not,
> add it):
>
> SHELL=/bin/sh
yep!
> - Make sure you have a ``symlink'' called sh.exe in the same
> directory where you unzip bash.exe from bsh1147b.zip.
yep!
>That's it! Now do whatever the build instructions in the package tell
>you to, and it should work.
no, it doesn't... :(
Okay - i ran the configure script. It didn't run when i tried to put the
sources in %DJDIR%/lclint-2.4, because it tried to run sed whch thought
that /lclint-2.4 referred to "c:/lclint-2.4/". i sorted that one by
moving the lot to c:/lclint-2.4, and running "configure".
The following makefile was generated... (i think my newsreader has
wrapped some of the longer lines)
I've made two changes - to the "include" directory - it was initially
set to /usr/include - i made that "/include", and the shell command was
set to "/bin/csh" - i made that "/bin/sh"
(and, yes, i've got bison and flex as well.)
****** Makefile *************
# Generated automatically from Makefile.in by configure.
###
### Makefile for building and installing LCLint 2.4
###
### Updated for LCLint 2.4: 12 April 1998
### Updated for LCLint 2.2: 25 August 1996
### Updated for LCLint 2.1a: 17 April 1996
### Updated for LCLint 2.0: 24 February 1996
### Updated for LCLint 1.4: 29 January 1995
### Original for LCLint 1.0: 20 February 1994
###
###
### This makefile assumes the gnu version of make is available.
###
### Run: make to build LCLint.
### make install to install.
###
###
### These constants will be compiled into the lclint binary.
###
### They may be overridden by environment variables, but these
### constants set the default values when no environment variables
### are set.
###
### Command to run C preprocessor:
DEFAULT_CPPCMD = gcc -E
### Directory containing system include files:
SYSTEM_LIBDIR = "/include"
###
### Select installation directories:
###
### The LIBDIR and IMPORTSDIR are compiled into the binary to
### select the default LARCH_PATH and LCLIMPORTDIR, which can
### also be overridden by environment variables.
###
### directory for lclint libraries
LIBDIR = c:/lclint-2.4/lib
### directory for lclint standard imports
IMPORTSDIR = c:/lclint-2.4/imports
### directory for lclint binary
INSTALLDIR = c:/lclint-2.4/bin
### this should be the complete path for the directory where this
### Makefile is, with no trailing / or spaces.
BASEDIR = c:/lclint-2.4
###
### Then, run:
###
### make
###
### I recommend doing this in an emacs shell (or buffered terminal) so
### you can scroll through the output.
###
### This should (hopefully) work on most systems without further
changes.
###
### If you do not have gcc, set CC = cc (or some other compiler)
### later in this file.
###
### It should:
### o build lclint
### o put lclint in BASEDIR/bin/lclint
###
### If you have installed the test suite, then do:
###
### make test
###
### to verify lclint.
###
###
### shell --- should work with /bin/sh or similar shells too.
###
SHELL = /bin/sh
###
### If you wish to install lclint in some other directory, set these
### variables, and do
###
### make install
###
### installation command
INSTALL = cp
INSTALLFLAGS =
### this works with nfs, change to whatever is needed to make
### a file executable on your system
MAKEEXE = chmod 755
###
### end of installation variables
###
###
### compiler --- gcc is recommended, but lclint has been compiled
### without changes using cc on several platforms.
###
CC = gcc -DSTDC_HEADERS=1
###
### optimizing compiler --- add optimization flags here
###
CCOPT = $(CC) -O4
###
### link flags --- this links the lex or flex library
###
LINKFLAGS = -lfl
###
### do you have bison and/or flex?
### (Note: yacc will probably not work; lex might work but is not
recommended.)
###
BISON =
FLEX =
###
### is the test suite available? (must be full path here)
###
TESTDIR = $(BASEDIR)/test
###
### if this Makefile is used with one of the
### standard installation packages, no changes should be
### necessary below this line.
###
.PHONY: install dobinaries dolibraries doimports test
###
### set this to a different directory
### to install binaries elsewhere
###
RELEASEDIR = $(BASEDIR)/bin
all: bin/lclint
lclint: bin/lclint
bin/lclint:
@echo 'Building lclint from source'
ifeq ($(SHELL), /bin/csh)
cd src ; setenv CC '$(CC)' ; setenv CCOPT '$(CCOPT)'; \
setenv BISON '$(BISON)' ; setenv FLEX '$(FLEX)' ; \
setenv DEFAULT_CPPCMD '"$(DEFAULT_CPPCMD)"' ; \
setenv SYSTEM_LIBDIR '$(SYSTEM_LIBDIR)' ; \
setenv LINKFLAGS '$(LINKFLAGS)' ; \
setenv DEFAULT_LARCHPATH '".:$(LIBDIR)"' ; \
setenv DEFAULT_LCLIMPORTDIR '"$(IMPORTSDIR)"' ; \
$(MAKE) -e
else
cd src ; CC='$(CC)'; export CC; CCOPT='$(CCOPT)'; \
BISON='$(BISON)' ; export BISON; FLEX='$(FLEX)'; export FLEX; \
DEFAULT_CPPCMD='$(DEFAULT_CPPCMD)' ; export DEFAULT_CPPCMD ;\
SYSTEM_LIBDIR='$(SYSTEM_LIBDIR)' ; export SYSTEM_LIBDIR ;\
DEFAULT_LARCHPATH='".:$(LIBDIR)/"' ; export DEFAULT_LARCHPATH ;\
LINKFLAGS='$(LINKFLAGS)'; export LINK_FLAGS; \
DEFAULT_LCLIMPORTDIR='"$(IMPORTSDIR)"' ; export
DEFAULT_LCLIMPORTDIR ;\
$(MAKE) -e
endif
@echo '// '
@echo '// Run: '$(MAKE)' test to check'
@echo '// '
mv src/lclint bin/lclint
test:
ifeq ($(SHELL), /bin/csh)
cd $(TESTDIR) ; setenv LCLINT $(RELEASEDIR)/lclint ; $(MAKE) -e
else
cd $(TESTDIR) ; LCLINT=$(RELEASEDIR)/lclint ; export LCLINT ;
$(MAKE) -e
endif
clean:
cd src; $(MAKE) clean
rm bin/lclint
###
### locations of standard LCLint files
###
### this should NOT have to be edited if you use the standard
### installation package
CP = cp
LCLINTBINDIR = $(BASEDIR)/bin
LCLINTBIN = lclint
LCLINTLIB = $(BASEDIR)/lib
LCLINTIMPORTS = $(BASEDIR)/imports
###
### uses recursive make calls directly, so installation
### will continue even if there are errors!
###
install:
@echo '// '
@echo '// Doing lclint installation'
@echo '// '
@echo ' '
-@$(MAKE) dobinaries
@echo ' '
-@$(MAKE) dolibraries
@echo ' '
-@$(MAKE) doimports
@echo ' '
@echo '// Installation complete.'
dobinaries:
@echo '// Installing binaries in '$(INSTALLDIR)
cd $(LCLINTBINDIR); $(INSTALL) $(INSTALLFLAGS) lclint
$(INSTALLDIR)
@echo '// Installed: lclint in '$(INSTALLDIR)
dolibraries:
@echo '// Installing libraries in '$(LIBDIR)
@echo " (This will complain if the directory already exists,
don't worry about it.)"
-mkdir $(LIBDIR)
$(CP) $(LCLINTLIB)/* $(LIBDIR)
@echo '// Installed libraries.'
doimports:
@echo '// Installing imports in '$(IMPORTSDIR)
@echo " (This will complain if the directory already exists,
don't worry about it.)"
-mkdir $(IMPORTSDIR)
$(CP) $(LCLINTIMPORTS)/* $(IMPORTSDIR)
@echo '// Installed imports.'
****************
i now ran make... and here's the output (again my newsreader will
truncate lines here). i don't know how to debug this... :(
bash$ make
Building lclint from source
cd src ; CC='gcc -DSTDC_HEADERS=1'; export CC; CCOPT='gcc -
DSTDC_HEADERS=1 -O4
'; \
BISON='' ; export BISON; FLEX=''; export FLEX; \
DEFAULT_CPPCMD='gcc -E' ; export DEFAULT_CPPCMD ;\
SYSTEM_LIBDIR='"c:/djgpp/include"' ; export SYSTEM_LIBDIR ;\
DEFAULT_LARCHPATH='".:c:/lclint-2.4/lib/"' ; export DEFAULT_LARCHPATH ;\
LINKFLAGS='-lfl'; export LINK_FLAGS; \
DEFAULT_LCLIMPORTDIR='"c:/lclint-2.4/imports"' ; export
DEFAULT_LCLIMPORTDIR ;\
make -e
make.exe[1]: Entering directory `c:/lclint-2.4/src'
//
// Making LCLint
// Version 2.4
//
// Compiler: gcc -O2
// Use derived bison files
// Use derived flex files
// Default cpp command: gcc -E
// System include directory: c:/djgpp/include
// Default Larch path: .:c:/lclint-2.4/lib/
// Default imports directory: c:/lclint-2.4/imports
//
// Updating version information
make.exe[2]: Entering directory `c:/lclint-2.4/src'
make.exe[2]: Leaving directory `c:/lclint-2.4/src'
// Updating local constants
make.exe[2]: Entering directory `c:/lclint-2.4/src'
make.exe[2]: Leaving directory `c:/lclint-2.4/src'
//
// Compiling:
//
make.exe[2]: Entering directory `c:/lclint-2.4/src'
CC="gcc -O2" ; export CC ; make -e lclint
make.exe[3]: Entering directory `c:/lclint-2.4/src'
c:/DJGPP/BIN/ls: *.o: No such file or directory (ENOENT)
// Compiling cppmain.c / compiled: 0 (of 120 files)
In file included from Headers/basic.h:78,
from Headers/llbasic.h:23,
from cppmain.c:24:
Headers/exprNode.h:277: virtual memory exhausted
make.exe[3]: *** [cppmain.o] Error 1
make.exe[3]: Leaving directory `c:/lclint-2.4/src'
make.exe[2]: *** [opt] Error 2
make.exe[2]: Leaving directory `c:/lclint-2.4/src'
make.exe[1]: *** [dorelease] Error 2
make.exe[1]: Leaving directory `c:/lclint-2.4/src'
make.exe: *** [bin/lclint] Error 2
bash$
any ideas???? thanks!
- sunil *racking my brains*
--
"I see you have books under your arm, brother. It is indeed a rare pleasure
these days to come across somebody that still reads, brother."
- Anthony Burgess
- Raw text -