make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VPATH problem using make under Windows


From: Dale Macdonald
Subject: VPATH problem using make under Windows
Date: 28 Apr 2004 11:37:36 +0200

 I have come across a nasty snag, which has brought me to a crushing
halt. 

I am primarily a java developer, but as of the beginning of this year,
have also been working with a compiler called FlagShip, which will run a
large majority of Clipper code. Flagship generates C code, which is then
compiled accordingly. 

Originally, I was working with RedHat 9, but as we would also like the
final result to run under Windows, and as a windows port of FlagShip has
just been released, I attempted to compile on an XP machine. 

Problem is this - we have a large number of common files, which reside
in a common directory, and by setting VPATH, this was no problem for
make under RedHat - but I am wholly unable to get this to be the case
under Windows. I have tried : 

VPATH = C:\common 
VPATH = \common 
VPATH = C:/common 
VPATH = /common 

and even 

VPATH = C:\\common 

Regardless, make appears unable to produce .obj files, though it does
generat .c files in th common subdirectory depending on the version of
VPATH above which I attempt 

Any idea what it is that I am doing wrong/what point I am missing??? 

Any help would be GREATLY appreciated! 

I attach a simplified Makefile to indicate what i am attempting to do :
 
 
MAIN = maino.exe
Coptions = -d
mainmodule = -Mmaino
COMP= FlagShip   
LINK= FlagShip    
VPATH =C:/thorsten/common

 
.SUFFIXES:
.SUFFIXES: .obj .prg .out
 
# .c.obj:
# FlagShip $(Coptions) -O -c $*.prg
 
.prg.obj:
 $(COMP) -c $<
 rm -f $*.c
 
# .obj:
#  FlagShip $(Coptions) $(mainmodule) $(THEOBJECTS) -o$@
 
.SILENT:
 
.IGNORE:
 
THEOBJECTS =   \
 maino.obj \
 subfuncs.obj 
 
all: $(MAIN) 
      
$(MAIN): $(THEOBJECTS) 
 $(LINK) $(THEOBJECTS) $(mainmodule) -o $(MAIN) -d 
 echo "--- invoke $(MAIN) ---"
  
# maino.obj: maino.prg
# subfuncs.obj: subfuncs.prg
 
 
 
#clean : 
# -(rm *.c *.obj *.bi *.bp )
 
#delete : $(THEOBJECTS)
# rm $(THEOBJECTS)
 
 
 
*******************************************************************************************************************
 
maino.prg is in directory c:\thorsten and the common file subfuncs.prg
is in c:\thorsten\common
 
Finally, this is the output when I run make :
 
>From : 
 
C:\thorsten>make
 
FlagShip PRO (unlimited users)
(c) Copyright 1989..2004 by multisoft GmbH Munich/Germany
-- FS compiler phase:
    6   Pass2: maino.prg
-- C compiler and linker phase:
maino.c
process_begin: CreateProcess((null), rm -f maino.c, ...) failed.
make (e=2): The system cannot find the file specified.
 
FlagShip PRO (unlimited users)
(c) Copyright 1989..2004 by multisoft GmbH Munich/Germany
-- FS compiler phase:
c:/thorsten/common/subfuncs.bp(1): Error, illegal file and procedure
name
Invalid switch - "thorsten".ommon/subfuncs.prg
 
Invalid switch - "thorsten".
-- C compiler and linker phase:
subfuncs.c
c:/thorsten/common/subfuncs.c(2621) : error C2143: syntax error :
missing '{' be
fore ':'
c:/thorsten/common/subfuncs.c(2621) : error C2059: syntax error : ':'
Invalid switch - "thorsten".
process_begin: CreateProcess((null), rm -f subfuncs.c, ...) failed.
make (e=2): The system cannot find the file specified.
 
FlagShip PRO (unlimited users)
(c) Copyright 1989..2004 by multisoft GmbH Munich/Germany
-- C compiler and linker phase:
maino_m.c
LINK : fatal error LNK1181: cannot open input file "subfuncs.obj"
"--- invoke maino.exe ---"
 
C:\thorsten>make
make: *** No rule to make target `subfuncs.obj', needed by `maino.exe'. 
Stop.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]