* shell/awk script to help creating fpmake.pp from existing ppu files

git-svn-id: trunk@9882 -
This commit is contained in:
peter 2008-01-23 17:04:40 +00:00
parent 545d27e888
commit 960024adb8
2 changed files with 25 additions and 0 deletions

1
.gitattributes vendored
View File

@ -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

View 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