make-w32
[Top][All Lists]
Advanced

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

Re: Limitation compared to Cygwin make


From: Offner, Georg
Subject: Re: Limitation compared to Cygwin make
Date: Fri, 3 Nov 2006 16:58:47 +0100

From: "Offner, Georg" <address@hidden>
Date: Fri, 3 Nov 2006 15:11:18 +0100

For easier understanding I reduced the problem to the following:
My list of files (let's say for simplicity they are all in the same
directory) comprises 500 files. Compiling in the source folder is no
problem.
Now I add an object path to the make rule to get the binaries in a
different folder.
When the object path exceeds 20 characters, make breaks with:

process_begin:
CreateProcess(C:\DOCUME~1\go\LOCALS~1\Temp\make1636-1.bat,
C:\DOCUME~1\go\LOCALS~1\Temp\make1636-1.bat, ...) failed.
make (e=87): The parameter is incorrect.
make: *** [PLATFORM/StarTarget7/OUT/lib/crtl/time/GETTMOD.d] Error 87

No difference when I use sh.exe as shell.

Thank you for your report.

Is it possible to show a short Makefile that can be used to reproduce
this problem?  It is very hard to try to debug a problem without even
the offending fragment of a Makefile to look at.

Btw, where did you get the binary of Make 3.81?


The binary was build by myself.
Find below a condensed makefile which I used for tests. I think that the dependency section is not necessary, it contains some special stuff for adapting .o to .obj by means of sed.

CC         = gcc
AS_CPP            = gcc
AS                = as
AR              = ar
SED               = ./sed
RM                = rm -f
MD         = ./mkdir -p
TEST         = test


OBJ_DIR = OUTPATH1/OUTPATH12/OUTPATH13/OUTPATH14/OUTPATH15/OUTPATH6/OUTPATH61/OUTPATH62/OUTPATH63/OUTPATH64/OUTPATH65/OUTPATH66/OUTPATH67/OUTPATH68/OUTPATH1/OUTPATH12/OUTPATH13/OUTPATH14


local_lib = $(OBJ_DIR)local.lib

all: $(local_lib)

local_src = $(wildcard SOURCE/*.c)
#local_src = SOURCE/file1.c SOURCE/file2.c

c_depends := $(subst .c,.d,$(local_src))
c_depends := $(addprefix $(OBJ_DIR), $(c_depends))
c_objects := $(subst .c,.obj,$(local_src))
c_objects := $(addprefix $(OBJ_DIR), $(c_objects))

#$(warning @@@ c_depends=$(c_depends))
#$(warning @@@ c_objects=$(c_objects))

.PHONY:
$(local_lib): $(c_objects)
$(TEST) -d $(@D) || $(MD) $(@D)
@$(AR) $(ARFLAGS) $@ $^


$(c_depends): $(OBJ_DIR)%.d: %.c
@printf "\n"
@printf ">> c dependency file: address@hidden"
$(TEST) -d $(@D) || $(MD) $(@D)
$(CC) $(C_INCLUDE) $(C_FLAGS_GLOBAL) $(C_FLAGS_MODULE) $(C_FLAGS_FILE) $(CFLAGS) -M -o$(OBJ_DIR)$*.tmp $*.c $(SED) -e "1s|$(*F).o|$(OBJ_DIR)$*.obj $(OBJ_DIR)$*.d|1" $(OBJ_DIR)$*.tmp > $(OBJ_DIR)$*.d
-$(RM) $(OBJ_DIR)$*.tmp

$(c_objects): $(OBJ_DIR)%.obj: %.c $(OBJ_DIR)%.d
@printf "\n"
@printf ">> c object file: address@hidden"
$(CC) $(C_INCLUDE) $(C_FLAGS_GLOBAL) $(C_FLAGS_MODULE) $(C_FLAGS_FILE) $(CFLAGS) -o$(OBJ_DIR)$*.asm $*.c $(AS) $(AS_FLAGS_GLOBAL) $(A_FLAGS_MODUL) $(A_FLAGS_FILE) $(AFLAGS) -o$(OBJ_DIR)$*.obj $(OBJ_DIR)$*.asm




reply via email to

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