|
Licensing Home |
LCT ExampleThe following tar ball contains the example described below. After installing the License Compliance Toolkit and LIDESC, download and untar it into a test directory, so you can execute the example yourself.Directory structureThe tar ball contains the following directory structure:
Overview of procedureIn general, to run the License Compliance Toolkit, do the following:
Here we goIn the following description, .../ means the directory in which you installed the License Compliance Toolkit.PreprocessorRun Preprocessorlicompr.pl full_path_to_lctExample_directoryDo not use a relative path. Look for "ERROR" in log file created by licompr. "ERROR" implies no license was found for the corresponding source file. Check for a pre-existing applicable licenseCheck existing LIDESC descriptions at www.mibsoftware.com/librock/lidesc/exist.htm to see if one works for you.Create a new LIDESC licenseIf there is no applicable pre-existing license, do the following to create a new license:
Edit .lh file produced by LIDESCEdit ...lics/tpl.lh and add license and version strings, to the line that defines librock_LIDESC_TV_tpl. Edit this line appear as follows:#define librock_LIDESC_TV_tpl "Test Proprietary License\tVersion 0.1" Add a new license line to .../licfile.txtTPL|Test Proprietary License|Version 0.1|lics/tpl.txt Add reference to new license line to sourcesAdd license and version strings to source files, or create COPYING file(s) to propagate the new license. In our example, we add:Test Proprietary License, Version 0.1to proprietary/main.c Run Preprocessor Againlicompr.pl full_path_to_lctExample_directoryLook for "ERROR" in the new log file created by licompr. Modify build scripts to add switches for the link map tracerEnsure something like the following line appears in the appropriate makefiles:EXE = main CFLAGS = -MD LDFLAGS = -Wl,-Map -Wl,$(EXE).mapSee the map tracer documentation for an explanation of these switches. Build sourcescd lctExample make Run the link map tracermapTracer.pl lctExample/proprietary/main.map .../DBTracer.txtIf the map tracer stops with: Cannot open filename.d for reading: No such file or directoryand filename.o is an object module that is always part of the link environment for all binaries linked on the system, or filename.a is a library that is always part of this link environment, add filename with the appropriate extension to your file listing the names of standard modules. E.g., suppose I linked a hypothetical file /usr/include/sys/embeddedtypes.h, licensed under the hypothetical license EMB, into all my programs, I would need to add the following line to the mapTracer's database' file (.../DBTracer.txt or your own file listing standard object modules and libraries): /usr/include/sys/embeddedtypes.h EMBI would also need to create a LIDESC definition for the EMB license and add a line to licfile.txt, something like: EMB|Embedded Source License|Version 1.0|lics/emb.txt Successful runs of the map tracer produce something similar to the following on standard output: Process complete. Output results can be found in: OutputResults2003918102541.log Source files can be found in: map2003918102541.logThe OutputResults file is helpful debugging information produced by the map tracer, but is not needed during normal use of the toolkit. LIDESC compliance checklicompo.pl map2003918102541.log > licompo.logIn licompo.log, look for ERROR, which usually implies a LIDESC license is somehow malformed, and CONFLICT, which indicates that LIDESC found a known or possible conflict. |