mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-19 21:27:39 +01:00
README.mk: Minor wording beautifications
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
31d11febd8
commit
c2c0157b47
1 changed files with 28 additions and 22 deletions
50
README.md
50
README.md
|
|
@ -16,23 +16,24 @@ include $(JWBDIR)/make/cpp.mk
|
||||||
|
|
||||||
where `JWBDIR` needs to point to JW-Build's installation directory. In this
|
where `JWBDIR` needs to point to JW-Build's installation directory. In this
|
||||||
example, the snippet `cpp.mk` would by default take all C++ files it finds in
|
example, the snippet `cpp.mk` would by default take all C++ files it finds in
|
||||||
the directory where its included, compile them and and add them to a shared
|
the directory from where its included, compile them and and add them to a
|
||||||
package library. `js.mk` would by default minify all JavaSript it finds,
|
shared library. It would also take all header files and copy them to a central
|
||||||
|
include directory. `js.mk` would by default minify all JavaSript it finds,
|
||||||
`java.mk` jar up .java files into classes and jar-files, and so on. JW-Build
|
`java.mk` jar up .java files into classes and jar-files, and so on. JW-Build
|
||||||
also handles installation and packaging of all of these files, to customizable
|
also handles installation and packaging of all of these files, to customizable
|
||||||
locations with standardish defaults.
|
locations with standardish defaults.
|
||||||
|
|
||||||
JW-Build is small. It's small enough to be self-documenting. Well, okay,
|
JW-Build is small. It's small enough to be self-documenting. Well, okay,
|
||||||
somewhat self-documenting. You have to know GNU Makefile syntax to understand
|
somewhat self-documenting. You have to know GNU Makefile syntax to understand
|
||||||
what it does, and dig into its code, ideally with a working example. You can
|
what it does, and dig into its somtimes arcane code, ideally with a working
|
||||||
install it with your distribution's package manager, or you can keep it within
|
example. You can install it with your distribution's package manager, or you
|
||||||
your code versioning system, alongside your own code. It's also designed to be
|
can keep it within your code versioning system, alongside your own code. It's
|
||||||
the lightest possible touch on any given source code package, in terms of code
|
also designed to be the lightest possible touch on any given source code
|
||||||
you need to add to a package you want to build with it, and also in terms of
|
package, in terms of code you need to add to a package you want to build with
|
||||||
needed prerequisite software packages. This way, it's easily introduced - and
|
it, and also in terms of needed prerequisite software packages. This way, it's
|
||||||
it's also easy to get rid of, should you choose to do so at some point in time.
|
easily introduced - and it's also easy to get rid of, should you choose to do
|
||||||
You will then have all your settings like file system path definitions and
|
so at some point in time. You will then have all your settings like file
|
||||||
compiler flags in well-defined places already.
|
system path definitions and compiler flags in well-defined places already.
|
||||||
|
|
||||||
JW-Build runs a recursive make, so, with a few exceptions such as submodules,
|
JW-Build runs a recursive make, so, with a few exceptions such as submodules,
|
||||||
you will need a makefile in every directory with source code. Most, if not all
|
you will need a makefile in every directory with source code. Most, if not all
|
||||||
|
|
@ -57,7 +58,7 @@ in use at janware for managing sub-builds of Maven, Ant, CMake and others, and
|
||||||
for packaging the results. It provides targets to flash binaries onto MCUs,
|
for packaging the results. It provides targets to flash binaries onto MCUs,
|
||||||
produce Debian, RPM and IPK packages, install them locally or remotely, or feed
|
produce Debian, RPM and IPK packages, install them locally or remotely, or feed
|
||||||
them into a DevOps pipeline, taking note of released versions within GIT, SVN
|
them into a DevOps pipeline, taking note of released versions within GIT, SVN
|
||||||
or CVS. It detects if a package needs to be re-released because its source code
|
or CVS. It detects if a package needs a new release because its source code
|
||||||
changed. Or because a package it depends on has changed incompatibly. JW-Build
|
changed. Or because a package it depends on has changed incompatibly. JW-Build
|
||||||
has built-in support for collaboration over well-defined sets of remote Git
|
has built-in support for collaboration over well-defined sets of remote Git
|
||||||
repositories. It supports a simple configuration file per package for
|
repositories. It supports a simple configuration file per package for
|
||||||
|
|
@ -102,9 +103,13 @@ containing two files:
|
||||||
```
|
```
|
||||||
|
|
||||||
`TOPDIR` points to, you guessed it, the toplevel directory of your package.
|
`TOPDIR` points to, you guessed it, the toplevel directory of your package.
|
||||||
You will have defined it yourself, see the next point. Note that all
|
You will define it yourself in every directory, see below. The right-hand
|
||||||
directory paths can be relative, which is nice if you want to organize
|
side of the equation is GNU make gibberish for: "Look for a directory named
|
||||||
multiple packages in a fixed tree layout.
|
`jw-build` next to my package, and then below `/opt`, in that order."
|
||||||
|
Assuming that's how your source code is organized. Note that all directory
|
||||||
|
paths can be relative, which is nice if you want to organize multiple
|
||||||
|
packages in a fixed tree layout, but want them to work wherever you place
|
||||||
|
the tree.
|
||||||
|
|
||||||
2. `project.conf`, containing
|
2. `project.conf`, containing
|
||||||
|
|
||||||
|
|
@ -125,12 +130,13 @@ include $(JWBDIR)/make/cpp.mk
|
||||||
|
|
||||||
Done. Well, in principle. Other notable snippets are `topdir.mk` for the
|
Done. Well, in principle. Other notable snippets are `topdir.mk` for the
|
||||||
toplevel directory, `dirs.mk` for other directories with subdirectories,
|
toplevel directory, `dirs.mk` for other directories with subdirectories,
|
||||||
`lib.mk` for `$(TOPDIR)/lib`, `include.mk` for `$(TOPDIR)/include`, and
|
`lib.mk` for the directory containing the package's main library, which
|
||||||
`make.mk` for `$(TOPDIR)/make`. You should add them in the same manner. Once
|
defaults to `$(TOPDIR)/lib`, `bin.mk` for `$(TOPDIR)/bin`, `include.mk` for
|
||||||
you add those makefiles, running `make` will do - something. Try and see what
|
`$(TOPDIR)/include`, and `make.mk` for `$(TOPDIR)/make`. You should add them in
|
||||||
happens. Every snippet supports at least the targets `all`, `install`, `clean`
|
the same manner. Once you've added those makefiles, running `make` will do -
|
||||||
and `distclean`. `make echo-makefiles` shows you all included snippets,
|
something. Try and see what happens. Every snippet supports at least the
|
||||||
`make cat-makefiles` concatenates them. Hitting TAB should show you all targets
|
targets `all`, `install`, `clean` and `distclean`. The target `echo-makefiles`
|
||||||
supported in a particular directory. Good luck!
|
shows you all included snippets, `cat-makefiles` concatenates them. Hitting TAB
|
||||||
|
should show you all targets supported in a particular directory. Good luck!
|
||||||
|
|
||||||
[logo]: https://janware.com/janware/images/logo-janware/logo-janware-200.png
|
[logo]: https://janware.com/janware/images/logo-janware/logo-janware-200.png
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue