More details for the exported symbols issue. Used test.c instead of pnm.c as

example. Fixed paths for .desc files.
Henning Meier-Geinitz <henning@meier-geinitz.de>
DEVEL_2_0_BRANCH-1
Henning Geinitz 2002-04-22 16:54:38 +00:00
rodzic 4dd715f2a6
commit edb818a117
1 zmienionych plików z 13 dodań i 11 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
2002-03-21 2002-04-22
Here are a few rules and tips that should help writing a Here are a few rules and tips that should help writing a
SANE-conformant backend and including it into the SANE package: SANE-conformant backend and including it into the SANE package:
@ -20,7 +20,7 @@ GETTING STARTED
* Once your program works basically, insert its functions into a basically * Once your program works basically, insert its functions into a basically
empty SANE backend. You can get one by removing everything but the SANE empty SANE backend. You can get one by removing everything but the SANE
includes and SANE API function definitions from an existing backend (e.g. includes and SANE API function definitions from an existing backend (e.g.
pnm.c). test.c).
* When you start writing code, please contact the SANE mailing list in * When you start writing code, please contact the SANE mailing list in
order to add your backend to the PROJECTS file. order to add your backend to the PROJECTS file.
@ -174,16 +174,18 @@ TESTING
to this system, test compilation and running scanimage. If you don't have to this system, test compilation and running scanimage. If you don't have
access to other platforms, ask sane-devel. access to other platforms, ask sane-devel.
* Please make sure that all global symbols exported from a SANE * Please make sure that all global symbols exported from a SANE backend start
backend start with the prefix "sane" or "sanei". You can with the prefix "sane" or "sanei" to avoid clashes with exported symbols
verify this by running GNU "nm" on the static library. For of other backends. Make sure, the sanei_* symbols are unique, e.g. by using
example: sanei_backendname_*. Only export symbols that are absolutely necessary.
You can verify this by running GNU "nm" on the static library. For example:
nm -g backend/.libs/libsane-hp.a nm -g backend/.libs/libsane-hp.a
would list all global symbols in the HP backend. "make libcheck" would list all global symbols in the HP backend.
in the sane-backends root directory will name all backend libraries, "./configure --disable-shared; make; make libcheck" in the sane-backends
that contain "illegal" sysmbols. root directory will name all backend libraries, that contain "illegal"
symbols.
DOCUMENTATION DOCUMENTATION
@ -196,7 +198,7 @@ DOCUMENTATION
lists of supported devices. lists of supported devices.
* The .desc files are located in the directories "doc/descriptions" and * The .desc files are located in the directories "doc/descriptions" and
"doc/external/descriptions" (for included and external backends). "doc/descriptions-external" (for included and external backends).
* "template.desc." is a template for new .desc files. The format of the files * "template.desc." is a template for new .desc files. The format of the files
in the two directories is very similar. If you'd like to try parsing your in the two directories is very similar. If you'd like to try parsing your
@ -208,7 +210,7 @@ DOCUMENTATION
* When your backend is included in the SANE distribution, add an entry to * When your backend is included in the SANE distribution, add an entry to
doc/sane.man, AUTHORS and sane-backends.lsm. The sane.man entry should point doc/sane.man, AUTHORS and sane-backends.lsm. The sane.man entry should point
to your documentation (man-page, website, readme). Also move your .desc to your documentation (man-page, website, readme). Also move your .desc
file from "doc/external-descriptions" to "doc/descriptions". file from "doc/descriptions-external" to "doc/descriptions".
* In your manual page (backend.man), use @LIBDIR@ and the other macros for * In your manual page (backend.man), use @LIBDIR@ and the other macros for
path names to the libraries, config files and documentation. Don't use fixed path names to the libraries, config files and documentation. Don't use fixed