[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: long list, command line too long
From: |
daniel.steinmann |
Subject: |
RE: long list, command line too long |
Date: |
Fri, 16 Sep 2005 13:41:40 +0200 |
Torsten Mohr wrote:
> i should have mentioned it, i have already read about
> "write-var-to-file", the problem is that this is very complicated
> (i've splitted it into its single parts, i think i've understood
> parts of it(set __a to empty, add single entries and then write it
> into a file?)) but i did not manage to do the same on Windows 2000.
I was the one you started the thread which ended with the very useful
write-var-to-file. This function works well for me under Windows 2000
with the cygwin version of make. I never tried it with the Windows
native version.
What is the exact problem?
> Also, i need the single entries each in a single line, not just
> separated by spaces, the following tool needs it that way.
I also run into this problem and I solved it like this (excerpt from my
Makefile to compile a Java project):
# Java source files. The files are found with help of the VPATH feature.
This
# is necessary for the dependency rule '$(CLASS_DIR)/%.class : %.java'.
VPATH = java
JSRCS := $(shell cd java && find ch -name '*.java')
# Define where classes are written to
JOBJS = $(JSRCS:%.java=$(CLASS_DIR)/%.class)
# Real location (without VPATH)
REAL_SRCS := $(JSRCS:%.java=java/%.java)
# Compile all Java files in one go
$(CLASS_DIR)/%.class : %.java
@mkdir -p $(CLASS_DIR)
$(call write-var-to-file,$(JSRCS_LIST),REAL_SRCS,200)
ifneq ($(findstring jikes,$(JC)),)
# Jikes needs all files on a separate line
sed 's, ,\n,g' $(JSRCS_LIST) > $(JSRCS_LIST).temp
mv $(JSRCS_LIST).temp $(JSRCS_LIST)
endif
$(JC) $(JC_FLAGS) @$(JSRCS_LIST)
HTH,
Daniel