mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 16:40:25 +02:00
* shell/awk script to help creating fpmake.pp from existing ppu files
git-svn-id: trunk@9882 -
This commit is contained in:
parent
545d27e888
commit
960024adb8
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -4369,6 +4369,7 @@ packages/fcl-xml/tests/xmlts.pp svneol=native#text/plain
|
||||
packages/fpmake.pp svneol=native#text/plain
|
||||
packages/fpmkunit/Makefile svneol=native#text/plain
|
||||
packages/fpmkunit/Makefile.fpc svneol=native#text/plain
|
||||
packages/fpmkunit/examples/ppu2fpmake.sh svneol=native#text/plain
|
||||
packages/fpmkunit/fpmake.pp svneol=native#text/plain
|
||||
packages/fpmkunit/src/fpmkunit.pp svneol=native#text/plain
|
||||
packages/fv/Makefile svneol=native#text/plain
|
||||
|
24
packages/fpmkunit/examples/ppu2fpmake.sh
Executable file
24
packages/fpmkunit/examples/ppu2fpmake.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
ppudump=ppudump
|
||||
|
||||
for f in $*; do
|
||||
$ppudump -vim $f | awk "
|
||||
BEGIN { first=1; }
|
||||
/^Source/ {
|
||||
if (first==1)
|
||||
{
|
||||
printf(\"T:=P.Targets.AddUnit('%s');\\n with T.Dependencies do\\n begin\\n\",\$5);
|
||||
first=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(\" AddInclude('%s');\\n\",\$5);
|
||||
}
|
||||
}
|
||||
/^Uses unit/ {
|
||||
printf(\" AddUnit('%s');\\n\",tolower(\$3));
|
||||
}
|
||||
END { if (first==0) { printf(\" end;\\n\"); } }
|
||||
"
|
||||
done
|
Loading…
Reference in New Issue
Block a user