分类: LINUX
2011-09-04 15:02:08
dwm is customised by editing config.h, a C language header file, and config.mk, a Make include file.
What is config.h?config.h is a source code file which is included by dwm.c, the main dwm source code module. It serves as the configuration file for all of dwm’s features, e.g., application placement, tags, and colours. A vanilla download of dwm will contain a file called config.def.h, a template you can use to create your own config.h file. To start customising dwm, simply copy config.def.h into config.h before you run make.
What is config.mk?config.mk is a file included by Makefile. It allows you to configure how make is going to compile and install dwm.
How do I modify config.h?config.h can be edited just like any other C source code file. It contains definitions of variables that are going to be used by dwm.c and therefore it is vital that the file is always up to date. The default Makefile distributed with dwm will not overwrite your customised config.h with the contents of config.def.h, even if it was updated in the latest mercurial pull. Therefore, you should always compare your customised config.h with config.def.h and make sure you include any changes to the latter in your config.h.
How do I modify config.mk?config.mk can be edited just like any other text file. It contains definitions of variables that are going to be used inside Makefile. Unlike config.h, config.mk does not have a config.def.mk (a default Makefile). Therefore, during an update of your repository you may run into conflicts if the original config.mk is edited.
Are there any example customisations to get me started?Various customisation options are illustrated in the sub-directories of this wiki page. Under each of the categories (customfuncs, fonts, etc.,) you will find example modifications that will get you started.
====
http://dwm.suckless.org/customisation/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
./configure, automake, autoconf and the like | ||
|
Source code (especially C/C++) must be compiled differently on
different platforms. Aggravating is the fact that some (library-)
functions
are not present on all platform (for example gettimeofday). This poses problems if the same source code is to be compiled on different platforms.
In order to tackle this problem, GNU proposes a two step build mechanism involving configure,
,
and the like.
Essentially, it boils down to a standard build process for a program like so:
./configure
make
make install
Invoking configure creates a config.status file, which is a shell script. config.status is used to convert
into the Makefile. config.status also turnes config.in into config.h
./configure also creates a config.cache file. config.cache should be removed if configure.in is significantely changed.
Lastly, ./configure creates a stamp-h.in file.
On the installer machine, nothing more than a bourne shell, a c compiler and a make programm are needed.
The programmer additionally needs the , the and .
configure's behaviour can be changed through its .
configure.in
configure.scan
can be used to create a configure.scan file which can be used as a starting point for a configure.in file.
Makefile.am
Makefile.am is a simple specification of a project's build requirements that will be turned into a fully fledged .
A typical Makefile.am has the form
variable=value
Most Makefile.am assigns values to the following variables:
Additionally, for each program, the following variables must be assigned to:
For each library, the following variables must be assigned to:
Super targets
Usually, the Makefile is generated by ./configure from
Targets
acconfig.h is the file out of which is generated.
config.h.in
config.h.in (or config.in, see ) is the file out of which is generated.
can be used to create an initial config.h.in.
config.h
config.guess
config.log
Use this file when something went wrong with ./configure.
config.status
config.status is a shell script that may be used to recreate the
current configuration. That is, all generated files will be regenerated.
Can also be used with
How they interact
On is a
generated graphic that illustrates (or at least: tries to) how the tools interact and which
files they produce.
Examples
|
====