Re: Compilation without implementation source



In GNAT you only need the "*.ads" to compile. The Binding process
needs only the *.ali of the all files used. The Linking process needs
the main program ".ali", the files that are created by the binding
process and objject files "*.o" for the files used. Along with the
Standard GNAT files. The body "*.adb" are only needed to compile
the modules initially.

So,
1. Copy the modules to a temp directory both "*.adb" and "*.ads"
2. Compile each of the modules.
3. Erase the "body" aka "*.adb"
4. Copy the "*.ads *.ali *.o" to a students accessable directory
with write protection turn on.
5. This gives the student access to the *.als *.ali, *.o only.



In <43c33a30-8f1e-43a1-b84a-a22c4a37248a@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Gene <gene.ressler@xxxxxxxxx> writes:
For an educational exercise using GNAT and gnatmake, I need to hide
implementations of some modules from students in the simplest possible
way.

Is there a way to give them .ali, .ads, and .o files while withholding
the corresponding .adb, somehow telling gnatmake (and gnatbind) to
ignore the absence?

Or must I provide a library?

Other methods?

Many thanks for your help.

.



Relevant Pages