NO

Author Topic: POMAKE: problem with command line length  (Read 3891 times)

mtx500

  • Guest
POMAKE: problem with command line length
« on: March 16, 2005, 05:06:47 PM »
Hi Pelle,
here is another small issue:

POMAKE has a problem when the size of the command line exceeds ~1000 chars.

The following makefile demonstrates this:
Code: [Select]
DEFS=\
    /DVeryLongDefine01=VeryLongSubstitutionText01 \
    /DVeryLongDefine02=VeryLongSubstitutionText02 \
    /DVeryLongDefine03=VeryLongSubstitutionText03 \
    /DVeryLongDefine04=VeryLongSubstitutionText04 \
    /DVeryLongDefine05=VeryLongSubstitutionText05 \
    /DVeryLongDefine06=VeryLongSubstitutionText06 \
    /DVeryLongDefine07=VeryLongSubstitutionText07 \
    /DVeryLongDefine08=VeryLongSubstitutionText08 \
    /DVeryLongDefine09=VeryLongSubstitutionText09 \
    /DVeryLongDefine10=VeryLongSubstitutionText10 \
    /DVeryLongDefine11=VeryLongSubstitutionText11 \
    /DVeryLongDefine12=VeryLongSubstitutionText12 \
    /DVeryLongDefine13=VeryLongSubstitutionText13 \
    /DVeryLongDefine14=VeryLongSubstitutionText14 \
    /DVeryLongDefine15=VeryLongSubstitutionText15 \
    /DVeryLongDefine16=VeryLongSubstitutionText16 \
    /DVeryLongDefine17=VeryLongSubstitutionText17 \
    /DVeryLongDefine18=VeryLongSubstitutionText18 \
    /DVeryLongDefine19=VeryLongSubstitutionText19 \
    /DVeryLongDefine20=VeryLongSubstitutionText20 \
    /DVeryLongDefine21=VeryLongSubstitutionText21 \
    /DVeryLongDefine22=VeryLongSubstitutionText22 \
    /DVeryLongDefine23=VeryLongSubstitutionText23 \
    /DVeryLongDefine24=VeryLongSubstitutionText24 \
    /DVeryLongDefine25=VeryLongSubstitutionText25

POMAKEBug1.obj: POMAKEBug1.c
    @pocc.exe /Fo$@ /MT /W2 /Ze /O2 $(DEFS) $!


POMAKEBug1.c should exist but its contents are irrelevant.
POMAKE returns:
fatal error #1061: Can't open input file '@C:\DOCUME~1\xxxxxx\LOCALS~1\Temp\MKDA.tmp'.
POMAKE: fatal error: 'pocc.exe', error 1.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POMAKE: problem with command line length
« Reply #1 on: March 16, 2005, 07:12:21 PM »
Hello,

Yes, the limit used by POMAKE is 1000. If the command line is longer, I create an "argument file" and change the syntax to: cmd @argfile. This assumes that "cmd" (POCC in this case) can handle @filename, which it can't - but the compiler driver, CC, can. You could change this from POCC ... to CC /c ...

I can't find the limit at the moment, but I think this was done because of a limitation for command lines in some Win 9X version. If it was a bit longer, probably 1024, it was truncated. Probably not an issue on Win NT/2K/XP, and maybe not even on Win 98. I will have to investigate...

Pelle
/Pelle