diff options
author | Reinhold Kainhofer <reinhold@kainhofer.com> | 2011-08-30 13:42:39 +0200 |
---|---|---|
committer | Reinhold Kainhofer <reinhold@kainhofer.com> | 2011-09-01 18:28:24 +0200 |
commit | 623197430a7ed9b755d92cb053b64c21678af803 (patch) | |
tree | bb4079e8a065feeac2814c8e67dd02200d19d940 /make | |
parent | 022d5c7ef759c586e3ca6478cf5f1b5d56d31778 (diff) |
Fix 1821: Write pathes for ly-to-tely to a separate file rather than passing as cmd line args
For out-of-source builds, the collated files list has the whole absolute path
for each and every file (>1000 for our regtests), which blows up the cmd line
length to values that don't work with the shell (<=131000 chars allowed...).
This patch takes the list in the makefile and writes the filenames in several
patches (300 at a time for now) to a .list file and then passes just this one
file to lys-to-tely, which reads in the whole long list of file names from that
file. The trick is that while make can handle long variables, we can't pass
it to ly-to-tely on the cmd line, but have to use a helper file.
Diffstat (limited to 'make')
-rw-r--r-- | make/lysdoc-rules.make | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/make/lysdoc-rules.make b/make/lysdoc-rules.make index 5c38f7d4ab..e8fe8a182e 100644 --- a/make/lysdoc-rules.make +++ b/make/lysdoc-rules.make @@ -1,2 +1,19 @@ -$(outdir)/collated-files.tely: $(COLLATED_FILES) - $(LYS_TO_TELY) --name=$(outdir)/collated-files.tely --title="$(TITLE)" --author="$(AUTHOR)" $^ +$(outdir)/collated-files.list: $(COLLATED_FILES) + echo "(Re-)Generating $@" + # We can't print the list in one go, as it might be longer than a + # shell command is allowed (as of linux 2.6.3x >131000 chars) + @echo $(wordlist 1, 299,$^)>$@ + @echo $(wordlist 300, 599,$^)>>$@ + @echo $(wordlist 600, 899,$^)>>$@ + @echo $(wordlist 900,1199,$^)>>$@ + @echo $(wordlist 1200,1499,$^)>>$@ + @echo $(wordlist 1500,1799,$^)>>$@ + @echo $(wordlist 1800,2099,$^)>>$@ + @echo $(wordlist 2100,2399,$^)>>$@ + @echo $(wordlist 2400,2699,$^)>>$@ + @echo $(wordlist 2700,2999,$^)>>$@ + # Print the rest, just in case the list is that long + echo $(wordlist 3000,$(words $^),$^)>>$@ + +$(outdir)/collated-files.tely: $(outdir)/collated-files.list + $(LYS_TO_TELY) --name=$(outdir)/collated-files.tely --title="$(TITLE)" --author="$(AUTHOR)" --input-filename=$^ |