]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Documentation update.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 22 Oct 2007 11:50:00 +0000 (11:50 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 22 Oct 2007 11:50:00 +0000 (11:50 +0000)
darcs-hash:20071022115056-f2ef6-b6ab297f1563e302372addaf2a3ceade04158dd9.gz

doc/Makefile
doc/kdevelop1.png [new file with mode: 0644]
doc/kdevelop2.png [new file with mode: 0644]
doc/kdevelop3.png [new file with mode: 0644]
doc/kdevelop4.png [new file with mode: 0644]
doc/kdevelop5.png [new file with mode: 0644]
doc/kdevelop6.png [new file with mode: 0644]
doc/kdevelop7.png [new file with mode: 0644]
doc/manual.texinfo

index 4a02429a6bb227b9ee6325cea11f1aadc50bcf49..885667b1a9bdac19f379d5086dcc03bfe3171e25 100644 (file)
@@ -1,7 +1,18 @@
-all: manual.pdf manual.txt
+SOURCE = manual
 
-%.pdf: %.texinfo
+all: $(SOURCE).pdf $(SOURCE).txt
+
+PNG_FIGS = $(wildcard *.png)
+PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS))
+
+%.pdf: %.png
+       convert $< -density 150 $@
+
+%.pdf: %.texinfo $(PDF_FIGS)
        texi2pdf $<
 
 %.txt: %.texinfo
-       makeinfo --no-headers --force -o $@ $<
\ No newline at end of file
+       makeinfo --no-headers --force -o $@ $<
+
+clean:
+       rm -f $(SOURCE).{aux,cp,cps,fn,ky,log,pg,toc,tp,vr,vrs} $(PDF_FIGS)
diff --git a/doc/kdevelop1.png b/doc/kdevelop1.png
new file mode 100644 (file)
index 0000000..eb07200
Binary files /dev/null and b/doc/kdevelop1.png differ
diff --git a/doc/kdevelop2.png b/doc/kdevelop2.png
new file mode 100644 (file)
index 0000000..3d6ba6a
Binary files /dev/null and b/doc/kdevelop2.png differ
diff --git a/doc/kdevelop3.png b/doc/kdevelop3.png
new file mode 100644 (file)
index 0000000..0a8f616
Binary files /dev/null and b/doc/kdevelop3.png differ
diff --git a/doc/kdevelop4.png b/doc/kdevelop4.png
new file mode 100644 (file)
index 0000000..4dd3c71
Binary files /dev/null and b/doc/kdevelop4.png differ
diff --git a/doc/kdevelop5.png b/doc/kdevelop5.png
new file mode 100644 (file)
index 0000000..e734c40
Binary files /dev/null and b/doc/kdevelop5.png differ
diff --git a/doc/kdevelop6.png b/doc/kdevelop6.png
new file mode 100644 (file)
index 0000000..7750f0d
Binary files /dev/null and b/doc/kdevelop6.png differ
diff --git a/doc/kdevelop7.png b/doc/kdevelop7.png
new file mode 100644 (file)
index 0000000..c1ad770
Binary files /dev/null and b/doc/kdevelop7.png differ
index 7af2f047ea073c2ee712bf349155987e2680540b..d2c70195e8f01fcd90e6811316da1cfb4483751f 100644 (file)
@@ -743,16 +743,16 @@ To specify names and default values of configuration parameters use the
 @end table
 @end defvar
 
-Example of using @code{default_CONFIG}. @file{Makefile.omk} reads like:
+@noindent Example of using @code{default_CONFIG}. @file{Makefile.omk} reads like:
 @example
 @verbatiminclude ../tests/config/default/Makefile.omk
 @end example
-and @file{subdir/Makefile.omk} like:
+@noindent and @file{subdir/Makefile.omk} like:
 @example
 @verbatiminclude ../tests/config/default/subdir/Makefile.omk
 @end example
 
-After running @command{make default-config}, the content of
+@noindent After running @command{make default-config}, the content of
 @file{config.omk-default} will be:
 @example
 @verbatiminclude ../tests/config/default/config.omk-correct
@@ -760,53 +760,155 @@ After running @command{make default-config}, the content of
 
 @subsection Using Configuration Parameters
 
-Configuration parameters can be used by two ways:
+Configuration parameters can be used in two ways:
 @enumerate
 @item
   as variables in @file{Makefile.omk} and
 @item
-  as C preprocessor macros in OMK generated header files.
+  as C/C++ preprocessor macros in OMK generated header files.
 @end enumerate
 
-@noindent For the first use, you can have in @file{Makefile.omk} something like:
+@noindent For the first use, your @file{Makefile.omk} may contain something like:
 @example
 SUBDIRS = arch/$(CONFIG_ARCH)
 
 ifeq ($(CONFIG_DEBUG),y)
 DEFS += -DUSE_SIMULATOR
-endif
+end if
 @end example
 
-For the second use, there are several variables that are described here:
+For the second use, there are several variables that control generation
+of header files with configuration values. These variables are described
+here:
 
+@anchor{LOCAL_CONFIG_H}
 @defvar LOCAL_CONFIG_H
+  The value of this variable is the name of a header file, which will
+  contain all configuration parameters declared in the current directory
+  by @code{default_CONFIG}. This header file is accessible only by files
+  in current directory and it should be included like @code{#include
+  "@var{myconfig.h}"}.
 
+  In @file{Makefile.omk}, the use of this variable can look like this:
+
+@example
+LOCAL_CONFIG_H = myconfig.h
+@end example
 @end defvar
 
 @defvar config_include_HEADERS
-
+  This variable is similar to @code{LOCAL_CONFIG_H}. One difference is
+  that the generated header file is accessible to all files, not only to
+  files in the same directory. The second difference is that you have to
+  specify, which configuration parameters you want to appear in the
+  header file.
 @end defvar
 
 @defvar @var{xxx}_DEFINES
-
+  This variable determines the configuration parameters stored in a
+  header file generated by @code{config_include_HEADERS}. The @var{xxx}
+  in the name of this variable needs to be the same as the base name
+  (without extension) of the header file.
 @end defvar
 
+@noindent Example of using @code{config_include_HEADERS}:
+@example
+default_CONFIG = CONFIG_LINCAN=y CONFIG_LINCANRTL=n CONFIG_LINCANVME=n
+config_include_HEADERS = global.h
+global_DEFINES = CONFIG_OC_LINCAN CONFIG_OC_LINCANRTL 
+@end example
 
 @subsection Common Variables
 
+It is common practice to use @file{config.omk} to store projects-wide
+settings. Here is the list of variables, which are commonly set here
+(but they can also be set elsewhere, e.g. in @file{Makefile.omk}).
+
+You can easily ``reconfigure'' your project by changing the
+@file{config.omk} file. It is useful to have several configurations
+stored in different files and let @file{config.omk} be a symbolic link
+to the desired configuration.
+
+@vtable @code
+@item CC
+  The name of C compiler.
+@item CFLAGS
+  Command line options for C compiler.
+@item CXX
+  The name of C++ compiler.
+@item CPPFLAGS
+  Additional parameters (besides @code{CFLAGS}) to by passed to C++
+  compiler.
+@end vtable
  
 
 @section Running OMK under Windows @acronym{OS}
 
 @section Interfacing OMK to popular @acronym{IDE}s
 
+@subsection KDevelop
+
+KDevelop has support for custom build systems. To use KDevelop to
+develop projects using OMK follow these steps. These steps are valid for
+version 3.5.0 of KDevelop, but for previous versions it doesn't differ
+much.
+
+@enumerate
+@item
+  Import project to KDevelop (from menu choose Project -> Import
+  existing project). Select the type of project to @samp{Generic C
+  Application (Custom Buildsystem)}
+@example
+  @image{kdevelop1}
+@end example
+
+@item
+  Then answer to following dialogs as you want.
+@example
+  @image{kdevelop2}
+@end example
+@example
+  @image{kdevelop3} @image{kdevelop4}
+@end example
+
+@item
+  If you are working only on some small part of the bigger project, you
+  usually don't want to recompile the whole project every time. In
+  Project -> Project Options, you can specify the subdirectory where to
+  run @command{make}.
+@example
+  @image{kdevelop5}
+@end example
+
+@item
+  If you want to switch between several configurations easily (see also
+  @ref{Configuration and Conditional Compilation}), in the same dialog
+  you can add @option{-e} to make options. This makes environment variables
+  have higher precedence than those in @file{config.omk-default}. Then,
+  you can define several environments with different
+  @code{CONFIG_@var{xxx}} variables and their values.
+@example
+  @image{kdevelop6}
+@end example
+
+@item
+  You can easily switch the configurations from Build -> Make
+  Environment.
+@example
+  @image{kdevelop7}
+@end example
+@end enumerate
+
+
 @subsection Eclipse
 
-@subsection KDevelop
+@subsection Emacs, VIM, etc.
 
-@subsection Emacs
+Since OMK compilation is started by executing @command{make} command,
+many common editors can work easily with OMK.
 
-@subsection VIM
+Under Emacs, you can use @command{compile} or @command{recompile}
+commands as you are used to do.
 
 @section Troubleshooting
 
@@ -816,7 +918,7 @@ Manual compilation ... V=1
 
 
 
-@chapter OMK Reference
+@c @chapter OMK Reference
 
 @node OMK Development, Variable Index, Overview of OMK, Top
 @chapter OMK Development
@@ -828,9 +930,8 @@ Manual compilation ... V=1
 
 @printindex vr
 
-@node Concept Index,  , Variable Index, Top
-@unnumbered Concept Index
-
-@printindex cp
+@c @node Concept Index,  , Variable Index, Top
+@c @unnumbered Concept Index
+@c @printindex cp
 
 @bye