flybd5 has asked for the wisdom of the Perl Monks concerning the following question:
I'm a relative newbie to PERL and I am trying to figure out how to handle this simple task.
I have a text file with a capture of commands associated with a software build.
e:\green\prelink.exe -X4 -c "e:\green\gnm.exe -c++" -Le:\green\ppc403 + \ obj\hello.o obj\shop.o obj\catalog.o obj\scan.o obj\strings.o +\ obj\itemlist.o -- -lscnoe e:\green\decode.exe < C:\DOCUME~1\BUILD~1.ELE\LOCALS~1\Temp\ghjs1.ler rm -f C:\DOCUME~1\BUILD~1.ELE\LOCALS~1\Temp\ghjs1.ler e:\green\gnm.exe -s catalog > C:\DOCUME~1\BUILD~1.ELE\LOCALS~1\Temp\gh +js2.nm e:\green\dblink.exe -dbopath=obj -nm=gnm \ C:\DOCUME~1\BUILD~1.ELE\LOCALS~1\Temp\ghjs2.nm -o catalog.dnm +\ e:\green\ppc403\crt0.dbo e:\green\ppc403\libmulti.dba \ e:\green\ppc403\libscnoe.dba e:\green\ppc403\libsedgnoe.dba \ e:\green\ppc403\libdbmem.dba e:\green\ppc403\libansi.dba \ e:\green\ppc403\libind.dba e:\green\ppc403\libsys.dba \ e:\green\ppc403\libarch.dba rm -f C:\DOCUME~1\BUILD~1.ELE\LOCALS~1\Temp\ghjs2.nm
These are all command lines for a build. I need to separate each command line (which extends over multiple lines with the " \" at the end until there is one without that), count them, and then put them into a makefile so they can be executed with gmake.
Any ideas how I should approach this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Breaking up a text file to make a Makefile
by bitingduck (Deacon) on Mar 13, 2015 at 07:35 UTC | |
by flybd5 (Initiate) on Mar 13, 2015 at 13:12 UTC | |
|
Re: Breaking up a text file to make a Makefile
by Anonymous Monk on Mar 13, 2015 at 07:22 UTC | |
by Anonymous Monk on Mar 13, 2015 at 07:46 UTC | |
by flybd5 (Initiate) on Mar 13, 2015 at 13:09 UTC | |
|
Re: Breaking up a text file to make a Makefile
by oiskuu (Hermit) on Mar 13, 2015 at 14:06 UTC |