mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
Everywhere: Remove everything non-essential for "make clean all"
This commit removes everything not strictly necessary for running "make clean all" inside jw-build. packaging jw-devtest. This cuts the repo down from 24077 to 4725 lines of code. The idea is to 1) Further remove bloat from the remaining bits 2) Re-add what's necessary to build and package other essential repos. The decision should be based on whether or not jw-build can also be useful in a non-janware context. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c36c83c164
commit
bc883deed4
199 changed files with 0 additions and 18851 deletions
7
CHANGES
7
CHANGES
|
|
@ -1,7 +0,0 @@
|
||||||
jw-build Changes File
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
Version 1.0.0-0
|
|
||||||
---------------
|
|
||||||
Split off from from ytools 1.2.14-12. Removed everything which isn't directly
|
|
||||||
meaningful to software build and packaging functionality.
|
|
||||||
225
README.md
225
README.md
|
|
@ -1,225 +0,0 @@
|
||||||
# JW-Build
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
The JW-Build package is basically a bunch of scripts and GNU makefile snippets
|
|
||||||
for organizing software builds and releases.
|
|
||||||
|
|
||||||
You can install it to its standard location `/opt/jw-build`, or put it anywhere
|
|
||||||
you want in your file system, typically next to your own projects in the same
|
|
||||||
directory. To organize their respective builds, you can then include JW-Build's
|
|
||||||
makefile snippets from your own projects' makefiles, like so:
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/cpp.mk
|
|
||||||
|
|
||||||
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
|
|
||||||
the directory from where its included, compile them, and and add them to a
|
|
||||||
shared project library. It would also take all header files and copy them to a
|
|
||||||
project 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 also handles installation and packaging of these files, to
|
|
||||||
customizable locations with standardish defaults.
|
|
||||||
|
|
||||||
JW-Build is small, its tarball is about 200K. It's small enough to be shipped
|
|
||||||
with the source code of your project, if you choose to do so. And it's small
|
|
||||||
enough to be self-documenting. Well, okay, somewhat self-documenting. You have
|
|
||||||
to know GNU Makefile syntax to understand what it does, and dig into its
|
|
||||||
somtimes arcane code, ideally with a working example. You can install it with
|
|
||||||
your distribution's package manager, or you can keep it within your code
|
|
||||||
versioning system, alongside your own code. It's also designed to be the
|
|
||||||
lightest possible touch on any given source code package, in terms of code you
|
|
||||||
need to add to a given package that should be built with it, and also in terms
|
|
||||||
of software packages needed to be installed on your machine. This way, it's
|
|
||||||
easily added - and it's also easy to replace, should you choose to do so at
|
|
||||||
some point. You will then have all your settings like file 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,
|
|
||||||
you will need a makefile in every directory with source code. Most, if not all
|
|
||||||
of these makefiles can be three-liners. This buys you convenience, minimal,
|
|
||||||
clean, humanly digestable code, and a structured way to customize builds
|
|
||||||
involving multiple packages - as centrally or as locally as you want. You can
|
|
||||||
override any of JW-Build's default variables - for many packages, for an entire
|
|
||||||
package, or for any subdirectory of a given package, at your option. You can
|
|
||||||
write your own snippets and reuse them in multiple places. You can keep
|
|
||||||
overrides in your versioning system or add them where needed in
|
|
||||||
`local.mk`-files, which only your machine knows about. Or you can use
|
|
||||||
environment variables, of course. JW-Build intentionally avoids makefile code
|
|
||||||
generation as seen with CMake or GNU Autotools. This keeps the code small and
|
|
||||||
readable for easy debugging. Okay, for relatively easy debugging. To achieve
|
|
||||||
this, JW-Build has to detect a couple of things in every directory it enters,
|
|
||||||
but it uses various caching mechanisms to keep builds still reasonably fast.
|
|
||||||
|
|
||||||
JW-Build has makefile snippets for building libraries and executables, snippets
|
|
||||||
that output code compiled from C/C++, Python, Java, JavaScript, LaTeX, SWIG and
|
|
||||||
other input formats, and it's easily extendible to support any given
|
|
||||||
programming language or task. It's 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 microcontrollers, produce Debian, RPM and IPK
|
|
||||||
packages, install them locally or remotely, or feed them into DevOps pipelines,
|
|
||||||
taking note of released versions within GIT, SVN or CVS. It detects whether or
|
|
||||||
not a package needs a new release because its source code changed. Or because a
|
|
||||||
package it depends on has changed incompatibly. JW-Build has targets for
|
|
||||||
collaboration over structured sets of remote Git repositories. It supports a
|
|
||||||
simple configuration file per package for specifying package metadata, e.g. its
|
|
||||||
dependencies, license, description, pre- and postinstall scriptlets, and so on.
|
|
||||||
It has a SAT-solver built in, for building multiple packages in the right
|
|
||||||
order, based on that metadata. With the same metadata, it can also
|
|
||||||
automatically generate BitBake recipes and run Yocto-builds incorporating your
|
|
||||||
software. Packages which are not organized with JW-Build can also be integrated
|
|
||||||
into the build. It generates runtime, development and source code package
|
|
||||||
variants. It supports cross compilation with MinGW and the GNU toolchain. It's
|
|
||||||
tested on Debian, Ubuntu, OpenSUSE, Fedora / CentOS / RHEL, and many Unices.
|
|
||||||
|
|
||||||
JW-Build is designed to be friendly to both developers and integrators.
|
|
||||||
Developers can cd into any given directory, edit the source code, run `make`,
|
|
||||||
and expect the resulting binaries to work and be immediately testable, for a
|
|
||||||
workflow that lets you focus on coding in your target language. For integrators
|
|
||||||
on the other hand, a hotfix on a server or an embedded host can be as simple as
|
|
||||||
|
|
||||||
TARGET_HOST=myserver.acme.com make pkg-remote-install
|
|
||||||
|
|
||||||
And of course, it can build, package and release itself. Without being
|
|
||||||
installed, which is a Good Thing (TM).
|
|
||||||
|
|
||||||
## Basic Usage
|
|
||||||
|
|
||||||
### For janware builds
|
|
||||||
See https://janware.com/wiki/pub/sw/build/ for documentation on how to get
|
|
||||||
and use JW-Build within the janware build infrastructure.
|
|
||||||
|
|
||||||
### Standalone
|
|
||||||
If you want to use it standalone, OTOH, do the following to get a minimal
|
|
||||||
working example:
|
|
||||||
|
|
||||||
First, add a `make` subdirectory to the toplevel directory of your package,
|
|
||||||
containing two files:
|
|
||||||
|
|
||||||
1. `proj.mk`, containing a definition of `JWBDIR`, pointing to the JW-Build
|
|
||||||
installation directory, e.g. like so:
|
|
||||||
|
|
||||||
JWBDIR ?= $(firstword $(wildcard $(addsuffix /jw-build,$(TOPDIR)/.. /opt)))
|
|
||||||
|
|
||||||
`TOPDIR` points to, you guessed it, the toplevel directory of your package.
|
|
||||||
You will most likely define it yourself in every makefile that uses
|
|
||||||
`proj.mk`, see below. The right-hand side of the equation is GNU Make
|
|
||||||
gibberish for: *"Look for a directory named `jw-build` next to my package,
|
|
||||||
and then below `/opt`, in that order."* Assuming that's where the packages
|
|
||||||
are in your file system.
|
|
||||||
|
|
||||||
Things to note:
|
|
||||||
- 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.
|
|
||||||
- It doesn't have to be `$(TOPDIR)/make`. You can choose any other
|
|
||||||
subdirectory of your package, but for now let's just assume it's
|
|
||||||
`$(TOPDIR)/make`, the default location.
|
|
||||||
|
|
||||||
2. `project.conf`, containing
|
|
||||||
|
|
||||||
[description]
|
|
||||||
A frobnicator library
|
|
||||||
|
|
||||||
Then, add files named `Makefile` to the directories of your project,
|
|
||||||
containing, e.g., in a C++ directory:
|
|
||||||
|
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/cpp.mk
|
|
||||||
|
|
||||||
Done. Well, in principle. Other notable snippets are `topdir.mk` for the
|
|
||||||
toplevel directory, `dirs.mk` for other directories with subdirectories,
|
|
||||||
`lib.mk` for the directory containing the package's main library, which
|
|
||||||
defaults to `$(TOPDIR)/lib`, `bin.mk` for `$(TOPDIR)/bin`, `include.mk` for
|
|
||||||
`$(TOPDIR)/include`, and `make.mk` for `$(TOPDIR)/make`. You should add them in
|
|
||||||
the same manner. Again, these are just default locations. Once you've added
|
|
||||||
those makefiles, running `make` will do - something. Try and see what happens.
|
|
||||||
Every snippet supports at least the targets `all`, `install`, `clean` and
|
|
||||||
`distclean`. The target `echo-makefiles` shows you all included snippets,
|
|
||||||
`cat-makefiles` concatenates them. Hitting TAB should show you all targets
|
|
||||||
supported in a particular directory.
|
|
||||||
|
|
||||||
Good luck!
|
|
||||||
|
|
||||||
## Advanced Usage, Custom Makefiles, Tips and Tricks, Things to Note
|
|
||||||
|
|
||||||
- JW-Build will use any `Makefile`, `makefile` or `GNUmakefile` it finds in the
|
|
||||||
toplevel directory of your package. It will `cd` into the toplevel directory
|
|
||||||
and run `make` during build runs, and subsequently `make install` during
|
|
||||||
installation runs. It will also run `make clean` if invoked from outside.
|
|
||||||
`make distclean` doesn't need to be supported, but comes in handy, if you
|
|
||||||
want your packages to be wiped extra-clean.
|
|
||||||
|
|
||||||
JW-Build will not run `make install` as the `root` user, and will therefore
|
|
||||||
expect you to use `$(INSTALL)` instead of `/usr/bin/install`, to which it is
|
|
||||||
command line compatible.
|
|
||||||
[pseudo](http://git.yoctoproject.org/cgit/cgit.cgi/pseudo) support is
|
|
||||||
underway and will allow to use plain `/usr/bin/install`, but is not yet
|
|
||||||
implemented.
|
|
||||||
|
|
||||||
- If you want GNU Make to do what it's designed for for your custom task, i.e.
|
|
||||||
do the right thing based on file modification times, do the following, for
|
|
||||||
example:
|
|
||||||
|
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
MY_CREATION_INPUT = $(wildcard *.tmpl)
|
|
||||||
MY_CREATION = $(patsubst %.tmpl,%,$(MY_CREATION_INPUT))
|
|
||||||
MY_INSTALL_DIR = $(ENV_PREFIX)/var/lib/my-creation
|
|
||||||
MY_INSTALLED_CREATION = $(addprefix $(MY_INSTALL_DIR)/,$(MY_CREATION))
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
all: $(MY_CREATION)
|
|
||||||
install: $(MY_INSTALLED_CREATION)
|
|
||||||
clean: clean.my-creation
|
|
||||||
distclean: clean
|
|
||||||
|
|
||||||
%: %.tmpl
|
|
||||||
bash ./my-special-stuff-creator.sh $< > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
clean.my-creation:
|
|
||||||
rm -f $(MY_CREATION) *.tmp
|
|
||||||
$(MY_INSTALL_DIR):
|
|
||||||
$(INSTALL) -o root -g root -m 755 -d $@
|
|
||||||
$(MY_INSTALL_DIR)/%: % | $(MY_INSTALL_DIR)
|
|
||||||
$(INSTALL) -o root -g root -m 644 $< $@
|
|
||||||
|
|
||||||
Things to note:
|
|
||||||
- If the example seems too verbose for you, consider putting the code into
|
|
||||||
`$(TOPDIR)/make/my-creation.mk` (for example) and `include` that.
|
|
||||||
- `defs.mk` doesn't provide any targets, but only defines central variables.
|
|
||||||
It's implicitly included with most snippets, but if you want to define your
|
|
||||||
own tasks, you can use it directly.
|
|
||||||
- The `MY_XXX` variables have arbitrary names and are not evaluated by
|
|
||||||
JW-Build.
|
|
||||||
- `$(ENV_PREFIX)` will automatically point to something below your home
|
|
||||||
directory if invoked from a package which has `.git`, `.svn` or `CVS` in its
|
|
||||||
toplevel directory, and to the proper target root during package creation.
|
|
||||||
- Using the intermediate `$@.tmp` is a good idea in case
|
|
||||||
`my-special-stuff-creator.sh` can fail.
|
|
||||||
- See `info make` for how pattern rules work (`%`), what the `|` pipe -
|
|
||||||
symbol is for and all that jazz. If you don't know already.
|
|
||||||
|
|
||||||
- If you want to add arbitrary tasks to the build run, consider the following
|
|
||||||
makefile:
|
|
||||||
```
|
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
all: my-task.done
|
|
||||||
clean: clean.my-task
|
|
||||||
|
|
||||||
my-task.done:
|
|
||||||
cd $(SUBMOD_SRC_DIR) && mvn -DskipTests --settings ../maven-settings.xml
|
|
||||||
touch $@
|
|
||||||
clean.my-task:
|
|
||||||
rm -rf $(addprefix $(SUBMOD_SRC_DIR)/,dependency-reduced-pom.xml externs/target target) $(SOURCE_BASE)
|
|
||||||
rm -f *.done
|
|
||||||
```
|
|
||||||
[logo]: https://janware.com/janware/images/logo-janware/logo-janware-200.png
|
|
||||||
35
bin/Makefile
35
bin/Makefile
|
|
@ -1,35 +0,0 @@
|
||||||
########################################################################
|
|
||||||
# #
|
|
||||||
# development utilities #
|
|
||||||
# (c) 2001 jannet it services #
|
|
||||||
# Authors: Jan Lindemann #
|
|
||||||
# contact@jannet.de #
|
|
||||||
# patches, bugfixes and comments are welcome at patch@jannet.de #
|
|
||||||
# #
|
|
||||||
# $Id$
|
|
||||||
# #
|
|
||||||
# This program is free software; permission to use, copy, modify, #
|
|
||||||
# distribute, and sell this software and its documentation under the #
|
|
||||||
# terms of the GNU Public license as published by the Free Software #
|
|
||||||
# Foundation, either version 2 or any later version of the license, is #
|
|
||||||
# hereby granted without fee, provided that (i) the above copyright #
|
|
||||||
# notices and this permission notice appear in all copies of the #
|
|
||||||
# software and related documentation, and (ii) the name of jannet may #
|
|
||||||
# not be used in any advertising or publicity relating to the software #
|
|
||||||
# without the specific, prior written permission of jannet. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but #
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- #
|
|
||||||
# TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General #
|
|
||||||
# Public License for more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License #
|
|
||||||
# along with this program; if not, write to the Free Software Founda- #
|
|
||||||
# tion, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
|
|
||||||
# #
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/bin.mk
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/dirs.mk
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
INSTALL_CFGDIR = $(ENV_PREFIX)/etc
|
|
||||||
CFGMODE = 644
|
|
||||||
LOCAL_CFG = jw-rc.status
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/conf.mk
|
|
||||||
|
|
||||||
|
|
@ -1,463 +0,0 @@
|
||||||
# /etc/rc.status
|
|
||||||
# vim: syntax=sh
|
|
||||||
# Definition of boot script return messages
|
|
||||||
#
|
|
||||||
# The bootscripts should use the variables rc_done and rc_failed to
|
|
||||||
# report whether they failed or succeeded. See /etc/init.d/skeleton for
|
|
||||||
# an example how the shell functions rc_status and rc_reset are used.
|
|
||||||
#
|
|
||||||
# These functions make use of the variables rc_done and rc_failed;
|
|
||||||
# rc_done_up and rc_failed_up are the same as rc_done and rc_failed
|
|
||||||
# but contain a terminal code to move up one line before the output
|
|
||||||
# of the actual string. (This is particularly useful when the script
|
|
||||||
# starts a daemon which produces user output with a newline character)
|
|
||||||
#
|
|
||||||
# The variable rc_reset is used by the master resource control script
|
|
||||||
# /etc/init.d/rc to turn off all attributes and switch to the standard
|
|
||||||
# character set.
|
|
||||||
#
|
|
||||||
# \033 ascii ESCape
|
|
||||||
# \033[<NUM>G move to column <NUM> (linux console, xterm, not vt100)
|
|
||||||
# \033[<NUM>C move <NUM> columns forward but only upto last column
|
|
||||||
# \033[<NUM>D move <NUM> columns backward but only upto first column
|
|
||||||
# \033[<NUM>A move <NUM> rows up
|
|
||||||
# \033[<NUM>B move <NUM> rows down
|
|
||||||
# \033[1m switch on bold
|
|
||||||
# \033[31m switch on red
|
|
||||||
# \033[32m switch on green
|
|
||||||
# \033[33m switch on yellow
|
|
||||||
# \033[m switch off color/bold
|
|
||||||
# \017 exit alternate mode (xterm, vt100, linux console)
|
|
||||||
# \033[10m exit alternate mode (linux console)
|
|
||||||
# \015 carriage return (without newline)
|
|
||||||
#
|
|
||||||
|
|
||||||
# Check if the service is used under systemd but not started with
|
|
||||||
if test -z "$SYSTEMD_NO_WRAP" && /usr/bin/mountpoint -q /sys/fs/cgroup/systemd; then
|
|
||||||
if test $PPID -ne 1 -a $# -eq 1 ; then
|
|
||||||
_rc_base=
|
|
||||||
_sd_opts=
|
|
||||||
case "$0" in
|
|
||||||
/etc/init.d/boot.*)
|
|
||||||
_rc_base=${0##*/boot.} ;;
|
|
||||||
/etc/init.d/*|/etc/rc.d/*)
|
|
||||||
_rc_base=${0##*/} ;;
|
|
||||||
*/rc*)
|
|
||||||
if test -L "$0"; then
|
|
||||||
_rc_base=`readlink "$0"`
|
|
||||||
_rc_base=${_rc_base##*/}
|
|
||||||
case "$_rc_base" in
|
|
||||||
boot.*) _rc_base=${_rc_base#boot.}
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
_rc_base=${0##*/rc}
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
_rc_system=$(/usr/bin/systemctl show --system --no-pager -p NeedDaemonReload \
|
|
||||||
-p UnitFileState -p LoadState "${_rc_base}.service" 2>/dev/null)
|
|
||||||
case "$_rc_system" in
|
|
||||||
*LoadState=masked*)
|
|
||||||
echo "Error: ${_rc_base} is masked out and forbidden by systemd" 1>&2
|
|
||||||
exit 2 ;;
|
|
||||||
*UnitFileState=static*)
|
|
||||||
echo "Skipped: ${_rc_base} is overwritten by a native systemd unit" 1>&2
|
|
||||||
exit 2 ;;
|
|
||||||
*NeedDaemonReload=yes*)
|
|
||||||
/usr/bin/systemctl --system --no-pager daemon-reload
|
|
||||||
esac
|
|
||||||
unset _rc_system
|
|
||||||
case "$1" in
|
|
||||||
status)
|
|
||||||
SYSTEMD_NO_WRAP=1 "$0" "$1"
|
|
||||||
_sd_opts='--lines=0 --full --output=cat'
|
|
||||||
;;
|
|
||||||
start|stop|reload|restart|try-restart|force-reload)
|
|
||||||
echo "redirecting to systemctl $1 ${_rc_base}.service" 1>&2
|
|
||||||
_sd_opts='--ignore-dependencies'
|
|
||||||
;;
|
|
||||||
*) unset _rc_base
|
|
||||||
esac
|
|
||||||
if test -n "$_rc_base" -a -x /usr/bin/systemctl ; then
|
|
||||||
exec /usr/bin/systemctl $_sd_opts $1 "${_rc_base}.service"
|
|
||||||
fi
|
|
||||||
unset _rc_base _sd_opts
|
|
||||||
fi
|
|
||||||
if test -z "$REDIRECT" -a -x /sbin/showconsole ; then
|
|
||||||
REDIRECT="$(/sbin/showconsole 2>/dev/null)"
|
|
||||||
test -z "$CONSOLE" && CONSOLE=/dev/console
|
|
||||||
export REDIRECT CONSOLE
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Do _not_ be fooled by non POSIX locale
|
|
||||||
LC_ALL=POSIX
|
|
||||||
export LC_ALL
|
|
||||||
|
|
||||||
# Seek for terminal size and, if needed, set default size
|
|
||||||
rc_lc () {
|
|
||||||
if test -n "$REDIRECT" ; then
|
|
||||||
set -- $(stty size < "$REDIRECT" 2> /dev/null || echo 0 0)
|
|
||||||
else
|
|
||||||
set -- $(stty size 2> /dev/null || echo 0 0)
|
|
||||||
fi
|
|
||||||
LINES=$1
|
|
||||||
COLUMNS=$2
|
|
||||||
if test $LINES -eq 0 -o $COLUMNS -eq 0; then
|
|
||||||
LINES=24
|
|
||||||
COLUMNS=80
|
|
||||||
TERM=dumb
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
trap 'rc_lc' SIGWINCH
|
|
||||||
test -n "$COLUMNS" -a -n "$LINES" || rc_lc
|
|
||||||
export LINES COLUMNS
|
|
||||||
|
|
||||||
# Make sure we have /sbin and /usr/sbin in PATH
|
|
||||||
case ":$PATH:" in
|
|
||||||
*:/sbin:*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
|
|
||||||
export PATH
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test -t 1 -a "$TERM" != "raw" -a "$TERM" != "dumb"; then
|
|
||||||
esc=`echo -en "\033"`
|
|
||||||
extd="${esc}[1m"
|
|
||||||
warn="${esc}[1;31m"
|
|
||||||
done="${esc}[1;32m"
|
|
||||||
attn="${esc}[1;33m"
|
|
||||||
norm=`echo -en "${esc}[m\017"`
|
|
||||||
stat=`echo -en "\015${esc}[${COLUMNS}C${esc}[10D"`
|
|
||||||
|
|
||||||
rc_done="${stat}${done}done${norm}"
|
|
||||||
rc_running="${stat}${done}running${norm}"
|
|
||||||
rc_failed="${stat}${warn}failed${norm}"
|
|
||||||
rc_missed="${stat}${warn}missing${norm}"
|
|
||||||
rc_skipped="${stat}${attn}skipped${norm}"
|
|
||||||
rc_dead="${stat}${warn}dead${norm}"
|
|
||||||
rc_unused="${stat}${extd}unused${norm}"
|
|
||||||
rc_unknown="${stat}${attn}unknown${norm}"
|
|
||||||
rc_done_up="${esc}[1A${rc_done}"
|
|
||||||
rc_failed_up="${esc}[1A${rc_failed}"
|
|
||||||
rc_reset="${norm}${esc}[?25h"
|
|
||||||
rc_save="${esc}7${esc}[?25l"
|
|
||||||
rc_restore="${esc}8${esc}[?25h"
|
|
||||||
rc_cuu () { test $1 -eq 0 && return; echo -en "\033[${1}A"; }
|
|
||||||
rc_cud () { test $1 -eq 0 && return; echo -en "\033[${1}B"; }
|
|
||||||
rc_timer_on () {
|
|
||||||
# Draw seconds of running timout to column.
|
|
||||||
# Two arguments: timeout in seconds and offset
|
|
||||||
local n=$1
|
|
||||||
local c=$2
|
|
||||||
(trap "exit 0" SIGTERM
|
|
||||||
while test $((n--)) -gt 0; do
|
|
||||||
sleep 1;
|
|
||||||
if test $n -gt 9 ; then
|
|
||||||
echo -en "\015${esc}[${c}C(${n}s) "
|
|
||||||
else
|
|
||||||
echo -en "\015${esc}[${c}C( ${n}s) "
|
|
||||||
fi
|
|
||||||
done) & _rc_timer_pid=$!
|
|
||||||
}
|
|
||||||
rc_timer_off () {
|
|
||||||
if test -n "$_rc_timer_pid" ; then
|
|
||||||
kill -TERM $_rc_timer_pid > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
unset _rc_timer_pid
|
|
||||||
}
|
|
||||||
else
|
|
||||||
esc=""
|
|
||||||
extd=""
|
|
||||||
warn=""
|
|
||||||
done=""
|
|
||||||
attn=""
|
|
||||||
norm=""
|
|
||||||
stat=""
|
|
||||||
|
|
||||||
rc_done="..done"
|
|
||||||
rc_running="..running"
|
|
||||||
rc_failed="..failed"
|
|
||||||
rc_missed="..missing"
|
|
||||||
rc_skipped="..skipped"
|
|
||||||
rc_dead="..dead"
|
|
||||||
rc_unused="..unused"
|
|
||||||
rc_unknown="..unknown"
|
|
||||||
rc_done_up="${rc_done}"
|
|
||||||
rc_failed_up="${rc_failed}"
|
|
||||||
rc_reset=""
|
|
||||||
rc_save=""
|
|
||||||
rc_restore=""
|
|
||||||
rc_cuu () { return; }
|
|
||||||
rc_cud () { return; }
|
|
||||||
rc_timer_on () { return; }
|
|
||||||
rc_timer_off () { return; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
_rc_service=${0##*/[SK][0-9][0-9]}
|
|
||||||
_rc_status=0
|
|
||||||
_rc_status_all=0
|
|
||||||
_rc_todo=$1
|
|
||||||
|
|
||||||
rc_check ()
|
|
||||||
{
|
|
||||||
_rc_status_ret=$?
|
|
||||||
test $_rc_status_ret -eq 0 || _rc_status=$_rc_status_ret
|
|
||||||
test $_rc_status -eq 0 || _rc_status_all=$_rc_status
|
|
||||||
return $_rc_status_ret
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_reset ()
|
|
||||||
{
|
|
||||||
_rc_status=0
|
|
||||||
_rc_status_all=0
|
|
||||||
rc_check
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if test "$_rc_todo" = "status" ; then
|
|
||||||
rc_status ()
|
|
||||||
{
|
|
||||||
rc_check
|
|
||||||
_rc_status_ret=$_rc_status
|
|
||||||
local i
|
|
||||||
for i ; do
|
|
||||||
case "$i" in
|
|
||||||
-v|-v[1-9]|-v[1-9][0-9])
|
|
||||||
local vrt=""
|
|
||||||
local out=1
|
|
||||||
local opt="en"
|
|
||||||
|
|
||||||
test -n "${i#-v}" && vrt=${esc:+"${esc}[${i#-v}A"} || opt="e"
|
|
||||||
case "$_rc_status" in
|
|
||||||
0) vrt="$vrt$rc_running"; ;; # service running
|
|
||||||
1) vrt="$vrt$rc_dead" ; out=2 ;; # service dead (but has pid file)
|
|
||||||
2) vrt="$vrt$rc_dead" ; out=2 ;; # service dead (but has lock file)
|
|
||||||
3) vrt="$vrt$rc_unused" ; ;; # service not running
|
|
||||||
4) vrt="$vrt$rc_unknown"; ;; # status is unknown
|
|
||||||
esac
|
|
||||||
echo -$opt "$rc_save$vrt$rc_restore" 1>&$out
|
|
||||||
|
|
||||||
# reset _rc_status to 0 after verbose case
|
|
||||||
_rc_status=0 ;;
|
|
||||||
-r) rc_reset ;;
|
|
||||||
-s) echo -e "$rc_skipped" ; rc_failed 3 ;;
|
|
||||||
-u) echo -e "$rc_unused" ; rc_failed 3 ;;
|
|
||||||
*) echo "rc_status: Usage: [-v[<num>] [-r]|-s|-u]" 1>&2 ; return 0 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
return $_rc_status_ret
|
|
||||||
}
|
|
||||||
elif test -n "$_rc_todo" ; then
|
|
||||||
rc_status ()
|
|
||||||
{
|
|
||||||
rc_check
|
|
||||||
test "$_rc_status" -gt 7 && rc_failed 1
|
|
||||||
_rc_status_ret=$_rc_status
|
|
||||||
case "$_rc_todo" in
|
|
||||||
stop)
|
|
||||||
# program is not running which
|
|
||||||
# is success if we stop service
|
|
||||||
test "$_rc_status" -eq 7 && rc_failed 0 ;;
|
|
||||||
esac
|
|
||||||
local i
|
|
||||||
for i ; do
|
|
||||||
case "$i" in
|
|
||||||
-v|-v[1-9]|-v[1-9][0-9])
|
|
||||||
local vrt=""
|
|
||||||
local out=1
|
|
||||||
local opt="en"
|
|
||||||
|
|
||||||
test -n "${i#-v}" && vrt=${esc:+"${esc}[${i#-v}A"} || opt="e"
|
|
||||||
case "$_rc_status" in
|
|
||||||
0) vrt="$vrt$rc_done" ; ;; # success
|
|
||||||
1) vrt="$vrt$rc_failed" ; out=2 ;; # generic or unspecified error
|
|
||||||
2) vrt="$vrt$rc_failed" ; out=2 ;; # invalid or excess args
|
|
||||||
3) vrt="$vrt$rc_missed" ; out=2 ;; # unimplemented feature
|
|
||||||
4) vrt="$vrt$rc_failed" ; out=2 ;; # insufficient privilege
|
|
||||||
5) vrt="$vrt$rc_skipped"; out=2 ;; # program is not installed
|
|
||||||
6) vrt="$vrt$rc_unused" ; out=2 ;; # program is not configured
|
|
||||||
7) vrt="$vrt$rc_failed" ; out=2 ;; # program is not running
|
|
||||||
*) vrt="$vrt$rc_failed" ; out=2 ;; # unknown (maybe used in future)
|
|
||||||
esac
|
|
||||||
echo -$opt "$rc_save$vrt$rc_restore" 1>&$out
|
|
||||||
|
|
||||||
# reset _rc_status to 0 after verbose case
|
|
||||||
_rc_status=0 ;;
|
|
||||||
-r) rc_reset ;;
|
|
||||||
-s) echo -e "$rc_skipped" 1>&2 ; rc_failed 5 ;;
|
|
||||||
-u) echo -e "$rc_unused" 1>&2 ; rc_failed 6 ;;
|
|
||||||
*) echo "rc_status: Usage: [-v[<num>] [-r]|-s|-u]" 1>&2 ; return 0 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
return $_rc_status_ret
|
|
||||||
}
|
|
||||||
else
|
|
||||||
rc_status ()
|
|
||||||
{
|
|
||||||
rc_check
|
|
||||||
_rc_status_ret=$_rc_status
|
|
||||||
local i
|
|
||||||
for i ; do
|
|
||||||
case "$i" in
|
|
||||||
-v|-v[1-9]|-v[1-9][0-9])
|
|
||||||
local vrt=""
|
|
||||||
local out=1
|
|
||||||
local opt="en"
|
|
||||||
|
|
||||||
test -n "${i#-v}" && vrt=${esc:+"${esc}[${i#-v}A"} || opt="e"
|
|
||||||
case "$_rc_status" in
|
|
||||||
0) vrt="$vrt$rc_done" ; ;; # success
|
|
||||||
*) vrt="$vrt$rc_failed"; out=2 ;; # failed
|
|
||||||
esac
|
|
||||||
echo -$opt "$rc_save$vrt$rc_restore" 1>&$out
|
|
||||||
|
|
||||||
# reset _rc_status to 0 after verbose case
|
|
||||||
_rc_status=0 ;;
|
|
||||||
-r) rc_reset ;;
|
|
||||||
-s) echo -e "$rc_skipped" ; return 0 ;;
|
|
||||||
-u) echo -e "$rc_unused" ; return 0 ;;
|
|
||||||
*) echo "rc_status: Usage: [-v[<num>] [-r]|-s|-u]" 1>&2 ; return 0 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
return $_rc_status_ret
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
rc_failed ()
|
|
||||||
{
|
|
||||||
rc_reset
|
|
||||||
case "$1" in
|
|
||||||
[0-7]) _rc_status=$1 ;;
|
|
||||||
"") _rc_status=1
|
|
||||||
esac
|
|
||||||
rc_check
|
|
||||||
return $_rc_status
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_exit ()
|
|
||||||
{
|
|
||||||
exit $_rc_status_all
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_confirm()
|
|
||||||
{
|
|
||||||
local timeout="30"
|
|
||||||
local answer=""
|
|
||||||
local ret=0
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
-t) timeout=$2; shift 2 ;;
|
|
||||||
esac
|
|
||||||
local message="$@, (Y)es/(N)o/(C)ontinue? [y] "
|
|
||||||
: ${REDIRECT:=/dev/tty}
|
|
||||||
|
|
||||||
while true ; do
|
|
||||||
read -t ${timeout} -n 1 -p "${message}" answer < $REDIRECT > $REDIRECT 2>&1
|
|
||||||
case "$answer" in
|
|
||||||
[yY]|"") ret=0; break ;;
|
|
||||||
[nN]) ret=1; break ;;
|
|
||||||
[cC]) ret=2; break ;;
|
|
||||||
*) echo; continue
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
return $ret
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_active ()
|
|
||||||
{
|
|
||||||
local link
|
|
||||||
for link in /etc/init.d/*.d/S[0-9][0-9]${1} ; do
|
|
||||||
test -e $link || break
|
|
||||||
return 0
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_splash()
|
|
||||||
{
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Wait between last SIGTERM and the next SIGKILL
|
|
||||||
# any argument specify a *path* of a process which
|
|
||||||
# process identity should *not* be checked.
|
|
||||||
rc_wait()
|
|
||||||
{
|
|
||||||
local -i etime=$SECONDS
|
|
||||||
|
|
||||||
if test -f /fastboot ; then
|
|
||||||
let etime+=2
|
|
||||||
else
|
|
||||||
let etime+=6
|
|
||||||
fi
|
|
||||||
|
|
||||||
local -i pid
|
|
||||||
local -i ppid=$$
|
|
||||||
local comm state rest
|
|
||||||
local parent_processes="$ppid"
|
|
||||||
|
|
||||||
while test $ppid -gt 1; do
|
|
||||||
read -t 1 pid comm state ppid rest < /proc/$ppid/stat
|
|
||||||
parent_processes="${parent_processes:+$parent_processes:}${ppid}"
|
|
||||||
done
|
|
||||||
for comm ; do
|
|
||||||
test -s $comm || continue
|
|
||||||
ppid="$(/sbin/pidofproc $comm 2> /dev/null)" || continue
|
|
||||||
parent_processes="${parent_processes:+$parent_processes:}${ppid}"
|
|
||||||
done
|
|
||||||
unset comm state ppid rest
|
|
||||||
|
|
||||||
local -i busy
|
|
||||||
while test $SECONDS -lt $etime; do
|
|
||||||
let busy=0
|
|
||||||
for proc in /proc/[0-9]* ; do
|
|
||||||
test -e $proc/exe || continue
|
|
||||||
let pid=${proc##*/}
|
|
||||||
case ":${parent_processes}:" in
|
|
||||||
*:${pid}:*) continue
|
|
||||||
esac
|
|
||||||
let busy=pid
|
|
||||||
break
|
|
||||||
done
|
|
||||||
test $busy -ne 0 || return 0
|
|
||||||
usleep 500000
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_runlevel()
|
|
||||||
{
|
|
||||||
test -z "$RUNLEVEL" || return
|
|
||||||
set -- $(/sbin/runlevel)
|
|
||||||
PREVLEVEL=$1
|
|
||||||
RUNLEVEL=$2
|
|
||||||
export PREVLEVEL RUNLEVEL
|
|
||||||
}
|
|
||||||
|
|
||||||
cmdline=""
|
|
||||||
rc_cmdline()
|
|
||||||
{
|
|
||||||
local arg cmd key val
|
|
||||||
test -e /proc/cmdline || mount -nt proc proc /proc
|
|
||||||
test -n "$cmdline" || read -t 2 cmdline < /proc/cmdline
|
|
||||||
for arg; do
|
|
||||||
for cmd in $cmdline ; do
|
|
||||||
key="${cmd%%=*}"
|
|
||||||
key="${key//-/_}"
|
|
||||||
case "${key}" in
|
|
||||||
$arg)
|
|
||||||
case "$cmd" in
|
|
||||||
*=*) val="${cmd#*=}" ;;
|
|
||||||
*) val=yes
|
|
||||||
esac
|
|
||||||
echo $key=$val
|
|
||||||
return 0
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
SUBTREE_INSTALL_PREFIX ?= /etc/jcs
|
|
||||||
SUBTREE_FILES += ./templates/dir/module/Makefile ./templates/dir/src/Makefile
|
|
||||||
SUBTREE_DIRS += $(sort $(dir $(SUBTREE_FILES)))
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/subtree.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
jcs_dir=$HOME/local/src/jw.dev/conf/`sed 's|\([^.]\+\)\.\(.*\)|\2/\1|' /etc/hostname`/`/opt/jw-build/bin/get-os.sh`
|
|
||||||
jcs_owner=root
|
|
||||||
jcs_group=root
|
|
||||||
jcs_log_dir=$jcs_dir/log
|
|
||||||
jcs_file_extension=inf
|
|
||||||
use_checksum=false
|
|
||||||
update_checksum_command="/home/tripwire/bin/fs_checksum.sh update"
|
|
||||||
jcs_http_path=http://www.jannet.de
|
|
||||||
122
conf/jcs/jcs.mk
122
conf/jcs/jcs.mk
|
|
@ -1,122 +0,0 @@
|
||||||
SHELL = /bin/sh
|
|
||||||
|
|
||||||
WD := $(shell pwd)
|
|
||||||
MOD := $(shell pwd | xargs basename)
|
|
||||||
LOG_DIR := $(shell . /etc/jcs/jcs.conf; echo $$jcs_log_dir)
|
|
||||||
INSTALL_LOG := $(LOG_DIR)/install.log
|
|
||||||
SETUP_LOG := $(LOG_DIR)/setup.log
|
|
||||||
TEE := /usr/bin/tee
|
|
||||||
BINDIR := /usr/local/bin
|
|
||||||
SBINDIR := /usr/local/bin
|
|
||||||
INF := $(wildcard *.inf)
|
|
||||||
INF_DONE := $(addsuffix .done,$(basename $(INF)))
|
|
||||||
INF_SU_DONE := $(addsuffix .su_done,$(basename $(INF)))
|
|
||||||
JCS_HTTP_PATH := $(shell . /etc/jcs/jcs.conf; echo $$jcs_http_path)
|
|
||||||
JCS = /opt/jw-build/bin/jcs
|
|
||||||
|
|
||||||
export SETUP_LOG INSTALL_LOG TEE BINDIR SBINDIR
|
|
||||||
|
|
||||||
all:
|
|
||||||
|
|
||||||
define recurse_subdirs
|
|
||||||
@set -e ;\
|
|
||||||
TARGET=$@ ;\
|
|
||||||
N="`echo $(SUBDIRS) | wc -w`" ;\
|
|
||||||
I=1 ;\
|
|
||||||
while [ $$I -le $$N ] ; do \
|
|
||||||
SUBDIR="`echo $(SUBDIRS) | cut -d' ' -f$$I`" ;\
|
|
||||||
$(MAKE) -C $$SUBDIR $$TARGET;\
|
|
||||||
I=`expr $$I + 1`;\
|
|
||||||
done
|
|
||||||
endef
|
|
||||||
|
|
||||||
%.done: %.inf
|
|
||||||
sudo $(JCS) install $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%.su_done: %.inf
|
|
||||||
sudo $(JCS) install -b setup -f $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
install_inf: $(INF_DONE)
|
|
||||||
|
|
||||||
install_inf.old: checkroot checkdirs
|
|
||||||
@echo "####" checking installation information files ... ;\
|
|
||||||
if [ -n "`find . -name '*.inf' -maxdepth 1`" ] ; then \
|
|
||||||
sudo $(JCS) install *.inf ;\
|
|
||||||
fi | $(TEE) -a $(INSTALL_LOG)
|
|
||||||
|
|
||||||
install_link:
|
|
||||||
|
|
||||||
install_link.old: checkroot checkdirs
|
|
||||||
@echo "####" checking link information files ... ;\
|
|
||||||
if [ -e link.sh ] ; then \
|
|
||||||
$(JCS) linkout link.sh -b install ;\
|
|
||||||
fi | $(TEE) -a $(INSTALL_LOG)
|
|
||||||
|
|
||||||
setup_inf: $(INF_SU_DONE)
|
|
||||||
|
|
||||||
setup_inf.old: checkroot checkdirs
|
|
||||||
@echo "####" checking installation information files ... ;\
|
|
||||||
if [ -n "`find . -name '*.inf' -maxdepth 1`" ] ; then \
|
|
||||||
sudo $(JCS) install -b setup -f *.inf ;\
|
|
||||||
fi | $(TEE) -a $(SETUP_LOG)
|
|
||||||
|
|
||||||
setup_link: checkroot checkdirs
|
|
||||||
@echo "####" checking link information files ... ;\
|
|
||||||
if [ -e link.sh ] ; then \
|
|
||||||
$(JCS) linkout -f -b setup link.sh ;\
|
|
||||||
fi | $(TEE) -a $(SETUP_LOG)
|
|
||||||
|
|
||||||
test_inf: checkdirs
|
|
||||||
@echo "####" testing installation information files ... ;\
|
|
||||||
if [ -n "`find . -name '*.inf' -maxdepth 1`" ] ; then \
|
|
||||||
sudo $(JCS) install *.inf -t ;\
|
|
||||||
fi | $(TEE) -a $(INSTALL_LOG)
|
|
||||||
|
|
||||||
test_link: checkdirs
|
|
||||||
@echo "####" testing link information files ... ;\
|
|
||||||
if [ -e link.sh ] ; then \
|
|
||||||
$(JCS) linkout -t link.sh ;\
|
|
||||||
fi | $(TEE) -a $(INSTALL_LOG)
|
|
||||||
|
|
||||||
get: checkdirs
|
|
||||||
@echo "####" getting files. ;\
|
|
||||||
if [ -n "$(GETFILES)" ] ; then $(JCS) get $(GETFILES) ; fi
|
|
||||||
|
|
||||||
getall: $(LOCAL_GET) get $(LOCAL_POST_GET)
|
|
||||||
$(recurse_subdirs)
|
|
||||||
|
|
||||||
checksum: checkroot # TODO integrate tripwire
|
|
||||||
@if [ "$$cfg_use_checksum" = TRUE ] ; then \
|
|
||||||
echo "####" updating checksum database ... ;\
|
|
||||||
$$update_checksum_command ;\
|
|
||||||
fi
|
|
||||||
|
|
||||||
install: checkroot $(LOCAL_INSTALL) install_inf install_link $(LOCAL_POST_INSTALL) checksum
|
|
||||||
$(recurse_subdirs)
|
|
||||||
|
|
||||||
setup: checkroot $(LOCAL_SETUP) setup_inf setup_link $(LOCAL_POST_SETUP) checksum
|
|
||||||
$(recurse_subdirs)
|
|
||||||
|
|
||||||
test: $(LOCAL_TEST) test_inf test_link $(LOCAL_POST_TEST)
|
|
||||||
$(recurse_subdirs)
|
|
||||||
|
|
||||||
dist: clean
|
|
||||||
cd ..;\
|
|
||||||
find $(MOD) -type f -o -type l | \
|
|
||||||
grep -ve "CVS\|trash\|$(MOD)/setup" | \
|
|
||||||
xargs tar -cvzf $(MOD).tar.gz ;\
|
|
||||||
mv $(MOD).tar.gz $(MOD)
|
|
||||||
|
|
||||||
checkroot:
|
|
||||||
# @if [ `whoami` != root ] ; then echo "Only root can do this." >&2; exit 1; fi
|
|
||||||
|
|
||||||
checkdirs:
|
|
||||||
@test -f /etc/jcs/jcs.conf || exit 1 ;\
|
|
||||||
test -d `dirname $(SETUP_LOG)` || mkdir -p `dirname $(SETUP_LOG)` ;\
|
|
||||||
test -d `dirname $(INSTALL_LOG)` || mkdir -p `dirname $(INSTALL_LOG)`
|
|
||||||
|
|
||||||
clean: $(LOCAL_CLEAN)
|
|
||||||
$(recurse_subdirs) ;\
|
|
||||||
rm -f *~ *.swp *.rep .\#* *.done *.su_done $(MOD).tar.gz default.cache 2>/dev/null
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
# jannet configuration shadow
|
|
||||||
# (c) 2000 - 2001 jannet
|
|
||||||
# contact@jannet.de
|
|
||||||
|
|
||||||
include /etc/jcs/jcs.mk
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
# jannet configuration shadow
|
|
||||||
# (c) 2000 jannet
|
|
||||||
# contact@jannet.de
|
|
||||||
MAKE_SH := jcs smake
|
|
||||||
|
|
||||||
SUBDIRS = cur
|
|
||||||
|
|
||||||
setup:
|
|
||||||
$(MAKE_SH) setup $(SUBDIRS)
|
|
||||||
|
|
||||||
install:
|
|
||||||
$(MAKE_SH) install $(SUBDIRS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE_SH) clean $(SUBDIRS)
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/profile.mk
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
. /etc/jcs/jcs.conf
|
|
||||||
alias cdc="cd $jcs_dir"
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
CVSROOT=:ext:`whoami`@cvs.janware.com:/srv/cvs
|
|
||||||
CVS_RSH=/opt/jw-build/bin/jw-build-ssh.sh
|
|
||||||
export CVSROOT CVS_RSH
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
if [ -z "$PATH" ]; then
|
|
||||||
PATH=/opt/jw-build/bin
|
|
||||||
else
|
|
||||||
PATH=$PATH:/opt/jw-build/bin
|
|
||||||
fi
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
SUBDIRS = licenses
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/dirs.mk
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
JW-Build Design Goals
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
o Command-line and script friendly
|
|
||||||
o Self-contained, self-building
|
|
||||||
o Requires GNU-Make, Bash and Python
|
|
||||||
o Minimally invasive (3-liner Makefiles, if any at all)
|
|
||||||
o Support for cross compilation
|
|
||||||
o Sensible defaults, easily and flexibly customizable to build anything
|
|
||||||
o Allow changing into subdirectories for edit-compile-run cycles
|
|
||||||
o Build artifact caching (object files, packages)
|
|
||||||
o Work identically with and without installation
|
|
||||||
o Allow remote installation of packages
|
|
||||||
o Integration into versioning and packaging of corporate development workflow
|
|
||||||
o Allow inter-package dependencies to be coded, in-house and 3rd party
|
|
||||||
o Work with minimal documentation (i.e.: "Run make on janware.com/Makefile!")
|
|
||||||
o No undocumented steps
|
|
||||||
o Allow user privilege separation
|
|
||||||
o Allow web iterfaces for viewing
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
INSTALL_DOCDIR = $(DOC_PREFIX)/licenses
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/doc.mk
|
|
||||||
|
|
@ -1,502 +0,0 @@
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 2.1, February 1999
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the Lesser GPL. It also counts
|
|
||||||
as the successor of the GNU Library Public License, version 2, hence
|
|
||||||
the version number 2.1.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Lesser General Public License, applies to some
|
|
||||||
specially designated software packages--typically libraries--of the
|
|
||||||
Free Software Foundation and other authors who decide to use it. You
|
|
||||||
can use it too, but we suggest you first think carefully about whether
|
|
||||||
this license or the ordinary General Public License is the better
|
|
||||||
strategy to use in any particular case, based on the explanations below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
|
||||||
not price. Our General Public Licenses are designed to make sure that
|
|
||||||
you have the freedom to distribute copies of free software (and charge
|
|
||||||
for this service if you wish); that you receive source code or can get
|
|
||||||
it if you want it; that you can change the software and use pieces of
|
|
||||||
it in new free programs; and that you are informed that you can do
|
|
||||||
these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
distributors to deny you these rights or to ask you to surrender these
|
|
||||||
rights. These restrictions translate to certain responsibilities for
|
|
||||||
you if you distribute copies of the library or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link other code with the library, you must provide
|
|
||||||
complete object files to the recipients, so that they can relink them
|
|
||||||
with the library after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
We protect your rights with a two-step method: (1) we copyright the
|
|
||||||
library, and (2) we offer you this license, which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
To protect each distributor, we want to make it very clear that
|
|
||||||
there is no warranty for the free library. Also, if the library is
|
|
||||||
modified by someone else and passed on, the recipients should know
|
|
||||||
that what they have is not the original version, so that the original
|
|
||||||
author's reputation will not be affected by problems that might be
|
|
||||||
introduced by others.
|
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
|
||||||
any free program. We wish to make sure that a company cannot
|
|
||||||
effectively restrict the users of a free program by obtaining a
|
|
||||||
restrictive license from a patent holder. Therefore, we insist that
|
|
||||||
any patent license obtained for a version of the library must be
|
|
||||||
consistent with the full freedom of use specified in this license.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the
|
|
||||||
ordinary GNU General Public License. This license, the GNU Lesser
|
|
||||||
General Public License, applies to certain designated libraries, and
|
|
||||||
is quite different from the ordinary General Public License. We use
|
|
||||||
this license for certain libraries in order to permit linking those
|
|
||||||
libraries into non-free programs.
|
|
||||||
|
|
||||||
When a program is linked with a library, whether statically or using
|
|
||||||
a shared library, the combination of the two is legally speaking a
|
|
||||||
combined work, a derivative of the original library. The ordinary
|
|
||||||
General Public License therefore permits such linking only if the
|
|
||||||
entire combination fits its criteria of freedom. The Lesser General
|
|
||||||
Public License permits more lax criteria for linking other code with
|
|
||||||
the library.
|
|
||||||
|
|
||||||
We call this license the "Lesser" General Public License because it
|
|
||||||
does Less to protect the user's freedom than the ordinary General
|
|
||||||
Public License. It also provides other free software developers Less
|
|
||||||
of an advantage over competing non-free programs. These disadvantages
|
|
||||||
are the reason we use the ordinary General Public License for many
|
|
||||||
libraries. However, the Lesser license provides advantages in certain
|
|
||||||
special circumstances.
|
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
|
||||||
encourage the widest possible use of a certain library, so that it becomes
|
|
||||||
a de-facto standard. To achieve this, non-free programs must be
|
|
||||||
allowed to use the library. A more frequent case is that a free
|
|
||||||
library does the same job as widely used non-free libraries. In this
|
|
||||||
case, there is little to gain by limiting the free library to free
|
|
||||||
software only, so we use the Lesser General Public License.
|
|
||||||
|
|
||||||
In other cases, permission to use a particular library in non-free
|
|
||||||
programs enables a greater number of people to use a large body of
|
|
||||||
free software. For example, permission to use the GNU C Library in
|
|
||||||
non-free programs enables many more people to use the whole GNU
|
|
||||||
operating system, as well as its variant, the GNU/Linux operating
|
|
||||||
system.
|
|
||||||
|
|
||||||
Although the Lesser General Public License is Less protective of the
|
|
||||||
users' freedom, it does ensure that the user of a program that is
|
|
||||||
linked with the Library has the freedom and the wherewithal to run
|
|
||||||
that program using a modified version of the Library.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, whereas the latter must
|
|
||||||
be combined with the library in order to run.
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
|
||||||
program which contains a notice placed by the copyright holder or
|
|
||||||
other authorized party saying it may be distributed under the terms of
|
|
||||||
this Lesser General Public License (also called "this License").
|
|
||||||
Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, complete source code means
|
|
||||||
all the source code for all modules it contains, plus any associated
|
|
||||||
interface definition files, plus the scripts used to control compilation
|
|
||||||
and installation of the library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that
|
|
||||||
you conspicuously and appropriately publish on each copy an
|
|
||||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
|
||||||
all the notices that refer to this License and to the absence of any
|
|
||||||
warranty; and distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
|
||||||
and you may at your option offer warranty protection in exchange for a
|
|
||||||
fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you accompany
|
|
||||||
it with the complete corresponding machine-readable source code, which
|
|
||||||
must be distributed under the terms of Sections 1 and 2 above on a
|
|
||||||
medium customarily used for software interchange.
|
|
||||||
|
|
||||||
If distribution of object code is made by offering access to copy
|
|
||||||
from a designated place, then offering equivalent access to copy the
|
|
||||||
source code from the same place satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (1) uses at run time a
|
|
||||||
copy of the library already present on the user's computer system,
|
|
||||||
rather than copying library functions into the executable, and (2)
|
|
||||||
will operate properly with a modified version of the library, if
|
|
||||||
the user installs one, as long as the modified version is
|
|
||||||
interface-compatible with the version that the work was made with.
|
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
e) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the materials to be distributed need not include anything that is
|
|
||||||
normally distributed (in either source or binary form) with the major
|
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
|
||||||
which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library is void, and will automatically terminate your
|
|
||||||
rights under this License. However, parties who have received copies,
|
|
||||||
or rights, from you under this License will not have their licenses
|
|
||||||
terminated so long as such parties remain in full compliance.
|
|
||||||
|
|
||||||
9. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties with
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply,
|
|
||||||
and the section as a whole is intended to apply in other circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License may add
|
|
||||||
an explicit geographical distribution limitation excluding those countries,
|
|
||||||
so that distribution is permitted only in or among countries not thus
|
|
||||||
excluded. In such case, this License incorporates the limitation as if
|
|
||||||
written in the body of this License.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser General Public License from time to time.
|
|
||||||
Such new versions will be similar in spirit to the present version,
|
|
||||||
but may differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Library
|
|
||||||
specifies a version number of this License which applies to it and
|
|
||||||
"any later version", you have the option of following the terms and
|
|
||||||
conditions either of that version or of any later version published by
|
|
||||||
the Free Software Foundation. If the Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
write to the author to ask for permission. For software which is
|
|
||||||
copyrighted by the Free Software Foundation, write to the Free
|
|
||||||
Software Foundation; we sometimes make exceptions for this. Our
|
|
||||||
decision will be guided by the two goals of preserving the free status
|
|
||||||
of all derivatives of our free software and of promoting the sharing
|
|
||||||
and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
|
||||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
||||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
||||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
|
||||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
|
||||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
|
||||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
|
||||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
|
||||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms of the
|
|
||||||
ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library. It is
|
|
||||||
safest to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/dummy.mk
|
|
||||||
|
|
@ -1,351 +0,0 @@
|
||||||
Index: make/rpmdist.mk
|
|
||||||
===================================================================
|
|
||||||
RCS file: /home/jannet/arc/cvs/proj/jw-build/make/rpmdist.mk,v
|
|
||||||
retrieving revision 1.137
|
|
||||||
diff -u -r1.137 rpmdist.mk
|
|
||||||
--- make/rpmdist.mk 8 Apr 2017 13:40:04 -0000 1.137
|
|
||||||
+++ make/rpmdist.mk 26 Jun 2017 10:23:07 -0000
|
|
||||||
@@ -73,7 +73,8 @@
|
|
||||||
# to be replaced by pkg.sh
|
|
||||||
RPM_REQUIRES_DEVEL += $(call proj_query, pkg-requires --dont-expand-version-macros $(PROJ_QUERY_PKG_REQUIRES_EXTRA_ARGS) devel $(PROJECT))
|
|
||||||
RPM_REQUIRES_RUN += $(call proj_query, pkg-requires --dont-expand-version-macros $(PROJ_QUERY_PKG_REQUIRES_EXTRA_ARGS) run $(PROJECT))
|
|
||||||
-#RPM_REQUIRES_DEVEL += $(RPM_PROJECT)-run = __NEXT_VERSION__
|
|
||||||
+RPM_CONFLICTS_DEVEL += $(call proj_query, pkg-conflicts --dont-expand-version-macros $(PROJ_QUERY_PKG_CONFLICTS_EXTRA_ARGS) devel $(PROJECT))
|
|
||||||
+RPM_CONFLICTS_RUN += $(call proj_query, pkg-conflicts --dont-expand-version-macros $(PROJ_QUERY_PKG_CONFLICTS_EXTRA_ARGS) run $(PROJECT))
|
|
||||||
|
|
||||||
RPM_UPLOAD_OS_NAME = $(shell echo $(OS_NAME_VERSION) | sed 's/-.*//')
|
|
||||||
RPM_UPLOAD_OS_VERSION = $(shell echo $(OS_NAME_VERSION) | sed 's/[^-]\+-//')
|
|
||||||
@@ -88,8 +89,9 @@
|
|
||||||
include $(JWBDIR)/make/upload-rules.mk
|
|
||||||
|
|
||||||
PKG_SH = $(PKG_SH_EXE) \
|
|
||||||
- -N $(RPM_PROJECT) \
|
|
||||||
- -R "$(RPM_REQUIRES_RUN)" -D "$(RPM_REQUIRES_DEVEL)" -P $(PROJECT) \
|
|
||||||
+ -N $(RPM_PROJECT) -P $(PROJECT) \
|
|
||||||
+ -R "$(RPM_REQUIRES_RUN)" -D "$(RPM_REQUIRES_DEVEL)" \
|
|
||||||
+ -X "$(RPM_CONFLICTS_RUN)" -Y "$(RPM_CONFLICTS_DEVEL)" \
|
|
||||||
-m $(JWB_SCRIPT_DIR) -a $(RPM_ARCH) -p $(DIST_PCKG_DIR) -F $(PKG_FORMAT) \
|
|
||||||
-B $(RPM_UPLOAD_URLPREFIX) -A $(RPM_UPLOAD_FILE_ATTRIB)
|
|
||||||
|
|
||||||
Index: scripts/create-mkdebian.sh
|
|
||||||
===================================================================
|
|
||||||
RCS file: /home/jannet/arc/cvs/proj/jw-build/scripts/create-mkdebian.sh,v
|
|
||||||
retrieving revision 1.22
|
|
||||||
diff -u -r1.22 create-mkdebian.sh
|
|
||||||
--- scripts/create-mkdebian.sh 13 Jan 2017 19:26:28 -0000 1.22
|
|
||||||
+++ scripts/create-mkdebian.sh 26 Jun 2017 10:23:07 -0000
|
|
||||||
@@ -55,6 +55,8 @@
|
|
||||||
Package: \$NAME-run
|
|
||||||
Architecture: any
|
|
||||||
Depends: \`format_depends "\${shlibs:Depends}, \${misc:Depends}, \$REQUIRES_RUN"\`
|
|
||||||
+# untested:
|
|
||||||
+Conflicts: \`format_depends "\${shlibs:Depends}, \${misc:Depends}, \$CONFLICTS_RUN"\`
|
|
||||||
Description: `cfg_value summary`
|
|
||||||
`cfg_value description | sed 's/^/ /'`
|
|
||||||
EOT
|
|
||||||
@@ -64,6 +66,8 @@
|
|
||||||
Package: \$NAME-devel
|
|
||||||
Architecture: any
|
|
||||||
Depends: \`format_depends "\$NAME-run = \$VERSION-\$RELEASE, \$REQUIRES_DEVEL"\`
|
|
||||||
+# untested:
|
|
||||||
+Conflicts: \`format_depends "\$NAME-run = \$VERSION-\$RELEASE, \$CONFLICTS_DEVEL"\`
|
|
||||||
Description: \$NAME Development Package
|
|
||||||
Development tools for \$NAME-run
|
|
||||||
EOT
|
|
||||||
Index: scripts/create-mkspec.sh
|
|
||||||
===================================================================
|
|
||||||
RCS file: /home/jannet/arc/cvs/proj/jw-build/scripts/create-mkspec.sh,v
|
|
||||||
retrieving revision 1.20
|
|
||||||
diff -u -r1.20 create-mkspec.sh
|
|
||||||
--- scripts/create-mkspec.sh 25 Jun 2017 17:16:24 -0000 1.20
|
|
||||||
+++ scripts/create-mkspec.sh 26 Jun 2017 10:23:07 -0000
|
|
||||||
@@ -50,6 +50,7 @@
|
|
||||||
|echo "Summary: `cfg_value summary`"
|
|
||||||
|echo "Group: `cfg_value global.group`"
|
|
||||||
|[ "\$REQUIRES_RUN" ] && echo "Requires: \$REQUIRES_RUN"
|
|
||||||
+ |[ "\$CONFLICTS_RUN" ] && echo "Conflicts: \$CONFLICTS_RUN"
|
|
||||||
|echo "%description -n \$NAME-run"
|
|
||||||
|echo "Runtime package"
|
|
||||||
|echo ""
|
|
||||||
@@ -60,6 +61,7 @@
|
|
||||||
|echo "Summary: `cfg_value summary`, development package"
|
|
||||||
|echo "Group: `cfg_value global.group`"
|
|
||||||
|[ "\$REQUIRES_DEVEL" ] && echo "Requires: \$REQUIRES_DEVEL"
|
|
||||||
+ |[ "\$CONFLICTS_DEVEL" ] && echo "Conflicts: \$CONFLICTS_DEVEL"
|
|
||||||
|echo "%description -n \$NAME-devel"
|
|
||||||
|echo "Development package"
|
|
||||||
|echo ""
|
|
||||||
Index: scripts/mkspec-wrapper.sh
|
|
||||||
===================================================================
|
|
||||||
RCS file: /home/jannet/arc/cvs/proj/jw-build/scripts/mkspec-wrapper.sh,v
|
|
||||||
retrieving revision 1.24
|
|
||||||
diff -u -r1.24 mkspec-wrapper.sh
|
|
||||||
--- scripts/mkspec-wrapper.sh 26 Jul 2016 15:02:21 -0000 1.24
|
|
||||||
+++ scripts/mkspec-wrapper.sh 26 Jun 2017 10:23:07 -0000
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
[ "$1" ] && exit $1
|
|
||||||
}
|
|
||||||
|
|
||||||
-set -- `getopt P:T:V:S:N:hR:D:d: "$@"`
|
|
||||||
+set -- `getopt P:T:V:S:N:hR:D:X:Y:d: "$@"`
|
|
||||||
|
|
||||||
while [ "$1" != -- ]; do
|
|
||||||
case $1 in
|
|
||||||
@@ -42,12 +42,24 @@
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
+ -X)
|
|
||||||
+ while [ "`echo $2 | cut -c1`" != "-" ]; do
|
|
||||||
+ CONFLICTS_RUN="$CONFLICTS_RUN $2"
|
|
||||||
+ shift
|
|
||||||
+ done
|
|
||||||
+ ;;
|
|
||||||
-D)
|
|
||||||
while [ "`echo $2 | cut -c1`" != "-" ]; do
|
|
||||||
REQUIRES_DEVEL="$REQUIRES_DEVEL $2"
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
+ -Y)
|
|
||||||
+ while [ "`echo $2 | cut -c1`" != "-" ]; do
|
|
||||||
+ CONFLICTS_DEVEL="$CONFLICTS_DEVEL $2"
|
|
||||||
+ shift
|
|
||||||
+ done
|
|
||||||
+ ;;
|
|
||||||
-P)
|
|
||||||
PROJECT="$2"
|
|
||||||
shift;;
|
|
||||||
@@ -81,6 +93,7 @@
|
|
||||||
fi
|
|
||||||
|
|
||||||
REQUIRES="$REQUIRES_RUN $REQUIRES_DEVEL"
|
|
||||||
+CONFLICTS="$CONFLICTS_RUN $CONFLICTS_DEVEL"
|
|
||||||
#if [ -n "$REQUIRES" ]; then
|
|
||||||
# REQUIRES_RUN=`echo $REQUIRES |
|
|
||||||
# sed -e '
|
|
||||||
@@ -96,6 +109,7 @@
|
|
||||||
|
|
||||||
export \
|
|
||||||
REQUIRES REQUIRES_RUN REQUIRES_DEVEL \
|
|
||||||
+ CONFLICTS CONFLICTS_RUN CONFLICTS_DEVEL \
|
|
||||||
TOPDIR \
|
|
||||||
PROJECT NAME \
|
|
||||||
SOURCE \
|
|
||||||
Index: scripts/pkg.sh
|
|
||||||
===================================================================
|
|
||||||
RCS file: /home/jannet/arc/cvs/proj/jw-build/scripts/pkg.sh,v
|
|
||||||
retrieving revision 1.33
|
|
||||||
diff -u -r1.33 pkg.sh
|
|
||||||
--- scripts/pkg.sh 12 Jun 2017 09:35:57 -0000 1.33
|
|
||||||
+++ scripts/pkg.sh 26 Jun 2017 10:23:07 -0000
|
|
||||||
@@ -410,6 +410,8 @@
|
|
||||||
local distribution=`os`
|
|
||||||
local RPM_REQUIRES_RUN=`echo $RPM_REQUIRES_RUN | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
|
||||||
local RPM_REQUIRES_DEVEL=`echo $RPM_REQUIRES_DEVEL | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
|
||||||
+ local RPM_CONFLICTS_RUN=`echo $RPM_CONFLICTS_RUN | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
|
||||||
+ local RPM_CONFLICTS_DEVEL=`echo $RPM_CONFLICTS_DEVEL | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
|
||||||
|
|
||||||
# --- create source directory tree
|
|
||||||
create_empty_dir $src_tree "Source files compilation directory"
|
|
||||||
@@ -464,7 +466,9 @@
|
|
||||||
-S $tar_archive \
|
|
||||||
-N $RPM_PROJECT \
|
|
||||||
-R "$RPM_REQUIRES_RUN" \
|
|
||||||
+ -X "$RPM_CONFLICTS_RUN" \
|
|
||||||
-D "$RPM_REQUIRES_DEVEL" \
|
|
||||||
+ -Y "$RPM_CONFLICTS_DEVEL" \
|
|
||||||
-P $PROJECT \
|
|
||||||
-d $distribution \
|
|
||||||
> $RPM_PROJECT.$deffmt
|
|
||||||
@@ -909,7 +913,7 @@
|
|
||||||
[ -d .git ] && SCM=git
|
|
||||||
|
|
||||||
|
|
||||||
-opts='ht:p:m:N:R:D:P:a:F:B:A:'
|
|
||||||
+opts='ht:p:m:N:R:D:X:Y:P:a:F:B:A:'
|
|
||||||
args=("$@")
|
|
||||||
global_args=()
|
|
||||||
while [ "$1" ]; do
|
|
||||||
@@ -949,10 +953,18 @@
|
|
||||||
eval RPM_REQUIRES_RUN=\"$2\"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
+ -X)
|
|
||||||
+ eval RPM_CONFLICTS_RUN=\"$2\"
|
|
||||||
+ shift
|
|
||||||
+ ;;
|
|
||||||
-D)
|
|
||||||
eval RPM_REQUIRES_DEVEL=\"$2\"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
+ -Y)
|
|
||||||
+ eval RPM_CONFLICTS_DEVEL=\"$2\"
|
|
||||||
+ shift
|
|
||||||
+ ;;
|
|
||||||
-P)
|
|
||||||
eval PROJECT=\"$2\"
|
|
||||||
shift
|
|
||||||
Index: scripts/projects.py
|
|
||||||
===================================================================
|
|
||||||
RCS file: /home/jannet/arc/cvs/proj/jw-build/scripts/projects.py,v
|
|
||||||
retrieving revision 1.51
|
|
||||||
diff -u -r1.51 projects.py
|
|
||||||
--- scripts/projects.py 26 Jun 2017 09:33:53 -0000 1.51
|
|
||||||
+++ scripts/projects.py 26 Jun 2017 10:23:07 -0000
|
|
||||||
@@ -68,7 +68,7 @@
|
|
||||||
return r
|
|
||||||
return None
|
|
||||||
|
|
||||||
-def pkg_requires_os_cascade():
|
|
||||||
+def os_cascade():
|
|
||||||
os = get_os()
|
|
||||||
name = re.sub('-.*', '', os)
|
|
||||||
# e.g. os, linux, suse, suse-tumbleweed
|
|
||||||
@@ -202,6 +202,55 @@
|
|
||||||
r.append(m)
|
|
||||||
return r
|
|
||||||
|
|
||||||
+def pkg_relations(rel_type, args_):
|
|
||||||
+ parser = argparse.ArgumentParser(description='pkg-' + rel_type)
|
|
||||||
+ # TODO: implement Vendor evaluation
|
|
||||||
+
|
|
||||||
+ parser.add_argument('--vendor', '-V', nargs='?', default='jw', help='Package Vendor')
|
|
||||||
+ parser.add_argument('flavour', help='Flavour')
|
|
||||||
+ parser.add_argument('module', nargs='*', help='Modules')
|
|
||||||
+ parser.add_argument('--dont-strip-revision', action='store_true',
|
|
||||||
+ default=False, help='Always treat VERSION macro as VERSION-REVISION')
|
|
||||||
+ parser.add_argument('--dont-expand-version-macros', action='store_true',
|
|
||||||
+ default=False, help='Don\'t expand VERSION and REVISION macros')
|
|
||||||
+ args=parser.parse_args(args_)
|
|
||||||
+ debug('flavour = ', args.flavour, ', vendor = ', args.vendor)
|
|
||||||
+ version_pattern=re.compile("[0-9-.]*")
|
|
||||||
+ subsecs = os_cascade()
|
|
||||||
+ subsecs.append('jw')
|
|
||||||
+ debug("subsecs = ", subsecs)
|
|
||||||
+ r = []
|
|
||||||
+ for s in subsecs:
|
|
||||||
+ for m in args.module:
|
|
||||||
+ value = get_value(m, 'pkg.' + rel_type + '.' + s, args.flavour)
|
|
||||||
+ if not value:
|
|
||||||
+ continue
|
|
||||||
+ deps = value.split(',')
|
|
||||||
+ for spec in deps:
|
|
||||||
+ dep = re.split('([=><]+)', spec)
|
|
||||||
+ for i, item in enumerate(dep):
|
|
||||||
+ dep[i] = item.strip()
|
|
||||||
+ if len(dep) == 3:
|
|
||||||
+ dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
|
||||||
+ if args.dont_expand_version_macros and dep_project in args.module:
|
|
||||||
+ version = dep[2]
|
|
||||||
+ else:
|
|
||||||
+ version = get_value(dep_project, 'version', '')
|
|
||||||
+ if dep[2] == 'VERSION':
|
|
||||||
+ if args.dont_strip_revision:
|
|
||||||
+ dep[2] = version
|
|
||||||
+ else:
|
|
||||||
+ dep[2] = version.split('-')[0]
|
|
||||||
+ elif dep[2] == 'VERSION-REVISION':
|
|
||||||
+ dep[2] = version
|
|
||||||
+ elif version_pattern.match(dep[2]):
|
|
||||||
+ # dep[2] = dep[2]
|
|
||||||
+ pass
|
|
||||||
+ else:
|
|
||||||
+ raise Exception("Unknown version specifier in " + spec)
|
|
||||||
+ r.append(' '.join(dep))
|
|
||||||
+ print(', '.join(r))
|
|
||||||
+
|
|
||||||
def get_libname(names):
|
|
||||||
vals = get_modules_from_project_txt(names, 'build', 'libname',
|
|
||||||
scope = 1, add_self=False, names_only=True)
|
|
||||||
@@ -266,6 +315,7 @@
|
|
||||||
args=parser.parse_args(args_)
|
|
||||||
print("blah = " + args.blah)
|
|
||||||
|
|
||||||
+# TODO: seems at least partly redundant to cmd_pkg_requires / pkg_relations
|
|
||||||
def cmd_requires_pkg(args_):
|
|
||||||
parser = argparse.ArgumentParser(description='required-os-pkg')
|
|
||||||
parser.add_argument('module', nargs='*', help='Modules')
|
|
||||||
@@ -275,7 +325,7 @@
|
|
||||||
debug("flavours = " + args.flavours)
|
|
||||||
deps = get_modules_from_project_txt(args.module, 'pkg.requires.jw', flavours,
|
|
||||||
scope = 2, add_self=True, names_only=True)
|
|
||||||
- subsecs = pkg_requires_os_cascade()
|
|
||||||
+ subsecs = os_cascade()
|
|
||||||
debug("subsecs = ", subsecs)
|
|
||||||
requires = []
|
|
||||||
for s in subsecs:
|
|
||||||
@@ -290,7 +340,7 @@
|
|
||||||
print(r[1:])
|
|
||||||
|
|
||||||
def cmd_os_cascade(args_):
|
|
||||||
- print(' '.join(pkg_requires_os_cascade()))
|
|
||||||
+ print(' '.join(os_cascade()))
|
|
||||||
|
|
||||||
def cmd_ldlibpath(args_):
|
|
||||||
parser = argparse.ArgumentParser(description='ldlibpath')
|
|
||||||
@@ -349,6 +399,7 @@
|
|
||||||
r = r + ':' + proj_dir(m) + '/bin'
|
|
||||||
print(r[1:])
|
|
||||||
|
|
||||||
+# TODO: seems at least partly redundant to cmd_pkg_requires / pkg_relations
|
|
||||||
def cmd_prereq(args_):
|
|
||||||
parser = argparse.ArgumentParser(description='path')
|
|
||||||
parser.add_argument('flavour', help='Flavour')
|
|
||||||
@@ -359,53 +410,10 @@
|
|
||||||
print(' '.join(deps))
|
|
||||||
|
|
||||||
def cmd_pkg_requires(args_):
|
|
||||||
- parser = argparse.ArgumentParser(description='pkg-requires')
|
|
||||||
- # TODO: implement Vendor evaluation
|
|
||||||
+ return pkg_relations("requires", args_)
|
|
||||||
|
|
||||||
- parser.add_argument('--vendor', '-V', nargs='?', default='jw', help='Package Vendor')
|
|
||||||
- parser.add_argument('flavour', help='Flavour')
|
|
||||||
- parser.add_argument('module', nargs='*', help='Modules')
|
|
||||||
- parser.add_argument('--dont-strip-revision', action='store_true',
|
|
||||||
- default=False, help='Always treat VERSION macro as VERSION-REVISION')
|
|
||||||
- parser.add_argument('--dont-expand-version-macros', action='store_true',
|
|
||||||
- default=False, help='Don\'t expand VERSION and REVISION macros')
|
|
||||||
- args=parser.parse_args(args_)
|
|
||||||
- debug('flavour = ', args.flavour, ', vendor = ', args.vendor)
|
|
||||||
- version_pattern=re.compile("[0-9-.]*")
|
|
||||||
- subsecs = pkg_requires_os_cascade()
|
|
||||||
- subsecs.append('jw')
|
|
||||||
- debug("subsecs = ", subsecs)
|
|
||||||
- r = []
|
|
||||||
- for s in subsecs:
|
|
||||||
- for m in args.module:
|
|
||||||
- value = get_value(m, 'pkg.requires.' + s, args.flavour)
|
|
||||||
- if not value:
|
|
||||||
- continue
|
|
||||||
- deps = value.split(',')
|
|
||||||
- for spec in deps:
|
|
||||||
- dep = re.split('([=><]+)', spec)
|
|
||||||
- for i, item in enumerate(dep):
|
|
||||||
- dep[i] = item.strip()
|
|
||||||
- if len(dep) == 3:
|
|
||||||
- dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
|
||||||
- if args.dont_expand_version_macros and dep_project in args.module:
|
|
||||||
- version = dep[2]
|
|
||||||
- else:
|
|
||||||
- version = get_value(dep_project, 'version', '')
|
|
||||||
- if dep[2] == 'VERSION':
|
|
||||||
- if args.dont_strip_revision:
|
|
||||||
- dep[2] = version
|
|
||||||
- else:
|
|
||||||
- dep[2] = version.split('-')[0]
|
|
||||||
- elif dep[2] == 'VERSION-REVISION':
|
|
||||||
- dep[2] = version
|
|
||||||
- elif version_pattern.match(dep[2]):
|
|
||||||
- # dep[2] = dep[2]
|
|
||||||
- pass
|
|
||||||
- else:
|
|
||||||
- raise Exception("Unknown version specifier in " + spec)
|
|
||||||
- r.append(' '.join(dep))
|
|
||||||
- print(', '.join(r))
|
|
||||||
+def cmd_pkg_conflicts(args_):
|
|
||||||
+ return pkg_relations("conflicts", args_)
|
|
||||||
|
|
||||||
def cmd_proj_dir(args_):
|
|
||||||
parser = argparse.ArgumentParser(description='proj-dir')
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/dirs.mk
|
|
||||||
include $(JWBDIR)/make/htdocs.mk
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/dirs.mk
|
|
||||||
include $(JWBDIR)/make/htdocs.mk
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
TOPDIR = ../../..
|
|
||||||
|
|
||||||
SVG_GENERATE_FORMATS ?= svg
|
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
|
||||||
include $(JWBDIR)/make/svg.mk
|
|
||||||
include $(JWBDIR)/make/htdocs.mk
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg id="svg2985" width="548.07" height="83.681" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
||||||
<g id="layer2" transform="translate(-2.1101 64.402)">
|
|
||||||
<path id="path3009-8" d="m536.55-40.507c10.352 0.1169 14.118 8.9284 14.118 16.922 0 6.8063-2.9411 16.454-14.279 16.692-11.338 0.23783-26.906 0.69504-26.906 0.69504v-10.423s16.774-0.46205 24.667-0.25303c7.892 0.20902 7.2695-12.67 1.2012-12.669-6.0683 0.0012-35.532 0.17444-39.91 0.13454-4.3783-0.03989-4.4417 3.0796-4.5291 4.7227-0.41168 7.7388-0.37271 24.846-0.17606 27.565 0.19665 2.7191 2.2979 4.6235 5.5336 4.8315s54.473 0.66842 54.473 0.66842l0.0546 10.195s-46.283-0.15653-55.338-0.01997c-9.0543 0.13656-14.697-6.8159-14.845-13.835-0.14797-7.019 0.32416-24.647 0.18979-30.057-0.10019-4.0335 2.3339-15.374 13.455-15.329s31.94 0.0438 42.292 0.16071z"/>
|
|
||||||
<path id="path3001" d="m420.81-27.175c-0.14702-6.5899 0.80983-11.615 10.619-11.802 9.8092-0.18658 32.315-0.40323 45.307-0.45085 6.7e-4 3.5 1e-3 7 2e-3 10.5-11.993-0.1212-36.506 0.26112-40.458 0.45306s-5.1609 2.3229-5.0069 6.6462c0.154 4.3233 0.46324 40.401 0.46324 40.401h-11s0.22067-39.157 0.0737-45.747z"/>
|
|
||||||
<path id="path3011" d="m54.929-41.427s0.01221 28.461 0.01517 43.182c8.92e-4 4.4302-3.5513 5.5462-6.377 5.5864-12.214 0.17375-45.839 0.23174-45.839 0.23174v11s43.011-0.20907 49.61-0.22097c6.5993-0.01189 15.311-5.3451 15.075-14.894 0.10918-12.851 0.04376-44.885 0.04376-44.885z" color="#000000" style="block-progression:tb;text-indent:0;text-transform:none"/>
|
|
||||||
<path id="path3009" d="m91.01 18.412c-10.352-0.11691-14.118-8.9284-14.118-16.922 0-6.8063 2.9411-16.454 14.279-16.692 11.338-0.23783 26.906-0.69504 26.906-0.69504v10.423s-16.774 0.46205-24.667 0.25303c-7.892-0.20902-7.2695 12.67-1.2012 12.669 6.0683-0.0012 35.532-0.17444 39.91-0.13454 4.3783 0.03989 4.4417-3.0796 4.5291-4.7227 0.41168-7.7388 0.37271-24.846 0.17606-27.565s-2.2979-4.6235-5.5336-4.8315-54.473-0.66842-54.473-0.66842l-0.05459-10.195s46.283 0.15653 55.338 0.02c9.0543-0.13655 14.697 6.8159 14.845 13.835s-0.32416 24.647-0.18979 30.057c0.10019 4.0335-2.3339 15.374-13.455 15.329-11.121-0.0452-31.94-0.04381-42.292-0.16072z"/>
|
|
||||||
<path id="path3007" d="m157.54-28.344c-0.10919-7.4421 5.0777-11.661 10.693-11.792 5.6156-0.1307 34.007 0.18564 39.788 0.15578 7.4045 0.53658 12.156 4.5796 14.074 11.584 1.1336 4.1262 13.077 46.81 13.077 46.81l-11.942 0.15814s-8.5492-31.836-11.983-43.402c-0.39042-1.3149-1.5321-3.0336-3.6666-3.0955-10.632-0.30873-29.028-0.59293-33.809-0.38338s-5.0828 2.2367-5.1239 4.5122c-0.23262 12.877 0.0945 42.369 0.0945 42.369h-11.201s0.1906-42.223-5e-5 -46.916z"/>
|
|
||||||
<path id="path3005" d="m243.5 7.832c-4.6237-15.704-11.853-47.644-11.853-47.644l10.735-0.23354s7.2588 28.699 11.587 42.848c0.79533 5.3846 6.7923 5.9418 11.141 5.3316 4.6708 0.35988 6.5158-4.3339 8.0455-7.8587 1.6974-4.5562 6.0072-8.0817 11.017-7.8158 5.3758-0.23748 9.8464 3.954 11.452 8.838 1.3548 4.2461 5.5008 7.9858 10.306 7.0933 4.4764 0.72548 7.8897-2.2082 8.508-6.735 4.6305-13.638 10.909-41.748 10.909-41.748l12.402 0.06317s-7.9618 33.001-13.362 49.092c-2.5732 6.8924-10.756 8.8852-17.352 9.2809-5.3414 0.22454-11.15 0.35387-15.63-3.0751-4.5959-1.9063-5.9633-6.9993-6.7799-11.44-2.2589 4.2805-2.4875 5.174-5.3837 9.0677-3.3731 2.7504-3.6951 3.8922-7.6724 4.7133-4.1713 0.77934-14.003 1.5579-17.984 0.29472-4.7161-1.4229-8.4581-5.5009-10.084-10.073z"/>
|
|
||||||
<path id="path2995" d="m60.513-63.167c9.7041 0.0202 10.166 14.793-0.13778 14.795-10.304 0.0022-9.5663-14.815 0.13778-14.795z" fill="#e70200"/>
|
|
||||||
<path id="path3009-4" d="m353.74 18.412c-10.352-0.11691-14.118-8.9284-14.118-16.922 0-6.8063 2.9411-16.454 14.279-16.692 11.338-0.23783 26.906-0.69504 26.906-0.69504v10.423s-16.774 0.46205-24.667 0.25303c-7.892-0.20902-7.2695 12.67-1.2012 12.669 6.0683-0.0012 35.532-0.17444 39.91-0.13454 4.3783 0.03989 4.4417-3.0796 4.5291-4.7227 0.41168-7.7388 0.37271-24.846 0.17606-27.565s-2.2979-4.6235-5.5336-4.8315-48.686 0.09588-48.686 0.09588l3.3816-10.744s37.06-0.0581 46.114-0.19466c9.0543-0.13655 14.697 6.8159 14.845 13.835s-0.32416 24.647-0.18979 30.057c0.10019 4.0335-2.3339 15.374-13.455 15.329-11.121-0.0452-31.94-0.04381-42.292-0.16071z"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 4.3 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 36 KiB |
|
|
@ -1,49 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
CONFIG_ACDONE := $(wildcard config.acdone)
|
|
||||||
DISTCLEAN += configure config.log autoscan.log configure.ac config.status
|
|
||||||
AC_FILES_IN = $(shell find . -maxdepth 2 -name '*.in' | grep -ve "contrib\|dist\|nomake")
|
|
||||||
AC_FILES = $(basename $(AC_FILES_IN))
|
|
||||||
|
|
||||||
all: config.acdone make_all
|
|
||||||
config: config.acdone $(AC_FILES)
|
|
||||||
install: config $(AC_FILES) make_install
|
|
||||||
distclean: confclean acclean
|
|
||||||
rpm-release: config.acdone make_rpm_release
|
|
||||||
|
|
||||||
make_all: config $(AC_FILES)
|
|
||||||
if [ -z "$(CONFIG_ACDONE)" ]; then make all; fi
|
|
||||||
make_rpm_release: config $(AC_FILES)
|
|
||||||
if [ -z "$(CONFIG_ACDONE)" ]; then make rpm-release; fi
|
|
||||||
make_install:
|
|
||||||
if [ -z "$(CONFIG_ACDONE)" ]; then make $@; fi
|
|
||||||
confclean:
|
|
||||||
$(RM) -rf $(DISTCLEAN) $(CLEAN) $(AC_FILES) autom4te.cache
|
|
||||||
|
|
||||||
configure.ac: configure.ac.tmpl VERSION
|
|
||||||
$(CAT) $< | $(SED) -e "s/_VERSION_/`$(CAT) VERSION | $(SED) 's/-dev//'`/" > $@
|
|
||||||
|
|
||||||
configure: configure.ac
|
|
||||||
autoconf $< > $@
|
|
||||||
chmod 755 $@
|
|
||||||
|
|
||||||
config.status: configure
|
|
||||||
./configure --no-create $(CONFIGURE_OPTS)
|
|
||||||
|
|
||||||
config.acdone: config.status
|
|
||||||
./config.status
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(TOPDIR)/make/%.mk: $(TOPDIR)/make/%.mk.in config.status
|
|
||||||
./config.status $@
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(TOPDIR)/include/%.h: $(TOPDIR)/include/%.h.in config.status
|
|
||||||
./config.status $@
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
acclean:
|
|
||||||
$(RM) -f *.acdone
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
BACKUP_SOURCE ?= .
|
|
||||||
BACKUP_TARGET ?= ..
|
|
||||||
BACKUP_DATE ?= $(shell date +'%y%m%d-%H%M%S')
|
|
||||||
|
|
||||||
_BACKUP_SOURCE = $(notdir $(shell cd $(BACKUP_SOURCE); $(PWD)))
|
|
||||||
|
|
||||||
ifndef BACKUP_MK_INCLUDED
|
|
||||||
BACKUP_MK_INCLUDED = true
|
|
||||||
|
|
||||||
backup: distclean
|
|
||||||
tar -C .. $(_BACKUP_SOURCE) -cjf $(BACKUP_TARGET)/$(_BACKUP_SOURCE)-$(BACKUP_DATE).tar.bz2
|
|
||||||
|
|
||||||
purge-last-backup:
|
|
||||||
$(RM) -f $(shell ls $(BACKUP_TARGET)/$(_BACKUP_SOURCE)-*.tar.bz2 | tail -1)
|
|
||||||
|
|
||||||
endif # ifndef BACKUP_MK_INCLUDED
|
|
||||||
12
make/bin.mk
12
make/bin.mk
|
|
@ -1,12 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2005 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
|
|
||||||
all install:
|
|
||||||
clean distclean:
|
|
||||||
$(RM) -rf $(filter-out $(LOCAL_MKFILES) CVS debug release,$(wildcard *))
|
|
||||||
test:
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
.NOTPARALLEL:
|
|
||||||
|
|
||||||
all: do.all
|
|
||||||
install: do.install
|
|
||||||
clean: do.clean
|
|
||||||
distclean: do.distclean
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
SUBDIRS ?= $(FIND_SUBDIRS)
|
|
||||||
|
|
||||||
ifeq ($(FORCE_REBUILD_CLEANDIRS),true)
|
|
||||||
SUBDIRS_ALL = $(SUBDIRS)
|
|
||||||
SUBDIRS_INSTALL = $(SUBDIRS)
|
|
||||||
else
|
|
||||||
SUBDIRS_ALL ?=
|
|
||||||
SUBDIRS_INSTALL ?=
|
|
||||||
endif
|
|
||||||
|
|
||||||
do.all:
|
|
||||||
set -e; for d in $(SUBDIRS_ALL); do make -wC $$d $*; done
|
|
||||||
|
|
||||||
do.install:
|
|
||||||
set -e; for d in $(SUBDIRS_INSTALL); do make -wC $$d $*; done
|
|
||||||
|
|
||||||
do.%:
|
|
||||||
set -e; for d in $(SUBDIRS); do make -wC $$d $*; done
|
|
||||||
$(RM) -rf $(TEXTCLEAN) $(CLEAN) *.done *~ .*.swp *.tmp core *.rep dirs-*.done
|
|
||||||
23
make/conf.mk
23
make/conf.mk
|
|
@ -1,23 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
clean: clean.conf
|
|
||||||
install: install_CFG install_files_SYSCFG install_files_LOGROT install_files_CRONTAB install_files_RSYSLOG \
|
|
||||||
install_files_APACHE_CONF install_files_SYSTEMD install_files_INIT install_files_TMPFILES $(CONF_D)
|
|
||||||
test:
|
|
||||||
|
|
||||||
clean.conf:
|
|
||||||
$(RM) -rf *~ .*.swp *.done
|
|
||||||
|
|
||||||
ifneq ($(CONFIG_SUBDIR),)
|
|
||||||
$(INSTALLED_CFG): $(INSTALL_CFGDIR)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(CONF_D),)
|
|
||||||
INSTALLED_CONF_D = $(addprefix $(INSTALL_CFGDIR)/,$(CONF_D))
|
|
||||||
$(INSTALL_CFGDIR)/$(CONF_D):
|
|
||||||
$(INSTALL) -d -m $(CFGDIRMODE) -o $(CFGDIROWNER) -g $(CFGDIRGROUP) $@
|
|
||||||
install: $(INSTALLED_CONF_D)
|
|
||||||
endif
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2005 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
LOCAL_PATCHES = $(notdir $(CFG_PATCHES))
|
|
||||||
LOCAL_PATCH_DONE = $(addsuffix .done, $(LOCAL_PATCHES))
|
|
||||||
|
|
||||||
ifndef CFG_PATCH_COMMAND
|
|
||||||
CFG_PATCH_COMMAND=(cd $(CFG_WORKING_DIR); patch -p1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: apply-patches.done $(CFG_BUILD)
|
|
||||||
ifndef CFG_BUILD
|
|
||||||
make -C $(CFG_WORKING_DIR) all
|
|
||||||
endif
|
|
||||||
|
|
||||||
install: all $(CFG_INSTALL)
|
|
||||||
ifndef CFG_INSTALL
|
|
||||||
make -C $(CFG_WORKING_DIR) install
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean: $(CFG_CLEAN)
|
|
||||||
ifndef CFG_CLEAN
|
|
||||||
if [ -d "$(CFG_WORKING_DIR)" ]; then make -C $(CFG_WORKING_DIR) clean; fi
|
|
||||||
endif
|
|
||||||
|
|
||||||
unpack.done:
|
|
||||||
tar -xzf $(CFG_PKG)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(LOCAL_PATCHES): $(filter %$@,$(CFG_PATCHES))
|
|
||||||
cp $(filter %$@,$(CFG_PATCHES)) $@
|
|
||||||
|
|
||||||
%.patch.done: %.patch
|
|
||||||
$(CFG_PATCH_COMMAND) < $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
apply-patches.done: unpack.done $(LOCAL_PATCH_DONE)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
install:
|
|
||||||
distclean:
|
|
||||||
$(RM) -rf *.done *.patch $(CFG_WORKING_DIR)
|
|
||||||
|
|
||||||
unpack: unpack.done
|
|
||||||
apply-patches: apply-patches.done
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
ifndef CPP_EXTRA_TARGETS_MK_INCLUDED
|
|
||||||
CPP_EXTRA_TARGETS_MK_INCLUDED = true
|
|
||||||
|
|
||||||
all:
|
|
||||||
expand-macros:
|
|
||||||
make 2>/dev/null | sed '/$(CC)\|$(CXX)/ !d; s/$(CC)\|$(CXX)//; s/-o .*//' | grep -v "Wl\|rdynamic" | xargs $(CXX) -E -C | indent
|
|
||||||
|
|
||||||
endif # ifndef CPP_EXTRA_TARGETS_MK_INCLUDED
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
include $(JWBDIR)/make/tools.mk
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
clean: clean.conf
|
|
||||||
install: install_CFG install_files_SYSCFG install_files_LOGROT $(CONF_D)
|
|
||||||
|
|
||||||
clean.conf:
|
|
||||||
$(RM) -rf *~ .*.swp *.done
|
|
||||||
|
|
||||||
ifneq ($(CONFIG_SUBDIR),)
|
|
||||||
$(INSTALLED_CFG): $(INSTALL_CFGDIR)
|
|
||||||
|
|
||||||
$(INSTALL_CFGDIR):
|
|
||||||
install -d -m $(CFGDIRMODE) -d $(CFGDIROWNER) -g $(CFGDIRGROUP) $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(CONF_D),)
|
|
||||||
INSTALLED_CONF_D = $(addprefix $(INSTALL_CFGDIR)/,$(CONF_D))
|
|
||||||
$(INSTALL_CFGDIR)/$(CONF_D):
|
|
||||||
install -d -m $(CFGDIRMODE) -d $(CFGDIROWNER) -g $(CFGDIRGROUP) $@
|
|
||||||
install: $(INSTALLED_CONF_D)
|
|
||||||
endif
|
|
||||||
44
make/dav.mk
44
make/dav.mk
|
|
@ -1,44 +0,0 @@
|
||||||
DAV_GROUP ?= jannet
|
|
||||||
DAV_GROUP_PROJECT ?= $(PROJECT_DIRNAME)
|
|
||||||
DAV_GROUP_PROJECT_GROUP ?= $(shell id -gn)
|
|
||||||
DAV_GROUP_PROJECT_USER ?= $(shell id -un)
|
|
||||||
DAV_SERVER ?= cvs.janware.com
|
|
||||||
DAV_RSYNC_SERVER ?= $(DAV_SERVER)
|
|
||||||
DAV_RSYNC_DIR ?= /srv/dav/pub/groups/$(DAV_GROUP)/$(DAV_GROUP_PROJECT)
|
|
||||||
DAV_RSYNC_URL = $(DAV_RSYNC_SERVER):$(DAV_RSYNC_DIR)
|
|
||||||
DAV_RSYNC_EXCLUDE ?= $(shell bash $(JWB_SCRIPT_DIR)/scm.sh ls-files)
|
|
||||||
DAV_RSYNC_EXCLUDE_OPTS = $(addprefix --exclude , $(DAV_RSYNC_EXCLUDE) '*.done')
|
|
||||||
DAV_RSYNC_EXTRA_OPTS ?=
|
|
||||||
DAV_RSYNC ?= rsync $(DAV_RSYNC_EXCLUDE_OPTS)
|
|
||||||
DAV_RSYNC_MODE ?= 664
|
|
||||||
DAV_RSYNC_DIRMODE ?= 775
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
install:
|
|
||||||
clean:
|
|
||||||
distclean: dav.clean
|
|
||||||
|
|
||||||
upload: upload.done
|
|
||||||
dload download: dload.done
|
|
||||||
delete-remote:
|
|
||||||
ssh $(DAV_RSYNC_SERVER) $(RM) -rf $(DAV_RSYNC_DIR)
|
|
||||||
|
|
||||||
upload.done:
|
|
||||||
$(DAV_RSYNC) \
|
|
||||||
--chmod F$(DAV_RSYNC_MODE) \
|
|
||||||
--chmod D$(DAV_RSYNC_DIRMODE) \
|
|
||||||
--chown $(DAV_GROUP_PROJECT_USER):$(DAV_GROUP_PROJECT_GROUP) \
|
|
||||||
-av \
|
|
||||||
$(DAV_RSYNC_EXTRA_OPTS) \
|
|
||||||
./ \
|
|
||||||
$(DAV_RSYNC_URL)/
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
dload.done:
|
|
||||||
$(DAV_RSYNC) -av $(DAV_RSYNC_URL)/ ./
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
dav.clean:
|
|
||||||
$(RM) -f upload.done dload.done
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
CORE_IGNORE := $(wildcard *.intern-state*)
|
|
||||||
CORE_VG ?= $(firstword $(filter-out $(CORE_IGNORE),$(wildcard vgcore vgcore.*)))
|
|
||||||
CORE_REGULAR ?= $(firstword $(filter-out $(CORE_IGNORE),$(wildcard core core.*)))
|
|
||||||
CORE ?= $(firstword $(CORE_VG) $(CORE_REGULAR))
|
|
||||||
|
|
||||||
ifneq ($(CORE),)
|
|
||||||
ifneq ($(CORE),$(CORE_VG)) # trick doesn't work on valgrind cores
|
|
||||||
CORE_DUMPER = $(shell echo -e "quit" | $(DEBUGGER) --core=$(CORE) 2>&1 | \
|
|
||||||
$(SED) '/Core was generated/ !d; s/Core was generated by `//; s/ .*//; s/\x27\.$$//')
|
|
||||||
else
|
|
||||||
CORE_DUMPER = $(EXE_PATH)
|
|
||||||
endif
|
|
||||||
else ifeq ($(CORE_DUMPER),)
|
|
||||||
CORE_DUMPER = $(EXE_PATH)
|
|
||||||
endif
|
|
||||||
|
|
||||||
PID = $(shell pidof $(EXE_PATH))
|
|
||||||
|
|
||||||
all:
|
|
||||||
distclean: distclean.debugger
|
|
||||||
|
|
||||||
distclean.debugger:
|
|
||||||
rm -f .gdb_history
|
|
||||||
|
|
||||||
gdb ddd:
|
|
||||||
ifneq ($(CORE),)
|
|
||||||
$@ --core=$(CORE) --args $(CORE_DUMPER) $(EXE_ARGS)
|
|
||||||
else
|
|
||||||
$@ --args $(CORE_DUMPER) $(EXE_ARGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
lldb:
|
|
||||||
ifneq ($(CORE),)
|
|
||||||
$@ --core $(CORE) -f $(CORE_DUMPER) -- $(EXE_ARGS)
|
|
||||||
else
|
|
||||||
$@ -f $(CORE_DUMPER) -- $(EXE_ARGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
kdbg:
|
|
||||||
$@ $(CORE_DUMPER) $(CORE) -a "$(EXE_ARGS)"
|
|
||||||
|
|
||||||
cgdb:
|
|
||||||
ifneq ($(CORE),)
|
|
||||||
$@ -- --core=$(CORE) --args $(CORE_DUMPER) $(EXE_ARGS)
|
|
||||||
else
|
|
||||||
$@ -- --args $(CORE_DUMPER) $(EXE_ARGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
attach:
|
|
||||||
$(DEBUGGER) $(EXE_PATH) -p $(PID)
|
|
||||||
|
|
||||||
attach-lldb:
|
|
||||||
lldb $(EXE_PATH) -p $(PID)
|
|
||||||
|
|
||||||
attach-gdb:
|
|
||||||
gdb $(EXE_PATH) -p $(PID)
|
|
||||||
|
|
||||||
attach-ddd:
|
|
||||||
ddd $(EXE_PATH) -p $(PID)
|
|
||||||
|
|
||||||
attach-strace:
|
|
||||||
strace -f $(EXE_PATH) -p $(PID)
|
|
||||||
|
|
||||||
report:
|
|
||||||
generate-coredump-report.sh -l
|
|
||||||
mkdir -p crashes
|
|
||||||
if ls *core*.txt.bz2* >/dev/null 2>&1; then mv *core*.txt.bz2 crashes/; fi
|
|
||||||
|
|
||||||
view-report:
|
|
||||||
less `ls -rt crashes/*core*.txt.bz2 | tail -1`
|
|
||||||
localcore:
|
|
||||||
echo core.%h.%e.%p | sudo tee /proc/sys/kernel/core_pattern
|
|
||||||
cp `ls -rt /var/cores/*core* 2>/dev/null | tail -1` .
|
|
||||||
|
|
||||||
centralcore:
|
|
||||||
echo /var/cores/core.%h.%e.%p | sudo tee /proc/sys/kernel/core_pattern
|
|
||||||
|
|
||||||
coreclean: centralcore-clean
|
|
||||||
|
|
||||||
centralcore-clean:
|
|
||||||
$(RM) -f /var/cores/core* /var/cores/vgcore* || exit 0
|
|
||||||
echo-pid:
|
|
||||||
@echo PID = $(PID)
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
all:
|
|
||||||
|
|
||||||
DC_EXT ?= xz bzip2 gz zip
|
|
||||||
DC_COMPRESSED_ALL ?= $(foreach ext,$(DC_EXT),$(wildcard *.$(ext)))
|
|
||||||
DC_UNCOMPRESSED_ALL ?= $(foreach patt,$(DC_EXT),$(patsubst %.$(patt),%,$(wildcard *.$(patt))))
|
|
||||||
|
|
||||||
all: $(DC_UNCOMPRESSED_ALL)
|
|
||||||
clean: clean.uncompressed
|
|
||||||
clean.uncompressed:
|
|
||||||
rm -f $(DC_UNCOMPRESSED_ALL)
|
|
||||||
|
|
||||||
%: %.xz
|
|
||||||
xz -dk $<
|
|
||||||
%: %.gz
|
|
||||||
gunzip -k $<
|
|
||||||
%: %.bzip2
|
|
||||||
bunzip -k $<
|
|
||||||
%: %.zip
|
|
||||||
unzip $<
|
|
||||||
808
make/defs-cpp.mk
808
make/defs-cpp.mk
|
|
@ -1,808 +0,0 @@
|
||||||
ifndef JW_BUILD_CPP_DEFS_MK_INCLUDED
|
|
||||||
JW_BUILD_CPP_DEFS_MK_INCLUDED := true
|
|
||||||
|
|
||||||
# performance optimization for clean targets
|
|
||||||
ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
|
|
||||||
|
|
||||||
# -- default choices
|
|
||||||
|
|
||||||
#COMPILER_SUITE ?= clang
|
|
||||||
COMPILER_SUITE ?= gcc
|
|
||||||
CPP_STANDARD_VERSION ?= 17
|
|
||||||
C_STANDARD_VERSION ?= 11
|
|
||||||
USE_PROJECT_LIB ?= true
|
|
||||||
EXPORT_PROJECT_LIB ?= $(USE_PROJECT_LIB)
|
|
||||||
USE_JW_BUILD ?= true
|
|
||||||
USE_EXCEPTIONS_IN_C ?= true
|
|
||||||
USE_COMPILER_OPTIMIZATION_OPTS ?= false
|
|
||||||
USE_COMPILER_DEBUG_OPTS ?= true
|
|
||||||
USE_VERSION_MACROS ?= true
|
|
||||||
COMPILE_DEBUG_CODE ?= true
|
|
||||||
|
|
||||||
ifeq ($(findstring $(TARGET_OS),linux),)
|
|
||||||
USE_SYSTEMD := false
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_CCACHE),true)
|
|
||||||
CCACHE := ccache$(space)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# -- build TAGGED_TMPL_TAGS cascade
|
|
||||||
|
|
||||||
TAGGED_TMPL_MAKEFILES = $(wildcard $(addsuffix .mk,$(foreach t,$(TAGGED_TMPL_DIRS),$(addprefix $(t)/,$(TAGGED_TMPL_TAGS)))))
|
|
||||||
|
|
||||||
# TODO: maybe push this whome MCU-specific stuff somewhere else
|
|
||||||
ifneq ($(findstring st-nucleo-f103rb,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
TAGGED_TMPL_TAGS += cortex-m3
|
|
||||||
MCU_BOARD_MODEL ?= ST-NUCLEO-F103RB
|
|
||||||
FINAL_CPPFLAGS += -DST_NUCLEO_F103RB
|
|
||||||
MCU_FLASH_OFFSET ?= 0x0000000
|
|
||||||
MCU_FLASH_SIZE ?= 0x5000
|
|
||||||
MCU_MEM_FETCH_OFFSET ?= 0x08000000
|
|
||||||
MCU_MEM_FETCH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
#MCU_OPENOCD_CFG_NAME ?= openocd-$(MCU_BOARD_LC).cfg
|
|
||||||
ifneq ($(findstring j-link,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
MCU_OPENOCD_CFG_NAME ?= openocd-st-nucleo-f103rb-jlink.cfg
|
|
||||||
else
|
|
||||||
MCU_OPENOCD_CFG_NAME ?= openocd-st-nucleo-f103rb.cfg
|
|
||||||
endif
|
|
||||||
MODM_BSPS += modm:nucleo-f103rb
|
|
||||||
MCU_FLASH_BANK_NAME ?= internal
|
|
||||||
ifneq ($(MCU_FLASH_BANK_NAME),internal)
|
|
||||||
$(error Unsupported flash bank name "$(MCU_FLASH_BANK_NAME)")
|
|
||||||
endif
|
|
||||||
else ifneq ($(findstring st-disc1-f429i,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
TAGGED_TMPL_TAGS += cortex-m4
|
|
||||||
MCU_BOARD_MODEL ?= ST-DISC1-F429I
|
|
||||||
FINAL_CPPFLAGS += -DST_DISC1_F429I
|
|
||||||
#MCU_OPENOCD_CFG_NAME ?= openocd-st-stm32f429disc1.cfg
|
|
||||||
MCU_OPENOCD_CFG_NAME ?= openocd-st-stm32f429discovery.cfg
|
|
||||||
MCU_FLASH_BANK_NAME ?= internal
|
|
||||||
ifeq ($(MCU_FLASH_BANK_NAME),internal)
|
|
||||||
MCU_FLASH_OFFSET ?= 0x00000000
|
|
||||||
MCU_FLASH_SIZE ?= 0x00200000
|
|
||||||
MCU_MEM_FETCH_OFFSET ?= 0x08000000
|
|
||||||
MCU_MEM_FETCH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
else ifeq ($(MCU_FLASH_BANK_NAME),otp)
|
|
||||||
MCU_FLASH_OFFSET ?= 0x00000000
|
|
||||||
MCU_FLASH_SIZE ?= 0x00000200
|
|
||||||
MCU_MEM_FETCH_OFFSET ?= 0x1fff7800
|
|
||||||
MCU_MEM_FETCH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
else
|
|
||||||
$(error Unsupported flash bank name "$(MCU_FLASH_BANK_NAME)")
|
|
||||||
endif
|
|
||||||
ifeq ($(MCU_OPENOCD_CFG_NAME),openocd-st-stm32f429disc1.cfg)
|
|
||||||
ifeq ($(MCU_FLASH_BANK_NAME),internal)
|
|
||||||
MCU_FLASH_BANK ?= 1
|
|
||||||
endif
|
|
||||||
else ifeq ($(MCU_OPENOCD_CFG_NAME),openocd-st-stm32f429discovery.cfg)
|
|
||||||
ifeq ($(MCU_FLASH_BANK_NAME),internal)
|
|
||||||
MCU_FLASH_BANK ?= 1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# modm:disco-f769ni (SIC), not disco-f769i. mbed does the same, despite the
|
|
||||||
# fact that a board of this name doesn't exist.
|
|
||||||
MODM_BSPS += modm:disco-f429zi
|
|
||||||
else ifneq ($(findstring st-disco-f769i,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
TAGGED_TMPL_TAGS += cortex-m7
|
|
||||||
MCU_BOARD_MODEL ?= ST-DISCO-F769I
|
|
||||||
FINAL_CPPFLAGS += -DST_DISCO_F769I
|
|
||||||
ifneq ($(findstring j-link,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
MCU_OPENOCD_CFG_NAME ?= openocd-stmqspi-st-stm32f769i-disco-jlink.cfg
|
|
||||||
else
|
|
||||||
MCU_OPENOCD_CFG_NAME ?= openocd-stmqspi-st-stm32f769i-disco.cfg
|
|
||||||
endif
|
|
||||||
MCU_FLASH_BANK_NAME ?= external
|
|
||||||
ifeq ($(MCU_FLASH_BANK_NAME),external)
|
|
||||||
MCU_FLASH_OFFSET ?= 0x00000000
|
|
||||||
MCU_FLASH_SIZE ?= 0x04000000
|
|
||||||
MCU_MEM_FETCH_OFFSET ?= 0x90000000
|
|
||||||
MCU_MEM_FETCH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
else ifeq ($(MCU_FLASH_BANK_NAME),internal)
|
|
||||||
MCU_FLASH_OFFSET ?= 0x00000000
|
|
||||||
MCU_FLASH_SIZE ?= 0x00200000
|
|
||||||
MCU_MEM_FETCH_OFFSET ?= 0x08000000
|
|
||||||
MCU_MEM_FETCH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
else
|
|
||||||
$(error Unsupported flash bank name "$(MCU_FLASH_BANK_NAME)")
|
|
||||||
endif
|
|
||||||
ifeq ($(MCU_OPENOCD_CFG_NAME),openocd-stmqspi-st-stm32f769i-disco.cfg)
|
|
||||||
ifeq ($(MCU_FLASH_BANK_NAME),external)
|
|
||||||
MCU_FLASH_BANK ?= 1
|
|
||||||
else ifeq ($(MCU_FLASH_BANK_NAME),internal)
|
|
||||||
MCU_FLASH_BANK ?= 0
|
|
||||||
endif
|
|
||||||
else ifeq ($(MCU_OPENOCD_CFG_NAME),openocd-st-stm32f7discovery.cfg)
|
|
||||||
ifeq ($(MCU_FLASH_BANK_NAME),external)
|
|
||||||
MCU_FLASH_BANK ?= 2
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# modm:disco-f769ni (SIC), not disco-f769i. mbed does the same, despite the
|
|
||||||
# fact that a board of this name doesn't exist.
|
|
||||||
MODM_BSPS += modm:disco-f769ni
|
|
||||||
else
|
|
||||||
MCU_OPENOCD_CFG_NAME ?= openocd-$(MCU_BOARD_LC).cfg
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(findstring cortex-m,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
TAGGED_TMPL_TAGS += cortex-m
|
|
||||||
ifneq ($(findstring cortex-m3,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
TARGET_CPU = cortex-m3
|
|
||||||
else ifneq ($(findstring cortex-m4,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
TARGET_CPU = cortex-m4
|
|
||||||
else ifneq ($(findstring cortex-m7,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
TARGET_CPU = cortex-m7
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(findstring cortex,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
TAGGED_TMPL_TAGS += cortex
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ----- tool chain
|
|
||||||
|
|
||||||
ifneq ($(TARGET_TRIPLET),$(HOST_TRIPLET)) # we're cross-compiling
|
|
||||||
|
|
||||||
TC_BIN_PREFIX ?= $(TARGET_TRIPLET)-
|
|
||||||
TC_SYS_ROOT ?= /usr/$(TARGET_TRIPLET)
|
|
||||||
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(TC_BIN_PREFIX)gcc),)
|
|
||||||
CROSS_TOOL_DIR ?=
|
|
||||||
TC_SYS_ROOT ?= /usr/$(TARGET_TRIPLET)/sys-root/mingw
|
|
||||||
else
|
|
||||||
CROSS_TOOL_DIR ?= /opt/cross-tools
|
|
||||||
TC_BIN_PREFIX ?= $(CROSS_TOOL_DIR)/bin/i686-pc-mingw32-
|
|
||||||
endif
|
|
||||||
|
|
||||||
FINAL_CPPFLAGS += -D_WINDOWS
|
|
||||||
FINAL_LDFLAGS += -lws2_32
|
|
||||||
WINDRES ?= $(TC_BIN_PREFIX)windres
|
|
||||||
USE_GFILTER ?= false
|
|
||||||
MS_LD ?= wine $(HOME)/local/mingw/packages/msvcpp/bin/LIB.EXE
|
|
||||||
endif
|
|
||||||
|
|
||||||
#FINAL_CPPFLAGS += -I$(TC_SYS_ROOT)/include
|
|
||||||
#FINAL_LDFLAGS += -L$(TC_SYS_ROOT)/lib
|
|
||||||
|
|
||||||
else # we're not cross-compiling
|
|
||||||
|
|
||||||
TC_SYS_ROOT ?= /usr
|
|
||||||
FINAL_LIBFLAGS += -pthread
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(COMPILER_SUITE),gcc)
|
|
||||||
|
|
||||||
GCC ?= $(CCACHE)$(TC_BIN_PREFIX)gcc
|
|
||||||
GXX ?= $(CCACHE)$(TC_BIN_PREFIX)g++
|
|
||||||
GNU_LD ?= $(TC_BIN_PREFIX)ld
|
|
||||||
CLANG ?= $(CCACHE)$(TC_BIN_PREFIX)clang
|
|
||||||
CLANGPP ?= $(CCACHE)$(TC_BIN_PREFIX)clang++
|
|
||||||
STRIP ?= $(TC_BIN_PREFIX)strip
|
|
||||||
RANLIB ?= $(TC_BIN_PREFIX)ranlib
|
|
||||||
AR ?= $(TC_BIN_PREFIX)ar
|
|
||||||
PKG_CONFIG_EXE ?= $(TC_BIN_PREFIX)pkg-config
|
|
||||||
CPP_FILT ?= $(TC_BIN_PREFIX)c++filt
|
|
||||||
OBJCOPY ?= $(TC_BIN_PREFIX)objcopy
|
|
||||||
OBJDUMP ?= $(TC_BIN_PREFIX)objdump
|
|
||||||
|
|
||||||
# compiler and linker
|
|
||||||
# gcc
|
|
||||||
GCC_VERSION := $(shell $(GCC) -v 2>&1 | $(SED) '/gcc.version/I !d; s/.*version *//I; s/ \+.*//')
|
|
||||||
GCC_VERSION_NUMBERS := $(subst ., ,$(GCC_VERSION))
|
|
||||||
GCC_MAJOR := $(word 1,$(GCC_VERSION_NUMBERS))
|
|
||||||
GCC_MINOR := $(word 2,$(GCC_VERSION_NUMBERS))
|
|
||||||
GCC_REV := $(word 3,$(GCC_VERSION_NUMBERS))
|
|
||||||
|
|
||||||
# Not needed anywhere
|
|
||||||
#GNU_LD_VERSION := $(shell $(LD) -V | $(SED) '/GNU ld/ !d; s/(.*)//; s/[^0-9.-]*//')
|
|
||||||
#GNU_LD_VERSION_NUMBERS := $(subst ., ,$(GNU_LD_VERSION))
|
|
||||||
#GNU_LD_MAJOR := $(word 1,$(GNU_LD_VERSION_NUMBERS))
|
|
||||||
#GNU_LD_MINOR := $(word 2,$(GNU_LD_VERSION_NUMBERS))
|
|
||||||
#GNU_LD_REV := $(word 3,$(GNU_LD_VERSION_NUMBERS))
|
|
||||||
|
|
||||||
CC = $(GCC)
|
|
||||||
CXX = $(GXX)
|
|
||||||
LD = $(GXX)
|
|
||||||
|
|
||||||
FINAL_CXXFLAGS += -std=c++$(CPP_STANDARD_VERSION)
|
|
||||||
FINAL_CFLAGS += -std=gnu$(C_STANDARD_VERSION)
|
|
||||||
|
|
||||||
ifeq ($(shell $(TEST) $(GCC_MAJOR) -ge 5; $(ECHO) $$?),0)
|
|
||||||
ifeq ($(USE_CPP_FORCE_OVERRIDE),true)
|
|
||||||
GCC_CXXFLAGS += -Werror=suggest-override
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(GCC_MAJOR),2)
|
|
||||||
FINAL_LPPFLAGS += -lm
|
|
||||||
FINAL_CPPFLAGS += -I/usr/local/include
|
|
||||||
else ifeq ($(GCC_MAJOR),3)
|
|
||||||
ifeq ($(GCC_MINOR),3)
|
|
||||||
FINAL_LPPFLAGS += -lgcc_s
|
|
||||||
# FINAL_LPPFLAGS += -L/usr/local/gcc3.3/lib
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
FINAL_CPPFLAGS += -DGCC_HASCLASSVISIBILITY
|
|
||||||
endif
|
|
||||||
|
|
||||||
else ifeq ($(COMPILER_SUITE),clang)
|
|
||||||
|
|
||||||
# clang
|
|
||||||
CLANG_CXXFLAGS += -Wno-unused-private-field -Wno-self-assign-field -Wno-overloaded-virtual
|
|
||||||
CC = $(CLANG)
|
|
||||||
CXX = $(CLANGPP)
|
|
||||||
LD = $(CLANGPP)
|
|
||||||
|
|
||||||
ifeq ($(USE_CPP_WARN_INCONSISTENT_OVERRIDE),true)
|
|
||||||
CLANG_CXXFLAGS += -Winconsistent-missing-override
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif # COMPILER_SUITE
|
|
||||||
|
|
||||||
# -- jw-build variables based on arch and toolchain
|
|
||||||
|
|
||||||
ifeq ($(TARGET_TRIPLET),arm-none-eabi)
|
|
||||||
LIBTYPE ?= static
|
|
||||||
else
|
|
||||||
LIBTYPE ?= shared
|
|
||||||
endif
|
|
||||||
|
|
||||||
INTEL_ARCHS := i386 i486 i586 i686 x86_64
|
|
||||||
|
|
||||||
ifneq ($(findstring $(TARGET_ARCH),$(INTEL_ARCHS)),)
|
|
||||||
TAGGED_TMPL_TAGS += x86
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(COMPILER_SUITE),gcc)
|
|
||||||
DEBUGGER ?= gdb
|
|
||||||
FINAL_EXTRA_DEBUG_FLAGS += -ggdb
|
|
||||||
else ifeq ($(COMPILER_SUITE),clang)
|
|
||||||
DEBUGGER = lldb
|
|
||||||
endif
|
|
||||||
|
|
||||||
# -- gather compiler options in BUILD_XXXFLAGS
|
|
||||||
|
|
||||||
FINAL_CFLAGS += $(CFLAGS)
|
|
||||||
FINAL_CXXFLAGS += $(CXXFLAGS)
|
|
||||||
FINAL_CPPFLAGS += $(CPPFLAGS)
|
|
||||||
FINAL_LDFLAGS += $(LDFLAGS)
|
|
||||||
|
|
||||||
FINAL_CPPFLAGS += -D_FILE_OFFSET_BITS=64 -Wall -Wno-unused-value -Wno-deprecated -DPROJECT_STR=\"$(PROJECT)\"
|
|
||||||
FINAL_LDFLAGS += -Wall
|
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH),$(ARCH_32))
|
|
||||||
FINAL_CPPFLAGS += -m32
|
|
||||||
FINAL_LDFLAGS += -m32
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(findstring $(TARGET_ARCH),$(INTEL_ARCHS)),)
|
|
||||||
FINAL_CPPFLAGS += -fPIC
|
|
||||||
ifeq ($(findstring mingw,$(TARGET_ABI)),)
|
|
||||||
ifeq ($(LIBTYPE),shared)
|
|
||||||
FINAL_LIBFLAGS += -ldl
|
|
||||||
else
|
|
||||||
FINAL_LIBFLAGS += -l:libdl.a
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH),armv7hl)
|
|
||||||
FINAL_CPPFLAGS += -fPIC
|
|
||||||
else ifeq ($(TARGET_ARCH),aarch64)
|
|
||||||
FINAL_CPPFLAGS += -fPIC
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(DEVELOPMENT),true)
|
|
||||||
FINAL_CPPFLAGS += -D_DEVELOPMENT_
|
|
||||||
export G_SLICE = always-malloc
|
|
||||||
export G_DEBUG = gc-friendly,resident-modules
|
|
||||||
export MALLOC_CHECK_ = 2
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(LOG_QUAL_PREFIX),)
|
|
||||||
FINAL_CPPFLAGS += -DKEEP_FILES_OPEN -DLOG_QUAL_PREFIX=\"$(LOG_QUAL_PREFIX)\"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CATCH_ONLY_YERROR),true)
|
|
||||||
FINAL_CPPFLAGS += -DCATCH_ONLY_YERROR
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_VERSION_MACROS),true)
|
|
||||||
FINAL_CPPFLAGS += -DVERSION=$(HEX_VERSION) -DVERSION_STR=\"$(VERSION)\"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(TARGET_TRIPLET),arm-none-eabi)
|
|
||||||
|
|
||||||
ifeq ($(TARGET_CPU),cortex-m3)
|
|
||||||
FINAL_CPPFLAGS += -mcpu=cortex-m3 -mthumb
|
|
||||||
FINAL_LDFLAGS += -mcpu=cortex-m3 -mthumb
|
|
||||||
else ifeq ($(TARGET_CPU),cortex-m4)
|
|
||||||
FINAL_CPPFLAGS += -mcpu=cortex-m4 -mthumb
|
|
||||||
FINAL_LDFLAGS += -mcpu=cortex-m4 -mthumb
|
|
||||||
else ifeq ($(TARGET_CPU),cortex-m7)
|
|
||||||
FINAL_CPPFLAGS += -mcpu=cortex-m7 -mthumb
|
|
||||||
FINAL_LDFLAGS += -mcpu=cortex-m7 -mthumb
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(findstring cortex-m,$(TARGET_CPU)),)
|
|
||||||
|
|
||||||
# don't wrap error message lines
|
|
||||||
#FINAL_LDFLAGS += -fmessage-length=0
|
|
||||||
|
|
||||||
# don't know what kind of optimization that is
|
|
||||||
#FINAL_LDFLAGS += -Og
|
|
||||||
|
|
||||||
# stick with what janware code tends to expect
|
|
||||||
FINAL_LDFLAGS += -fsigned-char
|
|
||||||
|
|
||||||
# I have no clue which part would evaluate these names
|
|
||||||
FINAL_LDFLAGS += -ffunction-sections
|
|
||||||
FINAL_LDFLAGS += -fdata-sections
|
|
||||||
FINAL_LDFLAGS += -ffreestanding
|
|
||||||
FINAL_LDFLAGS += -fno-move-loop-invariants
|
|
||||||
|
|
||||||
# skip any automatic initialization
|
|
||||||
FINAL_LDFLAGS += -nostartfiles
|
|
||||||
|
|
||||||
# garbage collect unused input sections
|
|
||||||
FINAL_LDFLAGS += -Xlinker --gc-sections
|
|
||||||
#FINAL_LDFLAGS += -Xlinker --print-gc-sections
|
|
||||||
|
|
||||||
# create map file
|
|
||||||
FINAL_LDFLAGS += -Wl,-Map,"$(EXE_MAP)"
|
|
||||||
|
|
||||||
# use newlib-nano, provides symbols _write _close _fstat _isatty _lseek (at least)
|
|
||||||
# (TODO: No -Wl necessary?)
|
|
||||||
FINAL_LDFLAGS += --specs=nano.specs
|
|
||||||
FINAL_LDFLAGS += --specs=nosys.specs
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
USE_DISABLE_COMPILER_OPTIMISATION_OPTS = false
|
|
||||||
USE_EXCEPTIONS_IN_C = false
|
|
||||||
ARM_NONE_EABI_ALLFLAGS += -fno-exceptions
|
|
||||||
ifeq ($(USE_DISABLE_COMPILER_OPTIMISATION_OPTS),true)
|
|
||||||
ARM_NONE_EABI_ALLFLAGS += -Os
|
|
||||||
endif
|
|
||||||
FINAL_LDFLAGS += $(ARM_NONE_EABI_ALLFLAGS)
|
|
||||||
FINAL_CPPFLAGS += $(ARM_NONE_EABI_ALLFLAGS)
|
|
||||||
FINAL_CXXFLAGS += -fno-rtti
|
|
||||||
|
|
||||||
# -- used by modm, but currently disabled for test purposes
|
|
||||||
#FINAL_CFLAGS += -fno-threadsafe-statics
|
|
||||||
#FINAL_CFLAGS += -fno-unwind-tables
|
|
||||||
#FINAL_CFLAGS += -fstrict-enums
|
|
||||||
#FINAL_CFLAGS += -fuse-cxa-atexit
|
|
||||||
#FINAL_CFLAGS += -fshort-wchar
|
|
||||||
#FINAL_CFLAGS += -fsingle-precision-constant
|
|
||||||
#FINAL_CFLAGS += -funsigned-bitfields
|
|
||||||
#FINAL_CFLAGS += -funsigned-char
|
|
||||||
#FINAL_CFLAGS += -fwrapv
|
|
||||||
#FINAL_CFLAGS += -g3
|
|
||||||
#FINAL_CFLAGS += -gdwarf
|
|
||||||
#FINAL_CFLAGS += -W
|
|
||||||
#FINAL_CFLAGS += -Wall
|
|
||||||
#FINAL_CFLAGS += -Wdouble-promotion
|
|
||||||
#FINAL_CFLAGS += -Wduplicated-cond
|
|
||||||
#FINAL_CFLAGS += -Werror=format
|
|
||||||
#FINAL_CFLAGS += -Werror=maybe-uninitialized
|
|
||||||
#FINAL_CFLAGS += -Werror=overflow
|
|
||||||
#FINAL_CFLAGS += -Werror=sign-compare
|
|
||||||
#FINAL_CFLAGS += -Wextra
|
|
||||||
#FINAL_CFLAGS += -Wlogical-op
|
|
||||||
#FINAL_CFLAGS += -Wpointer-arith
|
|
||||||
#FINAL_CFLAGS += -Wundef
|
|
||||||
|
|
||||||
|
|
||||||
#FINAL_CXXFLAGS += -fdata-sections
|
|
||||||
#FINAL_CXXFLAGS += -ffunction-sections
|
|
||||||
#FINAL_CXXFLAGS += -finline-limit=10000
|
|
||||||
#FINAL_CPPFLAGS += -fshort-wchar
|
|
||||||
#FINAL_CPPFLAGS += -fsingle-precision-constant
|
|
||||||
#FINAL_CPPFLAGS += -funsigned-bitfields
|
|
||||||
#FINAL_CPPFLAGS += -funsigned-char
|
|
||||||
#FINAL_CPPFLAGS += -fwrapv
|
|
||||||
#FINAL_CPPFLAGS += -g3
|
|
||||||
#FINAL_CPPFLAGS += -gdwarf
|
|
||||||
#FINAL_CPPFLAGS += -W
|
|
||||||
#FINAL_CPPFLAGS += -Wall
|
|
||||||
#FINAL_CPPFLAGS += -Wdouble-promotion
|
|
||||||
#FINAL_CPPFLAGS += -Wduplicated-cond
|
|
||||||
#FINAL_CPPFLAGS += -Werror=format
|
|
||||||
#FINAL_CPPFLAGS += -Werror=maybe-uninitialized
|
|
||||||
#FINAL_CPPFLAGS += -Werror=overflow
|
|
||||||
#FINAL_CPPFLAGS += -Werror=sign-compare
|
|
||||||
#FINAL_CPPFLAGS += -Wextra
|
|
||||||
#FINAL_CPPFLAGS += -Wlogical-op
|
|
||||||
#FINAL_CXXFLAGS += -Wpointer-arith
|
|
||||||
#FINAL_CPPFLAGS += -Wundef
|
|
||||||
#FINAL_CXXFLAGS += -fno-threadsafe-statics
|
|
||||||
#FINAL_CPPFLAGS += -fno-unwind-tables
|
|
||||||
#FINAL_CXXFLAGS += -fstrict-enums
|
|
||||||
#FINAL_CPPFLAGS += -fuse-cxa-atexit
|
|
||||||
#FINAL_CXXFLAGS += -std=c++17
|
|
||||||
#FINAL_CXXFLAGS += -Woverloaded-virtual
|
|
||||||
#FINAL_CXXFLAGS += -fno-move-loop-invariants
|
|
||||||
#FINAL_CPPFLAGS += -fno-split-wide-types
|
|
||||||
#FINAL_CPPFLAGS += -fno-tree-loop-optimize
|
|
||||||
|
|
||||||
#FINAL_CPPFLAGS += -fno-exceptions
|
|
||||||
#FINAL_CXXFLAGS += -fno-rtti
|
|
||||||
|
|
||||||
ifneq ($(findstring gnu-mcu-eclipse,$(TAGGED_TMPL_TAGS)),)
|
|
||||||
LD_DEFINE_SYMBOLS += _sbrk
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
FINAL_LDFLAGS += $(addprefix -u ,$(LD_DEFINE_SYMBOLS))
|
|
||||||
|
|
||||||
# -- target files and dirs
|
|
||||||
|
|
||||||
SRC_SUFFIX += $(sort $(suffix $(wildcard $(TOPDIR)/hdr/*)))
|
|
||||||
LOCAL_SRC += Makefile $(wildcard $(addprefix *,$(SRC_SUFFIX)))
|
|
||||||
SRC_HEADERED += $(shell if [ "$(LOCAL_SRC)" ]; then grep -ic "it services" $(LOCAL_SRC) | $(SED) '/:0$$/ d; s/:.*$$//'; fi)
|
|
||||||
SRC_UNHEADERED += $(filter-out $(SRC_HEADERED),$(LOCAL_SRC))
|
|
||||||
LOCAL_C ?= $(wildcard *.c)
|
|
||||||
LOCAL_CPP ?= $(wildcard *.cc *.cpp *.C)
|
|
||||||
LOCAL_H ?= $(wildcard *.h *.H *.hpp *.hh)
|
|
||||||
SFILES ?= $(wildcard *.S *.sx)
|
|
||||||
#PREREQ_H += $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.h))
|
|
||||||
ALL_H += $(LOCAL_H) $(PREREQ_H)
|
|
||||||
SRC_ALL_CPP += $(filter-out $(SRC_ALL_CPP_IGNORE),$(LOCAL_C) $(LOCAL_CPP) $(LOCAL_H))
|
|
||||||
SRC_C += $(filter %.c, $(SRC_ALL_CPP))
|
|
||||||
SRC_CPP += $(filter %.cc %.cpp %.C, $(SRC_ALL_CPP))
|
|
||||||
BUILD_OBJ += $(addprefix $(FLAVOUR_PREFIX),$(patsubst %.C,%.o,$(patsubst %.cpp,%.o,$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(filter %.c %.cpp %.cc %.C, $(SRC_ALL_CPP)))))))
|
|
||||||
BUILD_OBJ += $(addprefix $(FLAVOUR_PREFIX),$(patsubst %.sx,%.o,$(patsubst %.S,%.o,$(SFILES))))
|
|
||||||
|
|
||||||
#PREREQ_C += $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.c))
|
|
||||||
#PREREQ_CPP += $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.c)) \
|
|
||||||
# $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.cpp))
|
|
||||||
#PREREQ_CSRC += $(PREREQ_H) $(PREREQ_C) $(PREREQ_CPP)
|
|
||||||
REQUIRED_DIR += $(patsubst %,$(JWBDIR)/%,$(REQUIRED))
|
|
||||||
REQUIRED_DONE += $(patsubst %,%/all.done,$(REQUIRED_DIR))
|
|
||||||
REQUIRED_H += $(foreach dir,$(REQUIRED_DIR),$(wildcard $(dir)/*.h))
|
|
||||||
REQUIRED_C += $(foreach dir,$(REQUIRED_DIR),$(wildcard $(dir)/*.c))
|
|
||||||
REQUIRED_CPP += $(foreach dir,$(REQUIRED_DIR),$(wildcard $(dir)/*.cpp)) \
|
|
||||||
$(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.cpp))
|
|
||||||
REQUIRED_CSRC += $(REQUIRED_H) $(REQUIRED_C) $(REQUIRED_CPP)
|
|
||||||
|
|
||||||
ALL_C += $(LOCAL_C) $(PREREQ_CPP)
|
|
||||||
ALL_CPP += $(LOCAL_CPP) $(PREREQ_CPP)
|
|
||||||
ALL_CSRC += $(LOCAL_CSRC) $(PREREQ_CSRC)
|
|
||||||
|
|
||||||
ifeq ($(USE_QT),true)
|
|
||||||
include $(JWBDIR)/make/qtversion.mk
|
|
||||||
include $(JWBDIR)/make/qt-defs.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_X),true)
|
|
||||||
FINAL_LDFLAGS += -L/usr/X11/$(SYSTEM_LIBDIR_NAME) -lXext -lX11
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(TARGET_TRIPLET),arm-none-eabi)
|
|
||||||
FINAL_LPPFLAGS += -lstdc++
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
FINAL_CPPFLAGS += -DWIN32
|
|
||||||
# see https://stackoverflow.com/questions/4492799
|
|
||||||
FINAL_LDFLAGS += -fstack-protector
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(LOG_THREAD_NAMES), true)
|
|
||||||
FINAL_CPPFLAGS += -DSLOG_THREAD_NAMES
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ----- standard features, switched on with USE_XXX = true
|
|
||||||
|
|
||||||
#include $(JWBDIR)/make/lib-deps.mk
|
|
||||||
|
|
||||||
ifeq ($(USE_GFILTER),true)
|
|
||||||
GFILT = sh $(firstword $(wildcard $(JWBDIR)/contrib/gfilt/gfilt $(JWBDIR)/bin/gfilt))
|
|
||||||
ifneq ($(strip $(GFILT)),sh)
|
|
||||||
GXX = $(GFILT)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_PROJECT_LIB),true)
|
|
||||||
PROJECTLIB_LDFLAGS += -L$(TOPDIR)/lib -l$(LIBNAME)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(filter jw-build,$(PREREQ_BUILD)),)
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
JW_FINAL_LDFLAGS += -lglib-2.0 -lws2_32 -lstdc++
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_SYSTEMD),true)
|
|
||||||
FINAL_CPPFLAGS += -D_USE_SYSTEMD_ $(shell $(PKG_CONFIG_EXE) --cflags libsystemd)
|
|
||||||
FINAL_LDFLAGS += $(shell $(PKG_CONFIG_EXE) --libs libsystemd)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_TIMER),true)
|
|
||||||
FINAL_CPPFLAGS += -D_USE_TIMER_
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_FAST_LOG),false)
|
|
||||||
FINAL_CPPFLAGS += -D_USE_FAST_LOG_=0
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_YAMD),true)
|
|
||||||
CC = yamd-gcc
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_MPATROL),true)
|
|
||||||
#FINAL_CPPFLAGS += -include /usr/include/mpatrol.h
|
|
||||||
FINAL_LDFLAGS += -lmpatrolmt -lbfd -liberty
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_VALGRIND),true)
|
|
||||||
FINAL_CPPFLAGS += -include /usr/include/valgrind/memcheck.h -D_VALGRIND_
|
|
||||||
# FINAL_LDFLAGS +=
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_MCHECK),true)
|
|
||||||
FINAL_LDFLAGS += -lmcheck
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_STACK_PROTECTOR),true)
|
|
||||||
FINAL_CPPFLAGS += -fstack-protector-all
|
|
||||||
#FINAL_CPPFLAGS += -fstack-protector
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_STACK_CHECKER),true)
|
|
||||||
ifeq "$(COMPILER_SUITE)" "clang"
|
|
||||||
FINAL_CPPFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
|
||||||
FINAL_LDFLAGS += -fsanitize=address
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_DBMALLOC),true)
|
|
||||||
CONTRIB_LIBS += dbmalloc
|
|
||||||
FINAL_CPPFLAGS += -DDBMALLOC -DEXITFUN=_exit -I$(TOPDIR)/contrib/dbmalloc
|
|
||||||
FINAL_LDFLAGS += -ldbmalloc
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_DMALLOC),true)
|
|
||||||
FINAL_CPPFLAGS += -DDMALLOC -DDMALLOC_FUNC_CHECK -DSTORE_SEEN_COUNT
|
|
||||||
FINAL_LDFLAGS += -ldmallocthcxx -ldmallocth
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_MEMWATCH),true)
|
|
||||||
FINAL_CPPFLAGS += -DMEMWATCH -DMW_STDIO
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_EFENCE),true)
|
|
||||||
FINAL_CPPFLAGS += -DEFENCE
|
|
||||||
FINAL_LDFLAGS += -lefence
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_TRACING),true)
|
|
||||||
FINAL_CPPFLAGS += -D_DO_TRACE_
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_ASSERTIONS),false)
|
|
||||||
FINAL_CPPFLAGS += -DNDEBUG
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(COMPILE_DEBUG_CODE),true)
|
|
||||||
FINAL_CPPFLAGS += -D_DEBUG_
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(COMPILE_DEBUG_LOG),true)
|
|
||||||
FINAL_CPPFLAGS += -D_LOG_DEBUG_
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_MPATROL),true)
|
|
||||||
FINAL_CPPFLAGS += -include $(JWBDIR)/include/mpatrol.h
|
|
||||||
FINAL_LDFLAGS += -lmpatrolmt -lbfd -liberty
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(BREAK_ABI),true)
|
|
||||||
FINAL_CPPFLAGS += -D_BREAK_ABI_
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_STACK_CHECK),true)
|
|
||||||
FINAL_CPPFLAGS += -fstack-check
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_COMPILER_DEBUG_OPTS),true)
|
|
||||||
#FINAL_EXTRA_DEBUG_FLAGS += -gdwarf-2
|
|
||||||
FINAL_CPPFLAGS += -g3 $(FINAL_EXTRA_DEBUG_FLAGS)
|
|
||||||
FINAL_LDFLAGS += -g3 $(FINAL_EXTRA_DEBUG_FLAGS)
|
|
||||||
ifneq ($(USE_COMPILER_OPTIMIZATION_OPTS),true)
|
|
||||||
FINAL_CPPFLAGS += -Og
|
|
||||||
FINAL_LDFLAGS += -Og
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CC),$(GCC))
|
|
||||||
GCC_NO_OPT_FLAGS = \
|
|
||||||
-fno-inline-functions-called-once \
|
|
||||||
-fno-tree-loop-optimize \
|
|
||||||
-fno-early-inlining \
|
|
||||||
-fno-default-inline
|
|
||||||
else ifeq ($(CC),$(CLANG))
|
|
||||||
FINAL_CPPFLAGS += -Werror
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_COMPILER_OPTIMIZATION_OPTS),true)
|
|
||||||
FINAL_CPPFLAGS += -funroll-loops -O3
|
|
||||||
else ifeq ($(USE_DISABLE_COMPILER_OPTIMISATION_OPTS),true)
|
|
||||||
NO_OPT_FLAGS = \
|
|
||||||
-O0 -g -fno-inline -fno-omit-frame-pointer \
|
|
||||||
-fno-optimize-sibling-calls \
|
|
||||||
$(GCC_NO_OPT_FLAGS)
|
|
||||||
# -fconserve-stack
|
|
||||||
|
|
||||||
# breaks constexpr
|
|
||||||
#NO_OPT_FLAGS += -fno-builtin
|
|
||||||
|
|
||||||
_NO_OPT_FLAGS = \
|
|
||||||
-O0 \
|
|
||||||
-fno-implicit-inline-templates \
|
|
||||||
-fno-implement-inlines \
|
|
||||||
-fno-default-inline \
|
|
||||||
-fno-inline \
|
|
||||||
-finline-limit=0 \
|
|
||||||
-fkeep-inline-functions \
|
|
||||||
-fno-inline-functions \
|
|
||||||
$(GCC_NO_OPT_FLAGS)
|
|
||||||
|
|
||||||
FINAL_CPPFLAGS += $(NO_OPT_FLAGS)
|
|
||||||
FINAL_LDFLAGS += $(NO_OPT_FLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_EXCEPTIONS_IN_C),true)
|
|
||||||
FINAL_CFLAGS += -fexceptions
|
|
||||||
ifeq ($(LIBTYPE),shared)
|
|
||||||
GCC_LDFLAGS += -shared-libgcc
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(STRIP_SYMBOLS),true)
|
|
||||||
STRIP_DONE ?= strip.done
|
|
||||||
endif
|
|
||||||
|
|
||||||
FINAL_INCLUDE += $(LOCAL_INCLUDE)
|
|
||||||
|
|
||||||
# force use of double quotes, allow header namespaces
|
|
||||||
ifeq ($(HDRDIR_SCOPE_SUFFIX),)
|
|
||||||
FINAL_INCLUDE += -I.
|
|
||||||
else
|
|
||||||
FINAL_INCLUDE += -iquote .
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_PROJECT_LIB),true)
|
|
||||||
FINAL_INCLUDE += $(PROJECT_INCLUDE) -I$(TOPDIR)/include
|
|
||||||
FINAL_LIBFLAGS += -L$(BUILD_LIBDIR)
|
|
||||||
endif
|
|
||||||
|
|
||||||
FINAL_INCLUDE += $(call proj_query, cflags $(PREREQ_BUILD) $(PROJECT))
|
|
||||||
|
|
||||||
LDFLAGS_QUERY_ARGS = $(addprefix --exclude ,$(LDFLAGS_EXCLUDE))
|
|
||||||
FINAL_LIBFLAGS += $(call proj_query, ldflags $(LDFLAGS_QUERY_ARGS) --add-self $(PREREQ_BUILD))
|
|
||||||
|
|
||||||
# the following is necessary, because not all projects have build.libname = none in project.conf
|
|
||||||
ifeq ($(USE_PROJECT_LIB),true)
|
|
||||||
LDFLAGS_QUERY_ARGS_SELF = --add-self
|
|
||||||
endif
|
|
||||||
FINAL_LIBFLAGS += $(call proj_query, ldflags $(LDFLAGS_QUERY_ARGS) $(LDFLAGS_QUERY_ARGS_SELF) $(PROJECT))
|
|
||||||
|
|
||||||
ifeq ($(USE_SNDFILE),true)
|
|
||||||
FINAL_LIBFLAGS += -lsndfile
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_FFTW),true)
|
|
||||||
FINAL_LIBFLAGS += -lfftw3
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_GLIB),true)
|
|
||||||
FINAL_CPPFLAGS += $(shell $(PKG_CONFIG_EXE) --cflags glib-2.0)
|
|
||||||
FINAL_LIBFLAGS += $(shell $(PKG_CONFIG_EXE) --libs glib-2.0)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CC),$(CLANG))
|
|
||||||
COMPILER_CFLAGS += $(CLANG_CFLAGS)
|
|
||||||
COMPILER_CPPFLAGS += $(CLANG_CPPFLAGS)
|
|
||||||
COMPILER_CXXFLAGS += $(CLANG_CXXFLAGS)
|
|
||||||
COMPILER_LDFLAGS += $(CLANG_LDFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CC),$(GCC))
|
|
||||||
COMPILER_CFLAGS += $(GCC_CFLAGS)
|
|
||||||
COMPILER_CPPFLAGS += $(GCC_CPPFLAGS)
|
|
||||||
COMPILER_CXXFLAGS += $(GCC_CXXFLAGS)
|
|
||||||
COMPILER_LDFLAGS += $(GCC_LDFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
FINAL_CFLAGS += $(LOCAL_CFLAGS) $(PROJECT_CFLAGS) $(COMPLILER_CFLAGS) $(FINAL_INCLUDE)
|
|
||||||
FINAL_CPPFLAGS += $(LOCAL_CPPFLAGS) $(PROJECT_INCLUDE) $(PROJECT_CPPFLAGS) $(COMPILER_CPPFLAGS) $(FINAL_INCLUDE)
|
|
||||||
FINAL_CXXFLAGS += $(LOCAL_CXXFLAGS) $(PROJECT_CXXFLAGS) $(COMPILER_CXXFLAGS) $(FINAL_INCLUDE)
|
|
||||||
FINAL_LDFLAGS += $(LOCAL_LDFLAGS) $(PROJECTLIB_LDFLAGS) $(PROJECT_LDFLAGS) $(COMPILER_LDFLAGS) $(FINAL_LPPFLAGS) $(FINAL_LIBFLAGS)
|
|
||||||
|
|
||||||
#RPM_REQUIRES = $(shell $(ECHO) "$(RPM_REQUIRES_RUN) $(RPM_REQUIRES_DEVEL)" | $(add_flavour_prefix))
|
|
||||||
RPM_REQUIRES += $(RPM_REQUIRES_RUN) $(RPM_REQUIRES_DEVEL)
|
|
||||||
|
|
||||||
REAL_CFLAGS ?= $(FINAL_CFLAGS)
|
|
||||||
REAL_CPPFLAGS ?= $(FINAL_CPPFLAGS)
|
|
||||||
REAL_CXXFLAGS ?= $(FINAL_CXXFLAGS)
|
|
||||||
REAL_LDFLAGS ?= $(FINAL_LDFLAGS)
|
|
||||||
|
|
||||||
# -- LIB
|
|
||||||
INSTALLATION_FILE_TYPES += LIB
|
|
||||||
#BUILD_PIDIR = $(BUILD_LIBDIR)
|
|
||||||
#BUILD_PI = $(addprefix $(BUILD_PIDIR)/,$(PLUGIN))
|
|
||||||
#INSTALL_PIDIR = $(INSTALL_LIBDIR)
|
|
||||||
#INSTALLED_PI = $(addprefix $(INSTALL_PIDIR)/,$(PLUGIN))
|
|
||||||
|
|
||||||
BUILD_LIBDIR ?= $(TOPDIR)/lib
|
|
||||||
|
|
||||||
LOCAL_LIBS += $(CONTRIB_LIBS) $(PLUGIN)
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
ifeq ($(TC_SYS_ROOT),)
|
|
||||||
CONTRIB_LIBS_PATH += $(CROSS_TOOL_DIR)/bin
|
|
||||||
else
|
|
||||||
CONTRIB_LIBS_PATH += $(TC_SYS_ROOT)/lib
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
INSTALL_LIBDIR ?= $(EXE_PREFIX)/lib
|
|
||||||
|
|
||||||
ifeq ($(LIBTYPE),shared)
|
|
||||||
ifneq ($(TARGET),mingw)
|
|
||||||
FINAL_LDFLAGS += -rdynamic
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
LIB_SO ?=
|
|
||||||
FINAL_LDFLAGS += -static
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_PROJECT_LIB),true)
|
|
||||||
LIBNAME ?= $(PROJECT)
|
|
||||||
MEMBERS += $(LIB_A)($(BUILD_OBJ))
|
|
||||||
VERSION_SCRIPT = $(BUILD_LIBDIR)/version.ldscript
|
|
||||||
# TODO: use something like this as unifying variable, there are far too many
|
|
||||||
# lib-related variables
|
|
||||||
LOCAL_LIBS +=
|
|
||||||
ifneq ($(TARGET),mingw)
|
|
||||||
LIB_A ?= $(BUILD_LIBDIR)/lib$(LIBNAME).a
|
|
||||||
SO_SUFFIX ?= so.$(MAJOR_MINOR_RELEASE)
|
|
||||||
SO_PREFIX ?= lib
|
|
||||||
LIB_SO ?= $(BUILD_LIBDIR)/lib$(LIBNAME).$(SO_SUFFIX)
|
|
||||||
LINKS_SO += $(filter-out $(LIB_SO),$(shell $(ECHO) $(LIB_SO) | $(SED) -e "s/\.so\..*$$/.so/"))
|
|
||||||
INSTALLED_LINKS_SO += $(filter-out $(INSTALLED_LIB_SO),$(shell $(ECHO) $(INSTALLED_LIB_SO) | $(SED) -e "s/\.so\..*$$/.so/"))
|
|
||||||
INSTALLED_LIB_A = $(INSTALL_LIBDIR)/lib$(LIBNAME).a
|
|
||||||
else
|
|
||||||
LIB_A = $(BUILD_LIBDIR)/lib$(LIBNAME)-static.a
|
|
||||||
#WINRES_RC_TMPL = $(JWBDIR)/make/winres-minimal.rc.tmpl
|
|
||||||
WINRES_RC_TMPL = $(JWBDIR)/make/winres.rc.tmpl
|
|
||||||
WINRES_RC = $(BUILD_LIBDIR)/$(PROJECT).rc
|
|
||||||
WINRES_O = $(WINRES_RC).o
|
|
||||||
SO_SUFFIX ?= dll
|
|
||||||
SO_PREFIX ?=
|
|
||||||
LIB_DEF = $(BUILD_LIBDIR)/$(LIBNAME).def
|
|
||||||
MSVCPP_IMPLIB = $(BUILD_LIBDIR)/$(LIBNAME).lib
|
|
||||||
LIB_SO ?= $(BUILD_LIBDIR)/$(LIBNAME).dll
|
|
||||||
INSTALLED_LIB_A = $(INSTALL_LIBDIR)/lib$(LIBNAME).a
|
|
||||||
endif # mingw
|
|
||||||
BUILD_LIB += $(LIB_SO)
|
|
||||||
endif # USE_PROJECT_LIB
|
|
||||||
|
|
||||||
INSTALLED_LIB_SO = $(addprefix $(INSTALL_LIBDIR)/,$(notdir $(LIB_SO)))
|
|
||||||
INSTALLED_DEF = $(addprefix $(INSTALL_LIBDIR)/,$(wildcard *.lib *.exp))
|
|
||||||
INSTALLED_LIB += $(addprefix $(INSTALL_LIBDIR)/,$(LOCAL_LIBS))
|
|
||||||
BUILD_LIB += $(addprefix $(BUILD_LIBDIR)/,$(LOCAL_LIBS))
|
|
||||||
INSTALLED_ALL_LIBS = $(addprefix $(INSTALL_LIBDIR)/,$(wildcard *.a))
|
|
||||||
INSTALLED_LIB += $(INSTALLED_LIB_SO) $(INSTALLED_SHOBJS) \
|
|
||||||
$(INSTALLED_LINKS_SO) $(sort $(INSTALLED_LIB_A) $(INSTALLED_ALL_LIBS)) \
|
|
||||||
$(INSTALLED_DEF)
|
|
||||||
|
|
||||||
endif # ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
|
|
||||||
endif # ifndef JW_BUILD_CPP_DEFS_MK_INCLUDED
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
# variables
|
|
||||||
DEPEND_CFLAGS += -D__MAKEDEPEND__
|
|
||||||
DEPEND_CXXFLAGS += -D__MAKEDEPEND__
|
|
||||||
DEPEND_MK += $(addprefix .,$(addsuffix .dep.mk, $(BUILD_OBJ)))
|
|
||||||
|
|
||||||
ifeq ($(DEPEND_MK_INCLUDED),)
|
|
||||||
|
|
||||||
all:
|
|
||||||
clean: depclean
|
|
||||||
|
|
||||||
# convenience targets
|
|
||||||
dep: $(DEPEND_MK)
|
|
||||||
depclean:
|
|
||||||
$(RM) -f .*.dep.mk
|
|
||||||
|
|
||||||
$(DEPEND_MK): $(PREREQ_DONE)
|
|
||||||
|
|
||||||
ifneq ($(DEPEND_MK),)
|
|
||||||
ifeq ($(MAKECMDGOALS),)
|
|
||||||
-include $(DEPEND_MK)
|
|
||||||
endif
|
|
||||||
ifneq ($(filter all,$(MAKECMDGOALS)),)
|
|
||||||
-include $(DEPEND_MK)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
%.o: .%.o.dep.mk
|
|
||||||
|
|
||||||
.%.o.dep.mk: %.cpp $(BUILD_HDR) $(SRC_H)
|
|
||||||
$(CC) -M $(FINAL_CXXFLAGS) $(FINAL_CPPFLAGS) $(DEPEND_CXXFLAGS) $< -o $@
|
|
||||||
|
|
||||||
.%.o.dep.mk: %.cc $(BUILD_HDR) $(SRC_H)
|
|
||||||
$(CC) -M $(FINAL_CXXFLAGS) $(FINAL_CPPFLAGS) $(DEPEND_CXXFLAGS) $< -o $@
|
|
||||||
|
|
||||||
.%.o.dep.mk: %.c $(BUILD_HDR) $(SRC_H)
|
|
||||||
$(CC) -M $(FINAL_CFLAGS) $(FINAL_CPPFLAGS) $(DEPEND_CXXFLAGS) $< -o $@
|
|
||||||
|
|
||||||
show-vars: show-vars-depend-mk
|
|
||||||
show-vars-depend-mk:
|
|
||||||
@echo DEPEND_MK = $(DEPEND_MK)
|
|
||||||
@echo BUILD_HDR = $(BUILD_HDR)
|
|
||||||
@echo SRC_H = $(SRC_H)
|
|
||||||
|
|
||||||
endif # DEPEND_MK_INCLUDED
|
|
||||||
DEPEND_MK_INCLUDED := true
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
DISABLED = @echo Target \"$1\" in $(shell pwd)/Makefile has been disabled.
|
|
||||||
|
|
||||||
all:
|
|
||||||
$(call DISABLED,$@)
|
|
||||||
|
|
||||||
install clean distclean:
|
|
||||||
$(call DISABLED,$@)
|
|
||||||
87
make/dist.mk
87
make/dist.mk
|
|
@ -1,87 +0,0 @@
|
||||||
# -- general, and important
|
|
||||||
LOCAL_PROJECT = $(PROJECT)
|
|
||||||
|
|
||||||
TARGET_HOST = cvs.janware.com
|
|
||||||
UPLOAD_DOCUMENT_ROOT = /usr/local/httpd/htdocs
|
|
||||||
UPLOAD_VIRTUAL_SERVER_ROOT = www.jannet.de_443
|
|
||||||
TARGET_USER = root
|
|
||||||
TARGET_GROUP = root
|
|
||||||
TARGET_FILE_MODE = 755
|
|
||||||
TARGET_DIR_MODE = 755
|
|
||||||
DOWNLOAD_SERVER = https://www.jannet.de:443
|
|
||||||
URL_RELATIVE_PATH = $(CUSTOMER)/projects/$(LOCAL_PROJECT)/download
|
|
||||||
SSI_DOWNLOAD_TMPL = $(JWBDIR)/doctmpl/html/ssi/ssi_download.html.tmpl
|
|
||||||
DOWNLOAD_REFERRER_DIRS = $(addprefix $(UPLOAD_DOCUMENT_ROOT)/, \
|
|
||||||
$(UPLOAD_VIRTUAL_SERVER_ROOT)/$(URL_RELATIVE_PATH) \
|
|
||||||
)
|
|
||||||
|
|
||||||
# -- general, and less important
|
|
||||||
DISTDIR = $(TOPDIR)/dist
|
|
||||||
DIST_FILE = $(DISTDIR)/$(PROJECT)-$(VERSION).tar.gz
|
|
||||||
TMPHTML = $(DISTDIR)/html
|
|
||||||
DOWNLOAD_URLDIR = $(DOWNLOAD_SERVER)/$(URL_RELATIVE_PATH)
|
|
||||||
TARGET_DIR ?= $(UPLOAD_DOCUMENT_ROOT)/$(UPLOAD_VIRTUAL_SERVER_ROOT)/$(URL_RELATIVE_PATH)
|
|
||||||
SSI_PREFIX = $(TMPHTML)/ssi_download_
|
|
||||||
|
|
||||||
$(TMPHTML):
|
|
||||||
mkdir -p $(TMPHTML)
|
|
||||||
test -d $(TMPHTML) && $(RM) -rf $(TMPHTML)/*
|
|
||||||
|
|
||||||
|
|
||||||
$(SSI_PREFIX)%.html: $(TMPHTML) $(SSI_DOWNLOAD_TMPL)
|
|
||||||
STEM=`basename $*` ;\
|
|
||||||
DIR=`dirname $*` ;\
|
|
||||||
EXPLANATION="$(PROJECT_DESCR)";\
|
|
||||||
SIZE=`ls -l $(DIST_FILE) | awk '{print $$5}'`;\
|
|
||||||
FILENAME=`basename $(DIST_FILE)` ;\
|
|
||||||
URLDIR=`echo $(DOWNLOAD_URLDIR) | $(SED) -e 's/\\//\\\\\//g;'` ;\
|
|
||||||
$(CAT) $(SSI_DOWNLOAD_TMPL) | $(SED) -e "\
|
|
||||||
s/_VERSION_/$(LOCAL_DIST_VERSION)/g;\
|
|
||||||
s/_PROJECT_/$(LOCAL_PROJECT)/g;\
|
|
||||||
s/_TARGET_STEM_//g;\
|
|
||||||
s/_FILENAME_/$$FILENAME/g;\
|
|
||||||
s/_DATE_/$(shell date +"%Y-%m-%d")/g;\
|
|
||||||
s/_EXPLANATION_/$$EXPLANATION/g;\
|
|
||||||
s/_URLDIR_/$$URLDIR/g;\
|
|
||||||
s/_SIZE_/$$SIZE/g;\
|
|
||||||
" > $@
|
|
||||||
|
|
||||||
remove_dist:
|
|
||||||
$(RM) -rf $(DISTDIR)
|
|
||||||
|
|
||||||
distclean: remove_dist
|
|
||||||
$(DIST_FILE): distclean
|
|
||||||
mkdir -p $(DISTDIR)/src/$(PROJECT)
|
|
||||||
mkdir -p $(DISTDIR)/pckg
|
|
||||||
$(RM) -rf $(DISTDIR)/src/$(PROJECT)/*
|
|
||||||
mkdir -p $(DISTDIR)/src/$(PROJECT)/mod
|
|
||||||
cd $(TOPDIR); find . -type f | \
|
|
||||||
grep -ve 'CVS\|contrib/nomake\|tar.gz\|/dist/\|experimental' | \
|
|
||||||
xargs tar -cf - | tar -C $(DISTDIR)/src/$(PROJECT) -xf -
|
|
||||||
echo $(DIST_VERSION) > $(DISTDIR)/src/$(PROJECT)/VERSION ;\
|
|
||||||
echo $(REQUIRED) | while read mod ;\
|
|
||||||
do make -C $(JWBDIR)/$$mod clean ;\
|
|
||||||
cp -r $(JWBDIR)/$$mod $(DISTDIR)/src/$(PROJECT)/mod/ ;\
|
|
||||||
done ;\
|
|
||||||
cp $(JWBDIR)/Makefile $(DISTDIR)/src/$(PROJECT)/mod/ ;\
|
|
||||||
tar -czv -C $(DISTDIR)/src/ -f $(DIST_FILE) $(PROJECT)
|
|
||||||
|
|
||||||
build.dist: $(DIST_FILE)
|
|
||||||
|
|
||||||
# -- install.dist
|
|
||||||
install.dist: $(DIST_FILE) $(SSI_PREFIX)_$(PROJECT)_$(DIST_VERSION).html
|
|
||||||
@echo "-- installing distribution files to $(TARGET_HOST):$(TARGET_DIR) as user $(TARGET_USER)"
|
|
||||||
$(CVS_RSH) -l $(TARGET_USER) $(TARGET_HOST) -C "\
|
|
||||||
mkdir -p $(TARGET_DIR); chmod $(TARGET_DIR_MODE) $(TARGET_DIR)"
|
|
||||||
/usr/bin/rsync -az -v --links -e $(CVS_RSH) $(DIST_FILE) $(TARGET_USER)@$(TARGET_HOST):$(TARGET_DIR)
|
|
||||||
$(CVS_RSH) -l $(TARGET_USER) $(TARGET_HOST) -C "\
|
|
||||||
cd $(TARGET_DIR); find . -type d | xargs -r chmod $(TARGET_DIR_MODE); find . -type f | xargs -r chmod $(TARGET_FILE_MODE)"
|
|
||||||
@echo "-- installing referrer include files to $(TARGET_HOST) as user $(TARGET_USER)"
|
|
||||||
for DIR in $(DOWNLOAD_REFERRER_DIRS) ; do \
|
|
||||||
echo "to $$DIR" ;\
|
|
||||||
$(CVS_RSH) -l $(TARGET_USER) $(TARGET_HOST) -C "\
|
|
||||||
mkdir -p $$DIR; chmod $(TARGET_DIR_MODE) $(TARGET_DIR)" ;\
|
|
||||||
/usr/bin/rsync -az -v --links -e $(CVS_RSH) $(TMPHTML)/ssi_download_*.html $(TARGET_USER)@$(TARGET_HOST):$$DIR ;\
|
|
||||||
$(CVS_RSH) -l $(TARGET_USER) $(TARGET_HOST) -C "\
|
|
||||||
cd $$DIR; find . -type d | xargs -r chmod $(TARGET_DIR_MODE); find . -type f | xargs -r chmod $(TARGET_FILE_MODE)" ;\
|
|
||||||
done
|
|
||||||
130
make/doxygen.mk
130
make/doxygen.mk
|
|
@ -1,130 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
ifeq ($(DEVELOPMENT),true)
|
|
||||||
GENERATE_DOXYGEN ?= true
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(GENERATE_DOXYGEN),true)
|
|
||||||
include $(JWBDIR)/make/dummy.mk
|
|
||||||
else
|
|
||||||
|
|
||||||
UPLOAD_FILE_MODE ?= 644
|
|
||||||
UPLOAD_DIR_MODE ?= 755
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/upload-defs.mk
|
|
||||||
|
|
||||||
UPLOAD_URL ?= $(UPLOAD_URL_DEVEL_DOC)/$(PROJECT)/doxygen/:$(UPLOAD_FILE_MODE):$(UPLOAD_DIR_MODE):$(UPLOAD_USER).$(UPLOAD_GROUP)
|
|
||||||
|
|
||||||
DX_INCLUDE ?= header.html footer.html styles.css
|
|
||||||
DX_LOGO ?= logo.png
|
|
||||||
DX_UNTEMPLATED = $(patsubst %.tmpl,%,$(wildcard *.tmpl))
|
|
||||||
DX_OUTPUT_DIR ?= html
|
|
||||||
DX_INSTALL_DIR ?= $(DOC_PREFIX)/devel
|
|
||||||
DX_DOC_FILES = $(DX_INCLUDE) $(DX_LOGO)
|
|
||||||
DX_DOXYGEN_CONF ?= doxygen.conf
|
|
||||||
DX_INCLUDE_TMPL_DIR ?= $(JWBDIR)/tmpl/doxygen
|
|
||||||
DX_FALLBACK_CONF_TMPL ?= $(DX_INCLUDE_TMPL_DIR)/doxygen.conf.tmpl
|
|
||||||
DX_BROWSER ?= $(BROWSER)
|
|
||||||
|
|
||||||
# replaced pattern defaults
|
|
||||||
DX_FILE_PATTERNS ?= *.h *.c *.cpp
|
|
||||||
DX_INPUT_DIRS ?= $(TOPDIR)/include
|
|
||||||
DX_SRC_IS_JAVA ?= NO
|
|
||||||
DX_EXCLUDE_FILES ?=
|
|
||||||
DX_INCLUDE_PATH ?=
|
|
||||||
DX_RECURSIVE ?= YES
|
|
||||||
DX_EXTRACT_STATIC ?= NO
|
|
||||||
DX_INLINE_SOURCES ?= NO
|
|
||||||
DX_SOURCE_BROWSER ?= NO
|
|
||||||
|
|
||||||
all: html
|
|
||||||
install: install.done
|
|
||||||
distclean: clean
|
|
||||||
clean: clean.doxygen
|
|
||||||
|
|
||||||
doc: all
|
|
||||||
upload: upload.done
|
|
||||||
html: doxygen.done cpfiles.done
|
|
||||||
|
|
||||||
view: doc.done
|
|
||||||
$(DX_BROWSER) $(DX_OUTPUT_DIR)/index.html
|
|
||||||
|
|
||||||
doxygen.done: $(DX_UNTEMPLATED) $(DX_DOC_FILES)
|
|
||||||
umask 0022 && doxygen $(DX_DOXYGEN_CONF)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
cpfiles.done: doxygen.done $(DX_DOC_FILES)
|
|
||||||
umask 0022 && cp $(DX_DOC_FILES) $(DX_OUTPUT_DIR)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
doc.done: doxygen.done cpfiles.done
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
upload.done: doxygen.done cpfiles.done
|
|
||||||
upload.sh $(DX_OUTPUT_DIR)/ $(UPLOAD_URL)
|
|
||||||
|
|
||||||
clean.doxygen:
|
|
||||||
$(RM) -rf $(DX_OUTPUT_DIR) *.done $(DX_UNTEMPLATED) $(DX_INCLUDE) *.bak default-* doxygen.conf *.tmp
|
|
||||||
|
|
||||||
inst-dir.done:
|
|
||||||
$(INSTALL) -d -o $(DOCDIROWNER) -g $(DOCDIRGROUP) -m $(DOCDIRMODE) $(DX_INSTALL_DIR)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
install.done: doxygen.done inst-dir.done
|
|
||||||
make install.doxygen
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
install.doxygen:
|
|
||||||
$(INSTALL) -p -o $(DOCOWNER) -g $(DOCGROUP) -m $(DOCMODE) \
|
|
||||||
$(wildcard $(DX_OUTPUT_DIR)/*.html) \
|
|
||||||
$(wildcard $(DX_OUTPUT_DIR)/*.gif) \
|
|
||||||
$(wildcard $(DX_OUTPUT_DIR)/*.png) \
|
|
||||||
$(wildcard $(DX_OUTPUT_DIR)/*.css) \
|
|
||||||
$(DX_INSTALL_DIR)
|
|
||||||
|
|
||||||
$(DX_DOXYGEN_CONF): $(firstword $(wildcard $(DX_DOXYGEN_CONF).tmpl $(DX_FALLBACK_CONF_TMPL)))
|
|
||||||
$(SED) " \
|
|
||||||
s/__VERSION__/$(DIST_VERSION)/g; \
|
|
||||||
s/__PROJECT__/$(PROJECT)/g; \
|
|
||||||
s/__PROJECT_CAPNAME__/$(PROJECT_CAPNAME)/g; \
|
|
||||||
s%__PROJECT_SUMMARY__%$(PROJECT_SUMMARY)%g; \
|
|
||||||
s/__OUTPUT_DIR__/$(DX_OUTPUT_DIR)/g; \
|
|
||||||
s%__PROJECT_TOPDIR__%$(TOPDIR)%g; \
|
|
||||||
s%__JWBDIR__%$(JWBDIR)%g; \
|
|
||||||
s%__FILE_PATTERNS__%$(DX_FILE_PATTERNS)%g; \
|
|
||||||
s%__INPUT_DIRS__%$(DX_INPUT_DIRS)%g; \
|
|
||||||
s%__SRC_IS_JAVA__%$(DX_SRC_IS_JAVA)%g; \
|
|
||||||
s%__EXCLUDE_FILES__%$(DX_EXCLUDE_FILES)%g; \
|
|
||||||
s%__INCLUDE_PATH__%$(DX_INCLUDE_PATH)%g; \
|
|
||||||
s%__RECURSIVE__%$(DX_RECURSIVE)%g; \
|
|
||||||
s%__EXTRACT_STATIC__%$(DX_EXTRACT_STATIC)%g; \
|
|
||||||
s%__INLINE_SOURCES__%$(DX_INLINE_SOURCES)%g; \
|
|
||||||
s%__SOURCE_BROWSER__%$(DX_SOURCE_BROWSER)%g; \
|
|
||||||
" $< > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
doxygen-default-includes.done: $(DX_DOXYGEN_CONF)
|
|
||||||
doxygen -w html $(addprefix default-,$(DX_INCLUDE)) $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
header.html: $(DX_INCLUDE_TMPL_DIR)/header.html doxygen-default-includes.done
|
|
||||||
cat default-$@ | sed -ne "/<\/tr>/r $<" -e 1x -e '2,$${x;p}' -e '$${x;p}' > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
footer.html: $(DX_INCLUDE_TMPL_DIR)/footer.html doxygen-default-includes.done
|
|
||||||
cat $< default-$@ > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
styles.css: $(DX_INCLUDE_TMPL_DIR)/styles.css doxygen-default-includes.done
|
|
||||||
cat default-$@ $< > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
logo.png: $(DX_INCLUDE_TMPL_DIR)/logo.png doxygen-default-includes.done
|
|
||||||
cp $< $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
doxygen.conf.tmpl: | $(DX_FALLBACK_CONF_TMPL)
|
|
||||||
cp $(DX_FALLBACK_CONF_TMPL) $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
clean:
|
|
||||||
$(RM) -rf *~ .*.swp
|
|
||||||
install: # nothing to be done
|
|
||||||
all: # nothing to be done
|
|
||||||
distclean: clean
|
|
||||||
21
make/exe.mk
21
make/exe.mk
|
|
@ -1,21 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/run.mk
|
|
||||||
include $(JWBDIR)/make/depend.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
all: $(EXE) $(BUILD_EXE_BIN) $(STRIP_DONE)
|
|
||||||
install: $(INSTALLED_EXE) $(INSTALLED_EXE_BIN)
|
|
||||||
run test: all.dirs $(EXE) $(EXE_BIN)
|
|
||||||
strace: $(EXE) $(EXE_BIN)
|
|
||||||
|
|
||||||
clean: execlean localclean profclean
|
|
||||||
|
|
||||||
ifeq ($(USE_PROJECT_LIB),true)
|
|
||||||
$(LIB_SO): $(LIB_A)
|
|
||||||
$(EXE): $(LIB_SO)
|
|
||||||
endif
|
|
||||||
all.dirs:
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
distclean: textclean localclean
|
|
||||||
clean: textclean localclean
|
|
||||||
install: # nothing to be done
|
|
||||||
all: # nothing to be done
|
|
||||||
profclean:
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
GETTEXT_LOCALE ?= $(notdir $(shell $(PWD)))
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
GETTEXT_PROJECT_PO ?= $(PROJECT).po
|
|
||||||
GETTEXT_PROJECT_POT ?= $(PROJECT).pot
|
|
||||||
|
|
||||||
GETTEXT_POT ?= $(wildcard *.pot)
|
|
||||||
GETTEXT_PO ?= $(patsubst %.pot,%.po,$(GETTEXT_POT))
|
|
||||||
GETTEXT_MO ?= $(patsubst %.po,%.mo,$(GETTEXT_PO))
|
|
||||||
GETTEXT_INPUT_DIRS ?= $(wildcard $(TOPDIR)/tools $(TOPDIR)/src $(TOPDIR)/conf)
|
|
||||||
GETTEXT_INPUT_EXTS ?= php cpp conf
|
|
||||||
GETTEXT_INPUT_FILES ?= $(foreach d,$(GETTEXT_INPUT_DIRS),\
|
|
||||||
$(shell find $d -name translate-me $(foreach ext,$(GETTEXT_INPUT_EXTS),-o -name '*.$(ext)')))
|
|
||||||
GETTEXT_KEYWORDS ?= htr ehtr $(GETTEXT_EXTRA_KEYWORDS)
|
|
||||||
GETTEXT_LINKS ?= LC_MESSAGES
|
|
||||||
|
|
||||||
all: $(GETTEXT_MO) | $(GETTEXT_LINKS)
|
|
||||||
clean: clean-mo
|
|
||||||
$(RM) -rf *~ .*.swp
|
|
||||||
install: install_MO
|
|
||||||
distclean: clean
|
|
||||||
test:
|
|
||||||
|
|
||||||
extract: $(GETTEXT_POT)
|
|
||||||
clean-mo:
|
|
||||||
$(RM) -f *.mo *.tmp
|
|
||||||
|
|
||||||
$(GETTEXT_PROJECT_POT):
|
|
||||||
xgettext --from-code=utf-8 --package-name $(PROJECT) --package-version $(DIST_VERSION) \
|
|
||||||
--default-domain $(PROJECT) $(addprefix -k,$(GETTEXT_KEYWORDS)) \
|
|
||||||
--output $@.tmp $(XGETTEXT_EXTRA_OPTS) $(GETTEXT_INPUT_FILES)
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
init: $(GETTEXT_PROJECT_POT)
|
|
||||||
msginit --no-translator --locale $(GETTEXT_LOCALE) \
|
|
||||||
--output-file $(GETTEXT_PROJECT_PO).tmp --input $<
|
|
||||||
sed -i 's/charset=ASCII/charset=UTF-8/' $(GETTEXT_PROJECT_PO).tmp
|
|
||||||
mv $(GETTEXT_PROJECT_PO).tmp $(GETTEXT_PROJECT_PO)
|
|
||||||
|
|
||||||
merge: $(GETTEXT_PROJECT_POT)
|
|
||||||
msgmerge -v --lang $(GETTEXT_LOCALE) --output-file $(GETTEXT_PROJECT_PO).tmp \
|
|
||||||
$(wildcard $(GETTEXT_PROJECT_PO)) $<
|
|
||||||
mv $(GETTEXT_PROJECT_PO).tmp $(GETTEXT_PROJECT_PO)
|
|
||||||
|
|
||||||
merge-pot: $(GETTEXT_POT)
|
|
||||||
msgmerge -v --lang $(GETTEXT_LOCALE) --output-file $(GETTEXT_PROJECT_PO).tmp \
|
|
||||||
$(wildcard $(GETTEXT_PROJECT_PO)) $<
|
|
||||||
mv $(GETTEXT_PROJECT_PO).tmp $(GETTEXT_PROJECT_PO)
|
|
||||||
|
|
||||||
%.po: %.pot
|
|
||||||
msgcat --lang $(GETTEXT_LOCALE) --output-file $@.tmp $^
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
edit: merge $(GETTEXT_PROJECT_POT)
|
|
||||||
poedit $(GETTEXT_PROJECT_PO)
|
|
||||||
|
|
||||||
%.mo: %.po
|
|
||||||
msgfmt --check --verbose --output-file $@.tmp $<
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
LC_%:
|
|
||||||
ln -s . $@
|
|
||||||
clean.lc-links:
|
|
||||||
rm -f $(GETTEXT_LINKS)
|
|
||||||
clean: clean.lc-links
|
|
||||||
|
|
||||||
#msginit --no-translator --locale es_MX --output-file $(PROJECT)_spanish.po --input $(PROJECT).pot
|
|
||||||
#sed --in-place $(PROJECT)_spanish.po --expression = '/"hello, world!"/,/#: / s/""/"hola mundo"/'
|
|
||||||
#mkdir --parents ./es_MX.utf8/LC_MESSAGES
|
|
||||||
#msgfmt --check --verbose --output-file ./es_MX.utf8/LC_MESSAGES/$(PROJECT).mo $(PROJECT)_spanish.po
|
|
||||||
|
|
||||||
GETTEXT_TMP = $(patsubst %.php,%.htr,$(GETTEXT_PREPROCESS))
|
|
||||||
GETTEXT_INPUT_FILES += $(GETTEXT_TMP)
|
|
||||||
|
|
||||||
all: htr
|
|
||||||
clean: htr-tmp-clean
|
|
||||||
|
|
||||||
htr: $(GETTEXT_TMP)
|
|
||||||
|
|
||||||
htr-tmp-clean:
|
|
||||||
$(RM) -f *.htr
|
|
||||||
|
|
||||||
define copy_rule
|
|
||||||
./%.htr.tmp: $(1)/%.php
|
|
||||||
cp $$< $$@
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(foreach d, $(HTR_SOURCE_DIRS), $(eval $(call copy_rule,$(d))))
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
# - Clone remote repo into <mydir>/<myrepo>
|
|
||||||
# - Add the following to <mydir>/Makefile:
|
|
||||||
# - SUBMOD_SRC_DIR = ./<myrepo>
|
|
||||||
# - include <path-to-this-makefile>
|
|
||||||
# - run git-init-submod-remote
|
|
||||||
|
|
||||||
ifeq ($(USE_USER_URL),true)
|
|
||||||
JANWARE_USER_PREFIX = $(JANWARE_USER)@
|
|
||||||
endif
|
|
||||||
|
|
||||||
SUBMOD_SRC_DIR ?= .
|
|
||||||
GIT_SRV_ADMIN_SH = ssh $(JANWARE_USER_PREFIX)git.janware.com /opt/jw-build/bin/git-srv-admin.sh
|
|
||||||
GIT_REPO_URL = ssh://$(JANWARE_USER_PREFIX)git.janware.com/srv/git/$(JANWARE_USER)/contrib/$(SUBMOD_PKG_NAME)
|
|
||||||
SUBMOD_PATH = $(patsubst $(abspath $(TOPDIR))/%,%,$(abspath $(CWD)/$(SUBMOD_SRC_DIR)))
|
|
||||||
SUB_GIT = git -C $(SUBMOD_SRC_DIR)
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(SUBMOD_SRC_DIR)/.git),)
|
|
||||||
SUBMOD_PKG_NAME := $(shell $(SUB_GIT) remote -v | sed -n 's/^[a-zA-Z_]\+\s//; s/ *.*//; s%.*/%%; s%\.git%%; 1p')
|
|
||||||
SUBMOD_MAIN_BRANCH := $(firstword $(shell $(SUB_GIT) branch --format '%(refname:lstrip=2)'))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
install:
|
|
||||||
clean:
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
git-init-submod-remote:
|
|
||||||
[ "$(SUBMOD_PKG_NAME)" ] # SUBMOD_PKG_NAME
|
|
||||||
[ "$(SUBMOD_MAIN_BRANCH)" ] # SUBMOD_MAIN_BRANCH
|
|
||||||
[ "$(SUBMOD_SRC_DIR)" ] # SUBMOD_SRC_DIR
|
|
||||||
[ "$(SUBMOD_PATH)" ] # SUBMOD_PATH
|
|
||||||
[ "$(GIT_REPO_URL)" ] # GIT_REPO_URL
|
|
||||||
$(GIT_SRV_ADMIN_SH) -F contrib create-repo $(SUBMOD_PKG_NAME)
|
|
||||||
$(SUB_GIT) remote rename origin upstream
|
|
||||||
$(SUB_GIT) remote set-url --push upstream no-push
|
|
||||||
$(SUB_GIT) remote add origin $(GIT_REPO_URL)
|
|
||||||
$(SUB_GIT) config branch.$(SUBMOD_MAIN_BRANCH).remote origin
|
|
||||||
$(SUB_GIT) config branch.$(SUBMOD_MAIN_BRANCH).merge refs/heads/$(SUBMOD_MAIN_BRANCH)
|
|
||||||
$(SUB_GIT) push origin $(SUBMOD_MAIN_BRANCH)
|
|
||||||
git -C $(TOPDIR) submodule add -f $(GIT_REPO_URL) $(SUBMOD_PATH)
|
|
||||||
git submodule init
|
|
||||||
git commit -m "Add git submodule $(SUBMOD_PATH)" $(SUBMOD_SRC_DIR) $(TOPDIR)/.gitmodules
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
ALL += $(BUILD_LIBDIR) $(PREREQ_DONE) $(BUILD_HDR)
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
all: $(ALL)
|
|
||||||
clean: objclean textclean localclean
|
|
||||||
install: all
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
LESS_SRC ?= $(wildcard *.less)
|
|
||||||
LESS_GENERATED_CSS ?= $(patsubst %.less,%.css,$(LESS_SRC))
|
|
||||||
LESS_CPY ?= lesscpy
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
# -- HTML
|
|
||||||
PRETTIER := $(shell $(WHICH) prettier 2>/dev/null)
|
|
||||||
INSTALLATION_FILE_TYPES += HTML
|
|
||||||
BUILD_HTMLDIR = $(TOPDIR)/htdocs
|
|
||||||
LOCAL_HTML += $(filter-out $(DONT_INSTALL),$(wildcard *.html *.css *.php *.js) $(FONTS) $(IMAGES))
|
|
||||||
DONT_LINT_HTML += $(shell $(ECHO) $(wildcard *.html) | xargs --no-run-if-empty $(GREP) -l '<?php')
|
|
||||||
LOCAL_HTML_LINT ?= $(addprefix .,$(addsuffix .lint,$(filter-out $(DONT_LINT_HTML),$(wildcard *.html *.php *.css *.js))))
|
|
||||||
HTML_STOPDIR_NAME ?= htdocs
|
|
||||||
ifeq ($(HTML_SUBDIR),)
|
|
||||||
HTML_SUBDIR := $(shell $(PWD) | $(SED) '/.*\/$(HTML_STOPDIR_NAME)\(\/\|$$\)/!d; s%.*/$(HTML_STOPDIR_NAME)\(/\|$$\)%%')
|
|
||||||
endif
|
|
||||||
ifeq ($(HTML_SUBDIR),)
|
|
||||||
INSTALL_HTMLDIR ?= $(PROJECT_HTMLDIR)
|
|
||||||
else
|
|
||||||
INSTALL_HTMLDIR ?= $(PROJECT_HTMLDIR)/$(HTML_SUBDIR)
|
|
||||||
endif
|
|
||||||
INSTALLED_HTML += $(addprefix $(INSTALL_HTMLDIR)/,$(LOCAL_HTML))
|
|
||||||
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/js.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
all: $(LESS_GENERATED_CSS) lint
|
|
||||||
install: install_HTML
|
|
||||||
clean: textclean localclean doneclean clean.lesscpy
|
|
||||||
test:
|
|
||||||
|
|
||||||
%.css: %.less
|
|
||||||
$(LESS_CPY) $< > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
clean.lesscpy:
|
|
||||||
$(RM) -f $(LESS_GENERATED_CSS) *.tmp
|
|
||||||
|
|
||||||
lint: $(LOCAL_HTML_LINT)
|
|
||||||
clean: lint.clean
|
|
||||||
lint.clean:
|
|
||||||
rm -f .*.lint
|
|
||||||
|
|
||||||
.%.html.lint: %.html
|
|
||||||
ifneq ($(PRETTIER),)
|
|
||||||
$(PRETTIER) $< >/dev/null
|
|
||||||
endif
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
.%.php.lint: %.php
|
|
||||||
php -l $<
|
|
||||||
ifneq ($(PRETTIER),)
|
|
||||||
#$(PRETTIER) --parser html $< >/dev/null
|
|
||||||
endif
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
.%.css.lint: %.css
|
|
||||||
ifneq ($(PRETTIER),)
|
|
||||||
$(PRETTIER) $< >/dev/null
|
|
||||||
endif
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
.%.js.lint: %.js
|
|
||||||
ifneq ($(PRETTIER),)
|
|
||||||
$(PRETTIER) $< >/dev/null
|
|
||||||
endif
|
|
||||||
touch $@
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
install: install_IMG
|
|
||||||
clean:
|
|
||||||
distclean:
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
# variables
|
|
||||||
SRC_H += $(PROJ_H) $(wildcard $(HDRDIR_SCOPE_SUFFIX)/*.h)
|
|
||||||
|
|
||||||
# mandatory targets
|
|
||||||
all: $(PROJ_H)
|
|
||||||
clean: clean.include
|
|
||||||
install: install_HDR
|
|
||||||
|
|
||||||
# not wäry naaice
|
|
||||||
ifneq ($(HDRDIR_SCOPE_SUFFIX),)
|
|
||||||
install_HDR: dir_install_hdr_suffix.done
|
|
||||||
|
|
||||||
dir_install_hdr_suffix.done:
|
|
||||||
$(INSTALL) -d -o $(HDRDIROWNER) -g $(HDRDIRGROUP) -m $(HDRDIRMODE) $(INSTALL_HDRDIR)/$(HDRDIR_SCOPE_SUFFIX)
|
|
||||||
touch $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
# convenience targets
|
|
||||||
project-header: $(PROJ_H)
|
|
||||||
|
|
||||||
# rules
|
|
||||||
clean.include:
|
|
||||||
$(RM) -rf *.h *~ .*.swp *.done $(PROJ_H) $(HDRDIR_SCOPE_SUFFIX)
|
|
||||||
|
|
||||||
$(PROJ_H): $(filter-out $(PROJ_H) $(PROJECT)/$(PROJ_H),$(wildcard *.h $(PROJECT)/*.h))
|
|
||||||
echo "#ifndef _$(PROJECT_CAPNAME)_H" > $@.tmp
|
|
||||||
echo "#define _$(PROJECT_CAPNAME)_H" >> $@.tmp
|
|
||||||
echo >> $@.tmp
|
|
||||||
for h in $(sort $(patsubst $(PROJECT)/%,%,$^)); do echo "#include <$(PROJECT)/$$h>"; done >> $@.tmp
|
|
||||||
echo >> $@.tmp
|
|
||||||
echo "#endif /* #ifndef _$(PROJECT_CAPNAME)_H */" >> $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
install-links:
|
|
||||||
DEVELOPMENT=false make do-install-links
|
|
||||||
|
|
||||||
do-install-links:
|
|
||||||
@$(call install_links,HDR)
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
SOURCE_FILES ?= $(filter-out CVS .git $(LOCAL_MKFILES) %.done, $(wildcard *))
|
|
||||||
TARGET_DIR ?= $(PREFIX)/share
|
|
||||||
|
|
||||||
SOURCE_BASE ?= .
|
|
||||||
|
|
||||||
RELPATHS = $(foreach f,$(SOURCE_FILES),$(shell realpath -s --relative-to "$(SOURCE_BASE)" "$f"))
|
|
||||||
INSTALLED_FILES = $(addprefix $(TARGET_DIR)/,$(RELPATHS))
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
ifeq ($(DEVELOPMENT),true)
|
|
||||||
TARGET_OWNER ?= $(shell id -un)
|
|
||||||
TARGET_GROUP ?= $(shell id -gn)
|
|
||||||
else
|
|
||||||
TARGET_OWNER ?= root
|
|
||||||
TARGET_GROUP ?= root
|
|
||||||
endif
|
|
||||||
TARGET_DIR_OWNER ?= $(TARGET_OWNER)
|
|
||||||
TARGET_DIR_GROUP ?= $(TARGET_GROUP)
|
|
||||||
TARGET_MODE ?= 440
|
|
||||||
TARGET_DIR_MODE ?= 770
|
|
||||||
|
|
||||||
all:
|
|
||||||
install: install.done
|
|
||||||
clean: done.clean
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
done.clean:
|
|
||||||
$(RM) -f *.done
|
|
||||||
|
|
||||||
$(TARGET_DIR)/%: $(SOURCE_BASE)/%
|
|
||||||
@if [ -L "$<" -o -f "$<" ]; then \
|
|
||||||
echo $(INSTALL) -p -D -m $(TARGET_MODE) -o $(TARGET_OWNER) -g $(TARGET_GROUP) "$<" "$@" ;\
|
|
||||||
$(INSTALL) -p -D -m $(TARGET_MODE) -o $(TARGET_OWNER) -g $(TARGET_GROUP) "$<" "$@" ;\
|
|
||||||
else \
|
|
||||||
echo $(INSTALL) -d -D -m $(TARGET_DIR_MODE) -o $(TARGET_DIR_OWNER) -g $(TARGET_DIR_GROUP) "$@" ;\
|
|
||||||
$(INSTALL) -d -D -m $(TARGET_DIR_MODE) -o $(TARGET_DIR_OWNER) -g $(TARGET_DIR_GROUP) "$@" ;\
|
|
||||||
fi
|
|
||||||
|
|
||||||
install.done: $(INSTALLED_FILES)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
# this used to work fine until an enormous $(SOURCE_FILES) was encountered
|
|
||||||
install-old.done:
|
|
||||||
for f in $(SOURCE_FILES); do \
|
|
||||||
relpath=`realpath -s --relative-to "$(SOURCE_BASE)" "$$f"` ;\
|
|
||||||
if [ -d "$$f" ]; then \
|
|
||||||
$(INSTALL) -d -D -m $(TARGET_DIR_MODE) -o $(TARGET_DIR_OWNER) -g $(TARGET_DIR_GROUP) "$(TARGET_DIR)/$$relpath" ;\
|
|
||||||
else \
|
|
||||||
$(INSTALL) -p -D -m $(TARGET_MODE) -o $(TARGET_OWNER) -g $(TARGET_GROUP) "$$f" "$(TARGET_DIR)/$$relpath" ;\
|
|
||||||
fi ;\
|
|
||||||
done
|
|
||||||
touch $@
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
# == defs
|
|
||||||
|
|
||||||
URL_BASE = http://www.kernel.org/pub/linux/utils/boot/syslinux
|
|
||||||
URL_FILE = SYSLINUX_URL
|
|
||||||
URL = $(shell $(CAT) $(URL_FILE))
|
|
||||||
DLOAD_DIR = /home/samba/dat/share/exe/linux/syslinux
|
|
||||||
BUILD_DIR = cd_root
|
|
||||||
DIRS = $(DLOAD_DIR) $(BUILD_DIR)
|
|
||||||
UNPACK_DIR = isolinux
|
|
||||||
ISO_IMAGE ?= image.iso
|
|
||||||
ISOLINUX_BIN = $(UNPACK_DIR)/isolinux.bin
|
|
||||||
MENU_32 = $(UNPACK_DIR)/com32/menu/menu.c32
|
|
||||||
INITRD = /boot/initrd
|
|
||||||
|
|
||||||
CD_FILES = \
|
|
||||||
$(MENU_32) \
|
|
||||||
$(ISOLINUX_BIN)
|
|
||||||
|
|
||||||
define SYSLINUX_BASE
|
|
||||||
$(notdir $(shell $(SED) 's/.tar.bz2$$//' $(URL_FILE)))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# == targets
|
|
||||||
|
|
||||||
all: $(ISO_IMAGE)
|
|
||||||
install:
|
|
||||||
clean: syslinux.clean
|
|
||||||
distclean: clean
|
|
||||||
|
|
||||||
# == rules
|
|
||||||
|
|
||||||
syslinux.clean:
|
|
||||||
$(RM) -rf *.done
|
|
||||||
$(RM) -rf $(BUILD_DIR) $(UNPACK_DIR)
|
|
||||||
$(RM) -f $(ISO_IMAGE) $(URL_FILE) $(URL_FILE).tmp
|
|
||||||
|
|
||||||
dirs.done:
|
|
||||||
mkdir -p $(DIRS)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(URL_FILE):
|
|
||||||
lynx -dump $(URL_BASE) | \
|
|
||||||
$(SED) '/syslinux-.*\.tar\.bz2$$/ !d; s/ .*http:/http:/' |\
|
|
||||||
tail -1 > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
dload.done: $(URL_FILE)
|
|
||||||
wget -c $(shell $(CAT) $<) -P $(DLOAD_DIR)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(MENU_32): unpack.done
|
|
||||||
|
|
||||||
unpack.done: $(URL_FILE) dload.done
|
|
||||||
tar -xjf $(shell echo $(DLOAD_DIR)/$(SYSLINUX_BASE).tar.bz2 | $(SED) 's/ //g')
|
|
||||||
mv $(SYSLINUX_BASE) $(UNPACK_DIR)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
GENERATE = /bin/bash $(JWB_SCRIPT_DIR)/generate-boot-medium.sh
|
|
||||||
BOOT_CONF = boot.conf
|
|
||||||
|
|
||||||
$(ISO_IMAGE): $(BOOT_CONF) dirs.done $(CD_FILES)
|
|
||||||
$(GENERATE) -o $@ -d $(BUILD_DIR) -f $< $(CD_FILES)
|
|
||||||
17
make/java.mk
17
make/java.mk
|
|
@ -1,17 +0,0 @@
|
||||||
JAVA_SRC_DIR ?= .
|
|
||||||
JAVA_SRC ?= $(wildcard $(JAVA_SRC_DIR)/*.java)
|
|
||||||
JAVA_CLASSFILES += $(patsubst %.java,%.class,$(JAVA_SRC))
|
|
||||||
JAVA_CLASSPATH = $(shell echo $(CLASSPATH) | sed 's/ */:/g')
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
all: $(JAVA_CLASSFILES)
|
|
||||||
install:
|
|
||||||
clean: clean.java
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
clean.java:
|
|
||||||
$(RM) -f *.class
|
|
||||||
|
|
||||||
$(JAVA_CLASSFILES): $(JAVA_SRC)
|
|
||||||
CLASSPATH=$(JAVA_CLASSPATH) javac $^
|
|
||||||
31
make/js.mk
31
make/js.mk
|
|
@ -1,31 +0,0 @@
|
||||||
JAVA ?= /usr/bin/java
|
|
||||||
JS_MINIFY_FILTER_IN ?= sed 's/console\.[a-z]\+([^)]\+) *;//g'
|
|
||||||
JS_SRC ?= $(filter-out %.min.js,$(wildcard *.js))
|
|
||||||
JS_GENERATED ?= $(patsubst %.js,%.min.js,$(JS_SRC))
|
|
||||||
JS_EXTRA_EXTERNS ?=
|
|
||||||
JS_CC_BUILD_ROOT ?= $(PROJECTS_DIR)/closure-compiler/contrib/closure-compiler/install-root
|
|
||||||
JS_EXTERNS_DIRS ?= $(firstword $(wildcard $(JS_CC_BUILD_ROOT)/$(realpath $(PROJECTS_DIR))/closure-compiler/share/externs /opt/closure-compiler/share/externs))
|
|
||||||
JS_EXTERNS ?= $(sort $(JS_EXTRA_EXTERNS) jquery-3.3.js)
|
|
||||||
JS_EXTERN_PATHS ?= $(wildcard $(foreach d,$(JS_EXTERNS_DIRS),$(addprefix $d/,$(JS_EXTERNS))))
|
|
||||||
JS_MINIFY_OPTS ?= $(addprefix --externs ,$(JS_EXTERN_PATHS)) --compilation_level ADVANCED --strict_mode_input
|
|
||||||
JS_MINIFY_EXE ?= $(JAVA) -jar $(firstword $(wildcard \
|
|
||||||
$(JS_CC_BUILD_ROOT)/usr/share/java/closure-compiler.jar \
|
|
||||||
/usr/share/java/closure-compiler.jar \
|
|
||||||
) closure-compiler.jar-not-found)
|
|
||||||
JS_MINIFY ?= $(JS_MINIFY_EXE) $(JS_MINIFY_OPTS)
|
|
||||||
|
|
||||||
# This is not nice. It requires install-files to be included from elsewhere,
|
|
||||||
# which is not obvious. OTOH, if it isn't, SOURCE_FILES doesn't do any harm,
|
|
||||||
# either.
|
|
||||||
SOURCE_FILES += $(JS_GENERATED)
|
|
||||||
|
|
||||||
all: $(JS_GENERATED)
|
|
||||||
clean: minify.clean
|
|
||||||
|
|
||||||
%.min.js: %.js
|
|
||||||
cat $< | $(JS_MINIFY_FILTER_IN) > $@.filtered
|
|
||||||
$(JS_MINIFY) $@.filtered > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
minify.clean:
|
|
||||||
rm -f $(JS_GENERATED) *.tmp *.filtered
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
# jan's utility modules
|
|
||||||
# (c) 2001-2005 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
LD_LIB_PATH_ENV := $(LD_LIBRARY_PATH)
|
|
||||||
EXE_SEARCH_PATH_ENV := $(PATH)
|
|
||||||
LD_LIB_PATH_LDFLAGS = $(shell echo $(FINAL_LDFLAGS) | $(SED) 's/^-[^L] *[^ ]*/ /g; s/[ ]-[^L] *[^ ]*/ /g; s/-L[ ]*\([^ ]*\)[ ]*/\1:/g')
|
|
||||||
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
DLL_PATH = $(shell echo $(LD_LIBRARY_PATH) | $(SED) 's/:/;/g');$(CROSS_TOOL_DIR)/bin
|
|
||||||
endif
|
|
||||||
|
|
||||||
#export LD_LIBRARY_PATH = $(shell echo $(strip $(LD_LIB_PATH_LDFLAGS):$(LD_LIB_PATH):$(LD_LIB_PATH_ENV)) | $(SED) 's/ /:/g; s/::/:/g')
|
|
||||||
LD_LIBRARY_PATH := $(call proj_query, ldlibpath $(PROJECT) $(PREREQ_BUILD))
|
|
||||||
export LD_LIBRARY_PATH
|
|
||||||
export PATH := $(call proj_query, exepath $(PROJECT) $(PREREQ_BUILD)):$(EXE_SEARCH_PATH_ENV)
|
|
||||||
96
make/lib.mk
96
make/lib.mk
|
|
@ -1,96 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
|
|
||||||
ifeq ($(wildcard $(LIB_A)),)
|
|
||||||
USE_PROJECT_LIB = false
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_PROJECT_LIB),false)
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
SHOBJS += $(wildcard *.dll)
|
|
||||||
else
|
|
||||||
SHOBJS += $(wildcard *.so)
|
|
||||||
endif
|
|
||||||
all: $(LD_CONF)
|
|
||||||
install:
|
|
||||||
else
|
|
||||||
all: $(LD_CONF) $(LIB_SO) $(LINKS_SO) $(MSVCPP_IMPLIB) $(STRIP_DONE)
|
|
||||||
install: install_LIB
|
|
||||||
endif
|
|
||||||
clean: libclean local_libclean clean.ld-conf
|
|
||||||
distclean: clean
|
|
||||||
|
|
||||||
local_libclean: clean.mingw clean.unix clean.all
|
|
||||||
|
|
||||||
ifneq ($(wildcard *.so *.so.*),)
|
|
||||||
install: install_files_LD_CONF
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean.unix:
|
|
||||||
ifneq ($(TARGET),mingw)
|
|
||||||
$(RM) -rf *.so.* *.so st*
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean.mingw:
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
$(RM) -rf *.dll *.def *.exp *.lib
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean.all:
|
|
||||||
$(RM) -rf *.a *.o *~ st* .*.swp *.done ld-*.conf version.ldscript
|
|
||||||
|
|
||||||
ld-%.conf:
|
|
||||||
echo $(INSTALL_LIBDIR) > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
clean.ld-conf:
|
|
||||||
$(RM) -f $(LD_CONF)
|
|
||||||
|
|
||||||
echo.libs:
|
|
||||||
@echo INSTALLED_LIB_SO = $(INSTALLED_LIB_SO)
|
|
||||||
@echo INSTALLED_LIB = $(INSTALLED_LIB)
|
|
||||||
|
|
||||||
install-links:
|
|
||||||
l=$(shell $(PWD))/$(notdir $(INSTALLED_LIB_SO)) ;\
|
|
||||||
cd $(dir $(INSTALLED_LIB_SO)) &&\
|
|
||||||
sudo ln -sf $$l
|
|
||||||
# ------------------------------------------ contrib libraries
|
|
||||||
# deps on mandatory targets
|
|
||||||
all: $(CONTRIB_LIBS)
|
|
||||||
clean: clean.contrib-libs
|
|
||||||
|
|
||||||
# deps on optional targets
|
|
||||||
echo-contrib: echo.contrib-libs echo.libs
|
|
||||||
|
|
||||||
# rules
|
|
||||||
clean.contrib-libs:
|
|
||||||
$(RM) -f $(CONTRIB_LIBS)
|
|
||||||
|
|
||||||
define contrib_lib_search_rules
|
|
||||||
%.dll: $(1)/%.dll
|
|
||||||
cp -p $$< $$@
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(foreach p,$(CONTRIB_LIBS_PATH),$(eval $(call contrib_lib_search_rules,$(p))))
|
|
||||||
|
|
||||||
echo.contrib-libs:
|
|
||||||
@echo CONTRIB_LIBS_PATH = $(CONTRIB_LIBS_PATH)
|
|
||||||
@echo CONTRIB_LIBS = $(CONTRIB_LIBS)
|
|
||||||
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
clean.winres:
|
|
||||||
$(RM) -f $(WINRES_RC) $(WINRES_O) *.tmp
|
|
||||||
|
|
||||||
clean: clean.winres
|
|
||||||
#%.o : %.rc
|
|
||||||
# $(WINDRES) $^ -o $@
|
|
||||||
endif
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/tools.mk
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
LY_PDF = $(patsubst %.ly,%.pdf,$(wildcard *.ly))
|
|
||||||
LY_MIDI = $(patsubst %.ly,%.midi,$(wildcard *.ly))
|
|
||||||
|
|
||||||
all: $(LY_PDF)
|
|
||||||
clean: clean.lilypond
|
|
||||||
|
|
||||||
view: $(LY_PDF)
|
|
||||||
kpdf $<
|
|
||||||
|
|
||||||
convert: convert.done
|
|
||||||
|
|
||||||
play: all
|
|
||||||
timidity *.midi
|
|
||||||
|
|
||||||
jack: all
|
|
||||||
timidity -Oj *.midi
|
|
||||||
|
|
||||||
jackview: all
|
|
||||||
make view & make jack
|
|
||||||
|
|
||||||
%.play: %.midi
|
|
||||||
|
|
||||||
%.pdf: %.ly
|
|
||||||
lilypond $<
|
|
||||||
|
|
||||||
clean.lilypond:
|
|
||||||
$(RM) -f *.pdf *.ps *.done *.tmp *.midi
|
|
||||||
|
|
||||||
convert.done:
|
|
||||||
set -e; for o in $(wildcard *.ly); do \
|
|
||||||
echo converting $$o ;\
|
|
||||||
cp $$o $$o.tmp ;\
|
|
||||||
convert-ly $$o.tmp ;\
|
|
||||||
mv $$o.tmp $$o ;\
|
|
||||||
done
|
|
||||||
touch $@
|
|
||||||
|
|
@ -1,215 +0,0 @@
|
||||||
# abbreviations
|
|
||||||
define EXTRAVERSION
|
|
||||||
$(shell $(CAT) EXTRAVERSION)
|
|
||||||
endef
|
|
||||||
define COMPLETE_VERSION
|
|
||||||
$(shell $(CAT) COMPLETE_VERSION)
|
|
||||||
endef
|
|
||||||
|
|
||||||
HOST ?= $(HOSTNAME)
|
|
||||||
KERNEL_BASE ?= lx-$(HOST)
|
|
||||||
BOOT_LABEL ?= lx-$(KERNEL_VERSION)-$(RPM_RELEASE)
|
|
||||||
KERNEL_PKG_SUFFIX ?= .tar.gz
|
|
||||||
CUSTOMER ?= jannet
|
|
||||||
KERNEL_DLOAD_DIR ?= /home/samba/dat/exe/linux/os
|
|
||||||
KERNEL_PKG ?= $(KERNEL_DLOAD_DIR)/$(shell echo $(KERNEL_VERSION) | $(SED) 's/\([0-9]\.[0-9]*\)\..*/\1/')/linux-$(shell echo $(KERNEL_VERSION) | $(SED) 's/\(2\.6\.[0-9]+\)-..*/\1/')$(KERNEL_PKG_SUFFIX)
|
|
||||||
UPLOAD_HOST ?= pkg.janware.com
|
|
||||||
UPLOAD_PATH ?= /srv/dav/pub/packages/$(CUSTOMER)/$(KERNEL_BASE)
|
|
||||||
UPLOAD_OWNER ?= $(shell whoami)
|
|
||||||
|
|
||||||
KERNEL_MAJOR = $(shell echo $(KERNEL_VERSION) | cut -d\. -f1)
|
|
||||||
KERNEL_MINOR = $(shell echo $(KERNEL_VERSION) | cut -d\. -f2)
|
|
||||||
KERNEL_RELEASE = $(shell echo $(KERNEL_VERSION) | cut -d\. -f3)
|
|
||||||
KERNEL_PKG_BASE = $(KERNEL_DLOAD_DIR)/$(KERNEL_MAJOR).$(KERNEL_MINOR)/linux-$(KERNEL_VERSION).tar
|
|
||||||
ifneq ($(wildcard $(KERNEL_PKG_BASE).*),)
|
|
||||||
ifneq ($(wildcard $(KERNEL_PKG_BASE).gz),)
|
|
||||||
KERNEL_PKG = $(KERNEL_PKG_BASE).gz
|
|
||||||
KERNEL_SRC_DIR = $(shell tar -tzf $(KERNEL_DIR)/$(KERNEL_PKG) | grep -v pax_global_header | head -1)
|
|
||||||
endif
|
|
||||||
ifneq ($(wildcard $(KERNEL_PKG_BASE).bz2),)
|
|
||||||
KERNEL_PKG = $(KERNEL_PKG_BASE).bz2
|
|
||||||
KERNEL_SRC_DIR = $(shell tar -tjf $(KERNEL_DIR)/$(KERNEL_PKG) | grep -v pax_global_header | head -1)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
KERNEL_PKG = $(KERNEL_PKG_BASE).bz2
|
|
||||||
KERNEL_SRC_DIR = linux-$(KERNEL_VERSION)
|
|
||||||
endif
|
|
||||||
#HOST = $(shell cd ../..; $(PWD) | xargs basename)
|
|
||||||
WD := $(shell $(PWD))
|
|
||||||
TAG = $(shell echo V_$(KERNEL_VERSION)_$(RPM_RELEASE) | $(SED) 's/\./_/g')
|
|
||||||
ARCH = $(shell $(RPMBUILD) --showrc | $(SED) '/build arch / !d; s/.*build arch *://; s/ //g')
|
|
||||||
|
|
||||||
RPMBUILD = $(shell which rpmbuild 2>/dev/null)
|
|
||||||
ifeq ($(RPMBUILD),)
|
|
||||||
RPMBUILD = $(shell which rpm 2>/dev/null)
|
|
||||||
endif
|
|
||||||
|
|
||||||
#ifeq ($(wildcard RELEASE-$(KERNEL_VERSION)),)
|
|
||||||
#RPM_RELEASE := $(shell make newrelease; exit 1)
|
|
||||||
#else
|
|
||||||
#RPM_RELEASE_NUM := $(strip $(shell grep Id: RELEASE-$(KERNEL_VERSION) | $(SED) "s/.*RELEASE-$(KERNEL_VERSION),v[ ]*[0-9]*\.\([0-9]*\)[^0-9]*.*/\1/"))
|
|
||||||
#ifeq ($(UNAME_SUFFIX),)
|
|
||||||
#RPM_RELEASE = $(RPM_RELEASE_NUM)
|
|
||||||
#else
|
|
||||||
#RPM_RELEASE = $(UNAME_SUFFIX)$(RPM_RELEASE_NUM)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
BASE = $(KERNEL_BASE)-$(COMPLETE_VERSION)
|
|
||||||
TMP_INSTALL = $(KERNEL_BASE)-$(COMPLETE_VERSION)
|
|
||||||
BASE_RUN = $(KERNEL_BASE)-run-$(COMPLETE_VERSION)
|
|
||||||
BASE_DEVEL = $(KERNEL_BASE)-devel-$(COMPLETE_VERSION)
|
|
||||||
|
|
||||||
ifeq ($(BOOT_LABEL),)
|
|
||||||
BOOT_LABEL = lx-$(COMPLETE_VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
KERNEL_TGZ = $(notdir $(KERNEL_PKG))
|
|
||||||
F_SPEC = $(BASE).spec
|
|
||||||
F_TGZ = $(BASE).tar.gz
|
|
||||||
F_SPM = $(BASE).src.rpm
|
|
||||||
F_RPM_RUN = $(BASE_RUN).$(ARCH).rpm
|
|
||||||
F_RPM_DEVEL = $(BASE_DEVEL).$(ARCH).rpm
|
|
||||||
F_RPMS = $(F_RPM_RUN) $(F_RPM_DEVEL)
|
|
||||||
F_BOOTFILES = $(addsuffix -$(COMPLETE_VERSION),$(addprefix $(TMP_INSTALL)/boot/,vmlinuz config System.map))
|
|
||||||
F_CURRENT = $(addprefix CURRENT_, SRC RPM_SRC RPM_RUN_I386 RPM_DEVEL_I386)
|
|
||||||
F_ULDONE = $(addsuffix .uldone,$(F_RPMS) $(F_TGZ) $(F_SPM) current)
|
|
||||||
# note that order matters for F_ULDONE and F_RPMS (remote directory attributes)
|
|
||||||
KERNEL_INSTALL_PREFIX = $(shell pwd)/$(TMP_INSTALL)
|
|
||||||
|
|
||||||
BUILD = sh $(JWBDIR)/devutil/jcs/build_linux.sh \
|
|
||||||
-c config-$(KERNEL_VERSION) \
|
|
||||||
-t $(HOST) \
|
|
||||||
-b $(WD) \
|
|
||||||
-a i386 \
|
|
||||||
-s $(KERNEL_SRC_DIR) \
|
|
||||||
-i $(TMP_INSTALL)
|
|
||||||
MKSPEC := $(JWBDIR)/devutil/jcs/mkspec-linux.sh
|
|
||||||
|
|
||||||
# exports
|
|
||||||
export KERNEL_VERSION
|
|
||||||
export KERNEL_INSTALL_PREFIX
|
|
||||||
|
|
||||||
# first target
|
|
||||||
all: rpm
|
|
||||||
|
|
||||||
# file rules
|
|
||||||
%.lxdone: config-$(KERNEL_VERSION) $(LOCAL_PRE_BUILD) linux-$(KERNEL_VERSION)/Makefile
|
|
||||||
$(BUILD) $(basename $@)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(TMP_INSTALL)/$(F_SPEC): linux-$(KERNEL_VERSION)/Makefile $(MKSPEC) Makefile
|
|
||||||
sh $(MKSPEC) -d $(TMP_INSTALL) -b $(KERNEL_BASE) -v $(shell echo $(COMPLETE_VERSION) | $(SED) 's/-[0-9][0-9]*.*//') -r $(RPM_RELEASE) -a $(ARCH) -l $(BOOT_LABEL) > $@
|
|
||||||
|
|
||||||
$(TMP_INSTALL)/boot/%-$(KERNEL_VERSION)-$(RPM_RELEASE): build.lxdone $(LOCAL_AFTER_KERNEL_BUILD)
|
|
||||||
@echo -n
|
|
||||||
|
|
||||||
.PRECIOUS: $(TMP_INSTALL)/boot/%-$(KERNEL_VERSION)
|
|
||||||
|
|
||||||
$(TMP_INSTALL)/boot/%-$(KERNEL_VERSION)-$(RPM_RELEASE): $(TMP_INSTALL)/boot/%-$(KERNEL_VERSION)
|
|
||||||
cp $< $@
|
|
||||||
|
|
||||||
$(F_TGZ): Makefile build.lxdone $(F_BOOTFILES) $(TMP_INSTALL)/$(F_SPEC)
|
|
||||||
tar -czf $@ \
|
|
||||||
$(F_BOOTFILES) \
|
|
||||||
$(addprefix $(TMP_INSTALL)/, \
|
|
||||||
lib \
|
|
||||||
$(F_SPEC) \
|
|
||||||
)
|
|
||||||
|
|
||||||
%.src.rpm: %.tar.gz
|
|
||||||
$(RPMBUILD) -ts $<
|
|
||||||
cp /usr/src/packages/SRPMS/$@ .
|
|
||||||
|
|
||||||
rpm.done: $(F_SPM)
|
|
||||||
$(RPMBUILD) --rebuild $(F_SPM)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%.$(ARCH).rpm: rpm.done
|
|
||||||
cp /usr/src/packages/RPMS/$(ARCH)/$@ .
|
|
||||||
|
|
||||||
CURRENT_RPM_RUN_I386: $(F_RPM_RUN)
|
|
||||||
echo $(UPLOAD_PATH)/rpm/run/$(F_RPM_RUN) > $@
|
|
||||||
|
|
||||||
CURRENT_RPM_DEVEL_I386: $(F_RPM_RUN)
|
|
||||||
echo $(UPLOAD_PATH)/rpm/devel/$(F_RPM_DEVEL) > $@
|
|
||||||
|
|
||||||
CURRENT_RPM_SRC: $(F_RPM_RUN)
|
|
||||||
echo $(UPLOAD_PATH)/rpm/src/$(F_RPM_SRC) > $@
|
|
||||||
|
|
||||||
CURRENT_SRC: $(F_RPM_RUN)
|
|
||||||
echo $(UPLOAD_PATH)/src/$(F_TGZ) > $@
|
|
||||||
|
|
||||||
update.done:
|
|
||||||
cvs update -dP
|
|
||||||
make rpm
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
upload.done: $(F_RPMS)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%.tar.gz.uldone: %.tar.gz
|
|
||||||
upload.sh $< rsync_ssh://$(UPLOAD_HOST):$(UPLOAD_PATH)/src/$<:640:750:$(UPLOAD_OWNER).$(CUSTOMER)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%.src.rpm.uldone: %.src.rpm
|
|
||||||
upload.sh $< rsync_ssh://$(UPLOAD_HOST):$(UPLOAD_PATH)/rpm/src/$<:640:750:$(UPLOAD_OWNER).$(CUSTOMER)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%.rpm.uldone: %.rpm
|
|
||||||
upload.sh $< rsync_ssh://$(UPLOAD_HOST):$(UPLOAD_PATH)/rpm/$(shell echo $@ | $(SED) 's/.*\(run\|devel\).*/\1/')/$<:640:750:$(UPLOAD_OWNER).$(CUSTOMER)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
current.uldone: $(F_CURRENT)
|
|
||||||
upload.sh $^ rsync_ssh://$(UPLOAD_HOST):$(UPLOAD_PATH)/:640:750:$(UPLOAD_OWNER).$(CUSTOMER)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
tag.done:
|
|
||||||
cvs tag $(TAG)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
copy-run.done: $(F_RPM_RUN)
|
|
||||||
scp $< root@$(HOST):/root/rpm/
|
|
||||||
touch $@
|
|
||||||
copy-devel.done: $(F_RPM_DEVEL)
|
|
||||||
scp $< root@$(HOST):/root/rpm/
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
ping:
|
|
||||||
ping $(HOST)
|
|
||||||
ssh:
|
|
||||||
$(CVS_RSH) -l root $(HOST)
|
|
||||||
|
|
||||||
# user targets
|
|
||||||
unpack: unpack.done
|
|
||||||
build: build.lxdone
|
|
||||||
driver: driver.done
|
|
||||||
tgz: $(F_TGZ)
|
|
||||||
spm: $(F_SPM)
|
|
||||||
rpm: $(F_RPMS)
|
|
||||||
upload: update.done rpm $(F_ULDONE)
|
|
||||||
tag: tag.done
|
|
||||||
install: build.lxdone install.lxdone
|
|
||||||
copy-run: copy-run.done
|
|
||||||
copy-devel: copy-devel.done
|
|
||||||
copy: copy-run copy-devel
|
|
||||||
patch: patches.done
|
|
||||||
shutdown:
|
|
||||||
$(CVS_RSH) -l root $(HOST) "shutdown -h now"
|
|
||||||
reboot:
|
|
||||||
-l root $(HOST) "reboot"
|
|
||||||
update-rpm: copy
|
|
||||||
$(CVS_RSH) -l root $(HOST) rpm -U $(addprefix rpm/,$(F_RPMS))
|
|
||||||
erase-rpm:
|
|
||||||
$(CVS_RSH) -l root $(HOST) rpm -e $(KERNEL_BASE)-run $(KERNEL_BASE)-devel
|
|
||||||
dist: clean
|
|
||||||
cd ..;\
|
|
||||||
tar -czf kernel.tar.gz `find kernel -maxdepth 1 -type f | grep -ve "setup\|trash\|CVS"`
|
|
||||||
mv ../kernel.tar.gz .
|
|
||||||
clean:
|
|
||||||
$(RM) -rf $(KERNEL_BASE)-*
|
|
||||||
$(RM) -rf install/* reiser.patch *~ *.done *.lxdone *.uldone *.patch *.diff *.rpm *.tar.gz *.tar \
|
|
||||||
$(SCOPE_DRIVER_BASE)
|
|
||||||
$(RM) -rf linux linux-$(KERNEL_VERSION) CURRENT_* pax_global_header
|
|
||||||
$(RM) -f toplevel-makefile EXTRAVERSION COMPLETE_VERSION
|
|
||||||
|
|
||||||
distclean: clean
|
|
||||||
|
|
@ -1,176 +0,0 @@
|
||||||
define EXTRAVERSION
|
|
||||||
$(shell $(CAT) EXTRAVERSION)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define COMPLETE_VERSION
|
|
||||||
$(shell $(CAT) COMPLETE_VERSION)
|
|
||||||
endef
|
|
||||||
|
|
||||||
KERNEL_MAJOR = $(shell echo $(KERNEL_VERSION) | cut -d\. -f1)
|
|
||||||
KERNEL_MINOR = $(shell echo $(KERNEL_VERSION) | cut -d\. -f2)
|
|
||||||
KERNEL_RELEASE = $(shell echo $(KERNEL_VERSION) | cut -d\. -f3)
|
|
||||||
KERNEL_DLOAD_DIR ?= /home/samba/dat/share/exe/linux/os
|
|
||||||
KERNEL_PKG_BASE = $(KERNEL_DLOAD_DIR)/$(KERNEL_MAJOR).$(KERNEL_MINOR)/linux-$(KERNEL_VERSION).tar
|
|
||||||
LINUX_KERNEL_PATCH_DIR ?= $(CVS_ROOT_DIR)/conf/jannet.de/all/lx-patches
|
|
||||||
HOST ?= $(HOSTNAME)
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(KERNEL_PKG_BASE).*),)
|
|
||||||
ifneq ($(wildcard $(KERNEL_PKG_BASE).gz),)
|
|
||||||
KERNEL_PKG = $(KERNEL_PKG_BASE).gz
|
|
||||||
KERNEL_SRC_DIR = $(shell tar -tzf $(KERNEL_DIR)/$(KERNEL_PKG) | grep -v pax_global_header | head -1)
|
|
||||||
endif
|
|
||||||
ifneq ($(wildcard $(KERNEL_PKG_BASE).bz2),)
|
|
||||||
KERNEL_PKG = $(KERNEL_PKG_BASE).bz2
|
|
||||||
KERNEL_SRC_DIR = $(shell tar -tjf $(KERNEL_DIR)/$(KERNEL_PKG) | grep -v pax_global_header | head -1)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
KERNEL_PKG = $(KERNEL_PKG_BASE).bz2
|
|
||||||
KERNEL_SRC_DIR = linux-$(KERNEL_VERSION)
|
|
||||||
endif
|
|
||||||
WD := $(shell $(PWD))
|
|
||||||
TAG = $(shell echo V_$(KERNEL_VERSION)_$(RPM_RELEASE) | $(SED) 's/\./_/g')
|
|
||||||
ARCH = $(shell $(RPMBUILD) --showrc | $(SED) '/build arch / !d; s/.*build arch *://; s/ //g')
|
|
||||||
|
|
||||||
PATCHES += $(wildcard $(LINUX_KERNEL_PATCH_DIR)/*-$(KERNEL_VERSION).patch) \
|
|
||||||
$(wildcard $(LINUX_KERNEL_PATCH_DIR)/*-$(KERNEL_VERSION).diff)
|
|
||||||
LOCAL_PATCHES = $(notdir $(PATCHES))
|
|
||||||
SUBMAKEFILE = $(JWBDIR)/make/linux-rpm-build.mk
|
|
||||||
|
|
||||||
KERNEL_URL = ftp.kernel.org:/pub/linux/kernel/v$(KERNEL_MAJOR).$(KERNEL_MINOR)/linux-$(KERNEL_VERSION).tar.bz2
|
|
||||||
KERNEL_TGZ = $(notdir $(KERNEL_URL))
|
|
||||||
|
|
||||||
# exports
|
|
||||||
export KERNEL_VERSION
|
|
||||||
export KERNEL_INSTALL_PREFIX
|
|
||||||
|
|
||||||
# first target
|
|
||||||
all: rpm
|
|
||||||
install: install.this
|
|
||||||
clean: thisclean
|
|
||||||
distclean: clean
|
|
||||||
|
|
||||||
# file rules
|
|
||||||
$(KERNEL_PKG):
|
|
||||||
mkdir -p $(dir $(KERNEL_PKG))
|
|
||||||
ftp -a $(KERNEL_URL)
|
|
||||||
install -m 664 $(notdir $(KERNEL_PKG)) $@
|
|
||||||
|
|
||||||
EXTRAVERSION: linux-$(KERNEL_VERSION)/Makefile
|
|
||||||
$(SED) '/^ *EXTRAVERSION *=/ !d; s/^ *EXTRAVERSION *= *-*//; s/ *$$//' $< >$@
|
|
||||||
|
|
||||||
COMPLETE_VERSION: EXTRAVERSION
|
|
||||||
#ifeq ($(shell echo $(KERNEL_VERSION) | $(SED) '/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/ !d'),)
|
|
||||||
# echo -n $(KERNEL_VERSION)-$(EXTRAVERSION) | $(SED) 's/- *$$//' > $@
|
|
||||||
#else
|
|
||||||
echo -n $(KERNEL_MAJOR).$(KERNEL_MINOR).$(KERNEL_RELEASE)$(EXTRAVERSION) > $@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
config-$(KERNEL_VERSION):
|
|
||||||
cp $(shell ls config-$(KERNEL_MAJOR).$(KERNEL_MINOR).* | $(SED) 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]\)[.$$]./\1.\2.0\3/; s/\.\([0-9]\)$$/.0\1/' | sort -g | $(SED) 's/\.0/./g; $$ !d') $@
|
|
||||||
cvs add $@
|
|
||||||
cvs commit $@
|
|
||||||
|
|
||||||
toplevel-makefile: unpack.done patches.done
|
|
||||||
awk -v release=$(RPM_RELEASE) '{ \
|
|
||||||
if ($$0 ~ /EXTRAVERSION *= *-/) { \
|
|
||||||
oldextra=$$3; \
|
|
||||||
gsub(/-/,_,oldextra); \
|
|
||||||
printf "EXTRAVERSION = _%s-%s\n", oldextra, release \
|
|
||||||
} else if ($$0 ~ /EXTRAVERSION *= *\./) { \
|
|
||||||
oldextra=$$3; \
|
|
||||||
gsub(/-/,_,oldextra); \
|
|
||||||
printf "EXTRAVERSION = %s-%s\n",oldextra, release \
|
|
||||||
} else if ($$0 ~ /EXTRAVERSION *= *$$/) { \
|
|
||||||
if (release ~ "^ *$$") { \
|
|
||||||
printf "EXTRAVERSION =\n" \
|
|
||||||
} else { \
|
|
||||||
printf "EXTRAVERSION = -%s\n",release \
|
|
||||||
} \
|
|
||||||
} else { \
|
|
||||||
print $$0 \
|
|
||||||
} \
|
|
||||||
}' linux-$(KERNEL_VERSION)/Makefile >$@
|
|
||||||
|
|
||||||
linux-$(KERNEL_VERSION)/Makefile: toplevel-makefile
|
|
||||||
cp $< $@
|
|
||||||
|
|
||||||
unpack.done: $(KERNEL_PKG)
|
|
||||||
$(RM) -rf linux-$(KERNEL_VERSION)
|
|
||||||
ifeq ($(suffix $(KERNEL_PKG)),.gz)
|
|
||||||
tar -xzf $(KERNEL_PKG)
|
|
||||||
endif
|
|
||||||
ifeq ($(suffix $(KERNEL_PKG)),.bz2)
|
|
||||||
tar -xjf $(KERNEL_PKG)
|
|
||||||
endif
|
|
||||||
ln -s linux-$(KERNEL_VERSION) linux
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
update.done:
|
|
||||||
cvs update -dP
|
|
||||||
make rpm
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
version:
|
|
||||||
date >> RELEASE-$(KERNEL_VERSION)
|
|
||||||
cvs commit -m "$(KERNEL_VERSION)" RELEASE-$(KERNEL_VERSION)
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
patch-%:
|
|
||||||
mkdir -p patches
|
|
||||||
make patches/$*-$(KERNEL_VERSION).patch
|
|
||||||
|
|
||||||
clean-patch-%:
|
|
||||||
$(RM) -f patches/$*-$(KERNEL_VERSION).patch
|
|
||||||
make patches/$*-$(KERNEL_VERSION).patch
|
|
||||||
|
|
||||||
patches/%-$(KERNEL_VERSION).patch:
|
|
||||||
make unpack.done
|
|
||||||
export LANG=en_US ;\
|
|
||||||
diff --exclude=CVS --unidirectional-new-file -aur \
|
|
||||||
linux-$(KERNEL_VERSION) linux-$(KERNEL_VERSION)-$* | \
|
|
||||||
grep -vie "^Nur in \|Only in " > $@.part; exit 0
|
|
||||||
mv $@.part $@
|
|
||||||
|
|
||||||
patches.done: unpack.done $(addsuffix .done,$(notdir $(PATCHES)))
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%.patch.done: %.patch
|
|
||||||
patch -d linux-$(KERNEL_VERSION) -p1 < $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%.diff.done: %.diff
|
|
||||||
patch -d linux-$(KERNEL_VERSION) -p1 < $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%.patch:
|
|
||||||
make $(filter %/$@,$(PATCHES))
|
|
||||||
cp $(filter %/$@,$(PATCHES)) $@
|
|
||||||
|
|
||||||
%.diff:
|
|
||||||
make $(filter %/$@,$(PATCHES))
|
|
||||||
cp $(filter %/$@,$(PATCHES)) $@
|
|
||||||
|
|
||||||
unpack: unpack.done
|
|
||||||
patch: patches.done
|
|
||||||
prepare: unpack patch EXTRAVERSION COMPLETE_VERSION
|
|
||||||
install: all
|
|
||||||
|
|
||||||
DEFERRED_TARGETS = \
|
|
||||||
current.uldone ping ssh build \
|
|
||||||
tgz spm rpm upload tag copy-run copy-devel copy \
|
|
||||||
shutdown reboot update-rpm erase-rpm
|
|
||||||
|
|
||||||
$(DEFERRED_TARGETS): prepare
|
|
||||||
make -f $(JWBDIR)/make/linux-rpm-build.mk $@
|
|
||||||
thisclean:
|
|
||||||
touch EXTRAVERSION COMPLETE_VERSION
|
|
||||||
make -f $(SUBMAKEFILE) clean
|
|
||||||
|
|
||||||
install.this:
|
|
||||||
make -f $(SUBMAKEFILE) install
|
|
||||||
|
|
||||||
export \
|
|
||||||
TOPDIR JWBDIR KERNEL_VERSION RPM_RELEASE HOST KERNEL_PKG_SUFFIX CUSTOMER \
|
|
||||||
KERNEL_BASE_DIR KERNEL_PKG KERNEL_BASE UPLOAD_HOST UPLOAD_PATH \
|
|
||||||
UPLOAD_OWNER BOOT_LABEL BOOT_LABEL PATCHES KERNEL_MAJOR KERNEL_MINOR \
|
|
||||||
KERNEL_RELEASE WD
|
|
||||||
72
make/lo.mk
72
make/lo.mk
|
|
@ -1,72 +0,0 @@
|
||||||
# === pre-define these >
|
|
||||||
TOOLS_DIR ?= $(TOPDIR)/tools
|
|
||||||
TOOLS_INCLUDE_DIR ?= $(TOOLS_DIR)
|
|
||||||
CPP_PREFIX ?= YLo
|
|
||||||
CPP_SUFFIX ?=
|
|
||||||
SO_PREFIX ?= lo_
|
|
||||||
LOADABLE_OBJ_HOOK ?= LOADABLE_OBJECT_HOOK
|
|
||||||
LOADABLE_OBJ_IGNORE ?=
|
|
||||||
# === pre-define these <
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
include $(JWBDIR)/make/profiler-defs.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
.PRECIOUS: %.cpp %.o
|
|
||||||
LOADABLE_OBJS_HEADER ?= $(wildcard $(TOOLS_INCLUDE_DIR)/$(CPP_PREFIX)*$(CPP_SUFFIX).h)
|
|
||||||
LOADABLE_OBJS_BASE ?= $(patsubst %$(CPP_SUFFIX),%,$(patsubst $(CPP_PREFIX)%,%,$(basename $(notdir $(LOADABLE_OBJS_HEADER)))))
|
|
||||||
LOADABLE_OBJS = $(filter-out $(LOADABLE_OBJ_IGNORE),$(LOADABLE_OBJS_BASE))
|
|
||||||
LOADABLE_OBJ_CPP = $(patsubst %,%.cpp,$(LOADABLE_OBJS))
|
|
||||||
LOADABLE_OBJS_O = $(patsubst %,%.o,$(LOADABLE_OBJS))
|
|
||||||
|
|
||||||
OTHER_CPP_IGNORE += $(patsubst %,$(CPP_PREFIX)%.cpp,$(LOADABLE_OBJ_IGNORE)) $(patsubst %,%.cpp,$(LOADABLE_OBJ_IGNORE))
|
|
||||||
SRC_ALL_CPP_IGNORE += $(OTHER_CPP_IGNORE)
|
|
||||||
OTHER_CPP ?= $(filter-out $(LOADABLE_OBJ_CPP) $(OTHER_CPP_IGNORE),$(wildcard *.cpp))
|
|
||||||
ifneq ($(OTHER_CPP),)
|
|
||||||
OTHER_O = $(patsubst %.cpp,%.o,$(OTHER_CPP))
|
|
||||||
OTHER_LIB = liblocal.a
|
|
||||||
OTHER_LIB_LDFLAGS = -L. -llocal
|
|
||||||
OTHER_MEMBERS_O = $(OTHER_LIB)($(OTHER_O))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(TARGET),mingw)
|
|
||||||
LOADABLE_OBJ_LIBS = $(addprefix $(SO_PREFIX), $(addsuffix .so, $(LOADABLE_OBJS)))
|
|
||||||
else
|
|
||||||
LOADABLE_OBJ_LIBS = $(addprefix $(SO_PREFIX), $(addsuffix .dll, $(LOADABLE_OBJS)))
|
|
||||||
endif
|
|
||||||
BUILD_LOADABLE_OBJ_LIBS = $(addprefix $(BUILD_LIBDIR)/,$(LOADABLE_OBJ_LIBS))
|
|
||||||
INSTALLED_LOADABLE_OBJ_LIBS = $(addprefix $(INSTALL_LIBDIR)/,$(LOADABLE_OBJ_LIBS))
|
|
||||||
|
|
||||||
all: $(LOADABLE_OBJ_LIBS) $(BUILD_LOADABLE_OBJ_LIBS)
|
|
||||||
install: $(INSTALLED_LOADABLE_OBJ_LIBS)
|
|
||||||
clean: clean.lo
|
|
||||||
|
|
||||||
clean.generated:
|
|
||||||
$(RM) -f $(patsubst $(CPP_PREFIX)%$(CPP_SUFFIX),%,$(notdir $(patsubst %.h,%.cpp,$(LOADABLE_OBJS_HEADER))))
|
|
||||||
|
|
||||||
clean.lo: profclean clean.generated
|
|
||||||
$(RM) -f $(wildcard *.o *.so *.done *.dll $(OTHER_LIB))
|
|
||||||
|
|
||||||
$(SO_PREFIX)%.so $(SO_PREFIX)%.dll: %.o $(CPP_PREFIX)%.o $(OTHER_LIB)
|
|
||||||
$(CXX) $^ -L. $(OTHER_LIB_LDFLAGS) -shared $(FINAL_LDFLAGS) -o $@
|
|
||||||
|
|
||||||
%.cpp: $(TOOLS_INCLUDE_DIR)/$(CPP_PREFIX)%$(CPP_SUFFIX).h
|
|
||||||
echo "#include \"$<\"" > $@.tmp
|
|
||||||
if [ "$(LO_NAMESPACE)" ]; then echo "using namespace $(LO_NAMESPACE);" >> $@.tmp; fi
|
|
||||||
echo "$(LOADABLE_OBJ_HOOK)($(CPP_PREFIX)$*$(CPP_SUFFIX));" >> $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
$(OTHER_LIB)(%.o): %.o
|
|
||||||
$(AR) rU $(OTHER_LIB) $<
|
|
||||||
$(RANLIB) $(OTHER_LIB)
|
|
||||||
|
|
||||||
$(OTHER_LIB): $(OTHER_MEMBERS_O)
|
|
||||||
|
|
||||||
$(BUILD_LIBDIR)/%.so: %.so
|
|
||||||
install -m 755 $< $@
|
|
||||||
$(BUILD_LIBDIR)/%.dll: %.dll
|
|
||||||
install -m 755 $< $@
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
include $(JWBDIR)/make/depend.mk
|
|
||||||
10
make/main.mk
10
make/main.mk
|
|
@ -1,10 +0,0 @@
|
||||||
EXE = $(PROJECT)
|
|
||||||
|
|
||||||
ifneq ($(TARGET),mingw)
|
|
||||||
FINAL_LDFLAGS += -rdynamic
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/exe.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
clean: profclean
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
#PROJECT ?= $(shell cd $(TOPDIR); /bin/pwd | xargs notdir)
|
|
||||||
|
|
||||||
#define mcu_check_var
|
|
||||||
# ifeq ($($(1)),)
|
|
||||||
# $(error $(1) not specified)
|
|
||||||
# endif
|
|
||||||
#endef
|
|
||||||
|
|
||||||
#ifneq ($(MAKECMDGOALS),clean)
|
|
||||||
# ifeq ($(MCU_BOARD_MODEL),)
|
|
||||||
# $(error MCU_BOARD_MODEL not specified)
|
|
||||||
# endif
|
|
||||||
#
|
|
||||||
# ifeq ($(MCU_FLASH_OFFSET),)
|
|
||||||
# $(error MCU_FLASH_OFFSET not specified)
|
|
||||||
# endif
|
|
||||||
#
|
|
||||||
# ifeq ($(MCU_FLASH_SIZE),)
|
|
||||||
# $(error MCU_FLASH_SIZE not specified)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MCU_PRODUCT_TMPL_DIR ?= $(JWBDIR)/tmpl/products
|
|
||||||
|
|
||||||
ifneq ($(TARGET_PRODUCT),)
|
|
||||||
MCU_BOARD_MODEL_LC ?= $(TARGET_PRODUCT)
|
|
||||||
MCU_BOARD ?= $(TARGET_PRODUCT)
|
|
||||||
MCU_BOARD_LC ?= $(TARGET_PRODUCT)
|
|
||||||
else
|
|
||||||
MCU_BOARD_MODEL_LC ?= $(shell $(ECHO) $(MCU_BOARD_MODEL) | $(TR) '[A-Z]' '[a-z]')
|
|
||||||
MCU_BOARD ?= $(MCU_BOARD_MODEL)
|
|
||||||
MCU_BOARD_LC ?= $(shell $(ECHO) $(MCU_BOARD) | $(TR) '[A-Z]' '[a-z]')
|
|
||||||
endif
|
|
||||||
|
|
||||||
MCU_OPENOCD_CFG_DEFAULT_SEARCH_PATH ?= $(TOPDIR)/make
|
|
||||||
MCU_OPENOCD_CFG_SEARCH_PATH ?= $(MCU_OPENOCD_CFG_DEFAULT_SEARCH_PATH)
|
|
||||||
MCU_OPENOCD_CFG_FILE ?= $(info looking for $(MCU_OPENOCD_CFG_NAME) in $(MCU_OPENOCD_CFG_SEARCH_PATH)) $(call find_file,$(MCU_OPENOCD_CFG_NAME),$(MCU_OPENOCD_CFG_SEARCH_PATH))
|
|
||||||
MCU_OPENOCD_TELNET_PORT ?= 4444
|
|
||||||
MCU_OPENOCD_OPTS ?= -f $(MCU_OPENOCD_CFG_FILE) -c "echo \"Started by jw-build\"" -c "gdb_port 3333" -c "telnet_port $(MCU_OPENOCD_TELNET_PORT)" -c "tcl_port 6666"
|
|
||||||
MCU_OPENOCD_BIN ?= openocd
|
|
||||||
MCU_OPENOCD ?= $(MCU_OPENOCD_BIN) $(MCU_OPENOCD_OPTS) $(MCU_OPENOCD_EXTRA_OPTS)
|
|
||||||
|
|
||||||
# -- direct flash access
|
|
||||||
MCU_FLASH_BANK ?= 0
|
|
||||||
#MCU_FLASH_OFFSET ?= 0x0000000
|
|
||||||
#MCU_FLASH_SIZE ?= 0x5000
|
|
||||||
|
|
||||||
MCU_FLASH_FILE_BASE ?= $(MCU_BOARD_LC)-flash-$(MCU_FLASH_BANK_NAME)
|
|
||||||
MCU_FLASH_FILE_BIN ?= $(MCU_FLASH_FILE_BASE).bin
|
|
||||||
MCU_FLASH_FILE_HEX ?= $(MCU_FLASH_FILE_BASE).hex
|
|
||||||
|
|
||||||
MCU_FLASH_FETCH_BANK ?= $(MCU_FLASH_BANK)
|
|
||||||
MCU_FLASH_FETCH_FILE_BIN ?= $(MCU_FLASH_FILE_BIN)
|
|
||||||
MCU_FLASH_FETCH_FILE_HEX ?= $(MCU_FLASH_FILE_HEX)
|
|
||||||
MCU_FLASH_FETCH_OFFSET ?= $(MCU_FLASH_OFFSET)
|
|
||||||
MCU_FLASH_FETCH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
|
|
||||||
MCU_FLASH_PUSH_BANK ?= $(MCU_FLASH_BANK)
|
|
||||||
MCU_FLASH_PUSH_FILE_BIN ?= $(MCU_FLASH_FILE_BIN)
|
|
||||||
MCU_FLASH_PUSH_FILE_HEX ?= $(MCU_FLASH_FILE_HEX)
|
|
||||||
MCU_FLASH_PUSH_OFFSET ?= $(MCU_FLASH_OFFSET)
|
|
||||||
MCU_FLASH_PUSH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
|
|
||||||
# -- direct memory access
|
|
||||||
MCU_MEM_FETCH_FILE_BIN ?= $(MCU_MEM_FILE_BIN)
|
|
||||||
MCU_MEM_FETCH_FILE_HEX ?= $(MCU_MEM_FILE_HEX)
|
|
||||||
MCU_MEM_FETCH_OFFSET ?= $(MCU_FLASH_OFFSET)
|
|
||||||
MCU_MEM_FETCH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
|
|
||||||
MCU_MEM_PUSH_FILE_BIN ?= $(MCU_MEM_FILE_BIN)
|
|
||||||
MCU_MEM_PUSH_FILE_HEX ?= $(MCU_MEM_FILE_HEX)
|
|
||||||
MCU_MEM_PUSH_OFFSET ?= $(MCU_FLASH_OFFSET)
|
|
||||||
MCU_MEM_PUSH_SIZE ?= $(MCU_FLASH_SIZE)
|
|
||||||
|
|
||||||
MCU_MEM_FILE_BASE ?= $(MCU_BOARD_LC)-mem-$(MCU_MEM_FETCH_OFFSET)-$(MCU_MEM_FETCH_SIZE)
|
|
||||||
MCU_MEM_FILE_BIN ?= $(MCU_MEM_FILE_BASE).bin
|
|
||||||
MCU_MEM_FILE_HEX ?= $(MCU_MEM_FILE_BASE).hex
|
|
||||||
|
|
||||||
ifneq ($(MCU_MEM_FETCH_OFFSET),)
|
|
||||||
MCU_OBJCOPY_FETCH_OPTS += --change-addresses $(MCU_MEM_FETCH_OFFSET)
|
|
||||||
endif
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
DIR_BASENAME = $(notdir $(CWD))
|
|
||||||
|
|
||||||
ifeq ($(EXE_BASENAME),)
|
|
||||||
ifneq ($(DIR_BASENAME),test)
|
|
||||||
EXE_BASENAME = $(EXE_BASENAME_PREFIX)$(DIR_BASENAME).elf
|
|
||||||
else
|
|
||||||
EXE_BASENAME = $(EXE_BASENAME_PREFIX)test-$(notdir $(shell cd ..; $(PWD))).elf
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
MCU_FLASH_PUSH_FILE_HEX ?= $(patsubst %.elf,%.hex,$(EXE_BASENAME))
|
|
||||||
EXE_MAP ?= $(patsubst %.elf,%.map,$(EXE_BASENAME))
|
|
||||||
|
|
||||||
# I think these (or something equivalent) should go somewhere here. Not cleaned
|
|
||||||
# up enough in modm builds to do it.
|
|
||||||
#include $(JWBDIR)/make/defs.mk
|
|
||||||
#include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/mcu-defs.mk
|
|
||||||
include $(JWBDIR)/make/exe.mk
|
|
||||||
include $(JWBDIR)/make/mcu-flash.mk
|
|
||||||
|
|
||||||
all: $(MCU_FLASH_PUSH_FILE_HEX)
|
|
||||||
|
|
||||||
clean: mcu-exe.clean
|
|
||||||
|
|
||||||
mcu-exe.clean:
|
|
||||||
rm -f $(EXE_MAP)
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
.PHONY: flash-fetch flash-push flash-clean-fetch flash-clean-push
|
|
||||||
|
|
||||||
all:
|
|
||||||
|
|
||||||
flash-fetch: $(MCU_FLASH_FETCH_FILE_HEX)
|
|
||||||
flash-fetch-mem: $(MCU_MEM_FETCH_FILE_HEX)
|
|
||||||
clean: flash-clean-fetch
|
|
||||||
flash-clean-fetch:
|
|
||||||
$(RM) -f -- $(MCU_FLASH_FETCH_FILE_BIN) $(MCU_FLASH_FETCH_FILE_HEX) *.tmp
|
|
||||||
$(RM) -f -- $(MCU_MEM_FETCH_FILE_BIN) $(MCU_MEM_FETCH_FILE_HEX)
|
|
||||||
flash-clean-push:
|
|
||||||
$(RM) -f -- $(MCU_FLASH_PUSH_FILE_BIN) $(MCU_FLASH_PUSH_FILE_HEX) *.tmp
|
|
||||||
$(RM) -f -- $(MCU_MEM_PUSH_FILE_BIN) $(MCU_MEM_PUSH_FILE_HEX)
|
|
||||||
flash-clean: flash-clean-fetch flash-clean-push
|
|
||||||
$(MCU_FLASH_FETCH_FILE_BIN):
|
|
||||||
$(TIME) $(MCU_OPENOCD) -c "init" -c "reset init" -c "flash read_bank $(MCU_FLASH_FETCH_BANK) $@.tmp $(MCU_FLASH_FETCH_OFFSET) $(MCU_FLASH_FETCH_SIZE)" -c "exit"
|
|
||||||
$(MV) $@.tmp $@
|
|
||||||
$(MCU_MEM_FETCH_FILE_BIN):
|
|
||||||
$(MCU_OPENOCD) -c "init" -c "reset init" -c "dump_image $@.tmp $(MCU_MEM_FETCH_OFFSET) $(MCU_MEM_FETCH_SIZE)" -c "exit"
|
|
||||||
$(MV) $@.tmp $@
|
|
||||||
%.hex: %.elf
|
|
||||||
$(OBJCOPY) -O ihex $< $@.tmp
|
|
||||||
$(MV) $@.tmp $@
|
|
||||||
clean: flash-clean-hex
|
|
||||||
flash-clean-hex:
|
|
||||||
$(RM) -rf $(MCU_FLASH_PUSH_FILE_HEX)
|
|
||||||
%.hex: %.bin
|
|
||||||
$(OBJCOPY) $(MCU_OBJCOPY_FETCH_OPTS) -I binary -O ihex $< $@.tmp
|
|
||||||
$(MV) $@.tmp $@
|
|
||||||
flash-push: $(MCU_FLASH_PUSH_FILE_HEX)
|
|
||||||
# see http://openocd.org/doc/html/Flash-Programming.html
|
|
||||||
$(TIME) $(MCU_OPENOCD) -c "program $< verify reset exit $(MCU_FLASH_PUSH_OFFSET)"
|
|
||||||
%-flash-push:
|
|
||||||
MCU_FLASH_PUSH_FILE_HEX=$* make flash-push
|
|
||||||
|
|
||||||
openocd:
|
|
||||||
$(MCU_OPENOCD)
|
|
||||||
openocd-bg:
|
|
||||||
$(MCU_OPENOCD) &
|
|
||||||
openocd-reset-bg:
|
|
||||||
$(MCU_OPENOCD) -c "init" -c "reset init" &
|
|
||||||
openocd-kill:
|
|
||||||
killall $(MCU_OPENOCD_BIN)
|
|
||||||
openocd-telnet:
|
|
||||||
telnet localhost $(MCU_OPENOCD_TELNET_PORT)
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
include $(JWBDIR)/make/mcu-defs.mk
|
|
||||||
include $(JWBDIR)/make/topdir.mk
|
|
||||||
include $(JWBDIR)/make/mcu-flash.mk
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
all:
|
|
||||||
libpath:
|
|
||||||
@echo "export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)"
|
|
||||||
@echo "export PATH=.:$(PATH)"
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
IS_PLUGIN = true
|
|
||||||
USE_PLUGIN_VERSION_LIB ?= true
|
|
||||||
PLUGIN_API ?= $(notdir $(shell cd ..; $(PWD)))
|
|
||||||
PLUGIN_NAME ?= $(notdir $(shell $(PWD)))
|
|
||||||
PLUGIN_PREFIX ?= feedfs
|
|
||||||
|
|
||||||
ifneq ($(TARGET),mingw)
|
|
||||||
PLUGIN_SUFFIX ?= so
|
|
||||||
else
|
|
||||||
PLUGIN_SUFFIX ?= dll
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(PLUGIN_PREFIX),)
|
|
||||||
PLUGIN_PREFIX_ = $(PLUGIN_PREFIX)_
|
|
||||||
endif
|
|
||||||
|
|
||||||
PLUGIN_PREFIX_AND_API ?= $(PLUGIN_PREFIX_)$(PLUGIN_API)
|
|
||||||
PLUGIN ?= $(PLUGIN_PREFIX_AND_API)_$(PLUGIN_NAME).$(PLUGIN_SUFFIX)
|
|
||||||
|
|
||||||
FINAL_CPPFLAGS += -D PLUGIN_NAME=$(PLUGIN_NAME) -D PLUGIN_NAME_STR=\"$(PLUGIN_NAME)\"
|
|
||||||
|
|
||||||
ifeq ($(USE_PLUGIN_VERSION_LIB),true)
|
|
||||||
PLUGIN_VERSION_LIB_BASENAME = $(PLUGIN_PREFIX_AND_API)_version
|
|
||||||
PLUGIN_VERSION_LIB = $(BUILD_LIBDIR)/lib$(PLUGIN_VERSION_LIB_BASENAME).a
|
|
||||||
#INSTALLED_PLUGIN_VERSION_LIB = $(INSTALL_LIBDIR)/lib$(PLUGIN_VERSION_LIB_BASENAME).a
|
|
||||||
FINAL_LDFLAGS += -Wl,--whole-archive -l$(PLUGIN_VERSION_LIB_BASENAME) -Wl,--no-whole-archive
|
|
||||||
endif
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
include $(JWBDIR)/make/plugin-defs.mk
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
|
|
||||||
all: $(PLUGIN_VERSION_LIB)
|
|
||||||
install:
|
|
||||||
clean: clean.local
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
version.o: version.cpp
|
|
||||||
$(CXX) $(FINAL_CXXFLAGS) $(FINAL_CPPFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
clean.local:
|
|
||||||
$(RM) -f version.o
|
|
||||||
|
|
||||||
$(PLUGIN_VERSION_LIB): version.o
|
|
||||||
ar r $@ $<
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
include $(JWBDIR)/make/debugger.mk
|
|
||||||
include $(JWBDIR)/make/ldlibpath.mk
|
|
||||||
include $(JWBDIR)/make/plugin-defs.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
include $(JWBDIR)/make/depend.mk
|
|
||||||
include $(JWBDIR)/make/backup.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
FINAL_CXXFLAGS += -D_PLUGIN
|
|
||||||
FINAL_CFLAGS += -D_PLUGIN
|
|
||||||
|
|
||||||
all: build_LIB
|
|
||||||
install: install_LIB
|
|
||||||
clean: execlean localclean profclean
|
|
||||||
distclean: clean
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
PREREQ_INSTALLED_TARGETS += run gdb valgrind attach attach-strace libpath valgrind strace debug lldb echo-deps shortcut check-conf
|
|
||||||
|
|
||||||
ifneq ($(filter $(PREREQ_INSTALLED_TARGETS),$(MAKECMDGOALS)),)
|
|
||||||
PREREQ_BUILD += $(shell ls /etc/ld.so.conf.d | sed '/ld-.*.conf/ !d; s/ld-\(.*\).conf/\1/')
|
|
||||||
endif
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
PATH_PROFILE ?= path-$(PROJECT).sh
|
|
||||||
EXE_SH =
|
|
||||||
|
|
||||||
ifeq ($(PROFILE),)
|
|
||||||
PROFILE = $(PATH_PROFILE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
PROFILE += $(filter-out $(PATH_PROFILE),$(wildcard *.sh))
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
|
|
||||||
all: $(PROFILE)
|
|
||||||
install: install_files_PROFILE
|
|
||||||
clean: allclean localclean doneclean textclean clean.profile
|
|
||||||
|
|
||||||
path-%.sh:
|
|
||||||
@echo "export PATH=\$$PATH:$(INSTALL_EXEDIR)" > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
clean.profile:
|
|
||||||
/bin/bash $(JWB_SCRIPT_DIR)/scm.sh clean -f $(PROFILE)
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
all:
|
|
||||||
clean:
|
|
||||||
|
|
||||||
PROF_EXE_PATH ?= $(EXE_PATH)
|
|
||||||
CALLGRIND_OUT ?= callgrind.out
|
|
||||||
OPROF_OUT_DIR ?= oprofile-data
|
|
||||||
|
|
||||||
ifeq ($(USE_GPROF),true)
|
|
||||||
FINAL_CXXFLAGS += -pg
|
|
||||||
FINAL_CFLAGS += -pg
|
|
||||||
FINAL_LDFLAGS += -pg
|
|
||||||
clean: clean.gprof
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(COMPILER_SUITE),gcc)
|
|
||||||
ifeq ($(USE_GCOV),true)
|
|
||||||
FINAL_CXXFLAGS += -fprofile-arcs -ftest-coverage
|
|
||||||
FINAL_CFLAGS += -fprofile-arcs -ftest-coverage
|
|
||||||
FINAL_LDFLAGS += -fprofile-arcs -ftest-coverage
|
|
||||||
clean: clean.gcov
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(COMPILER_SUITE),clang)
|
|
||||||
ifeq ($(USE_XRAY),true)
|
|
||||||
FINAL_CXXFLAGS += -fxray-instrument -fxray-instruction-threshold=1
|
|
||||||
FINAL_CFLAGS += -fxray-instrument -fxray-instruction-threshold=1
|
|
||||||
#FINAL_LDFLAGS += -fxray-instrument
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
||||||
# ---- callgrind
|
|
||||||
|
|
||||||
clean: clean.callgrind
|
|
||||||
|
|
||||||
callgrind: run-deps
|
|
||||||
$(RM) -f core.*
|
|
||||||
valgrind --tool=callgrind $(VALGRIND_OPTS) $(EXE_PATH) $(EXE_ARGS)
|
|
||||||
callgrind-noinst: run-deps
|
|
||||||
$(RM) -f core.*
|
|
||||||
valgrind --tool=callgrind --callgrind-out-file=$(CALLGRIND_OUT) --instr-atstart=no $(VALGRIND_OPTS) $(EXE_PATH) $(EXE_ARGS)
|
|
||||||
$(CALLGRIND_OUT): callgrind
|
|
||||||
kcachegrind: $(CALLGRIND_OUT)
|
|
||||||
kcachegrind $<
|
|
||||||
callgrind-startinst:
|
|
||||||
ps aux | grep callgrind | grep -v "grep\|make\|callgrind_control" | awk '{print $$2}' | xargs callgrind_control --instr=on
|
|
||||||
callgrind-stopinst:
|
|
||||||
ps aux | grep callgrind | grep -v "grep\|make\|callgrind_control" | awk '{print $$2}' | xargs callgrind_control --instr=off
|
|
||||||
callgrind-dump:
|
|
||||||
ps aux | grep callgrind | grep -v "grep\|make\|callgrind_control" | awk '{print $$2}' | xargs callgrind_control --dump
|
|
||||||
clean.callgrind:
|
|
||||||
$(RM) -f $(CALLGRIND_OUT)
|
|
||||||
|
|
||||||
# ---- oprofile
|
|
||||||
|
|
||||||
clean: clean.oprof
|
|
||||||
|
|
||||||
operf: | $(OPROF_OUT_DIR)
|
|
||||||
|
|
||||||
$(OPROF_OUT_DIR):
|
|
||||||
mkdir -p $@
|
|
||||||
oprof-setup:
|
|
||||||
echo 0 | sudo tee /proc/sys/kernel/kptr_restrict
|
|
||||||
echo 0 | sudo tee /proc/sys/kernel/perf_event_paranoid
|
|
||||||
oprof-callgraph.txt:
|
|
||||||
opreport --session-dir $(OPROF_OUT_DIR) --callgraph > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
oprof-view-callgraph-txt: oprof-callgraph.txt
|
|
||||||
less -S $<
|
|
||||||
oprof-callgraph.dot: oprof-callgraph.txt
|
|
||||||
cat $< | gprof2dot -f oprofile > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
oprof-callgraph.pdf: oprof-callgraph.dot
|
|
||||||
dot -Tpdf $< -o $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
oprof-view-callgraph-pdf: oprof-callgraph.pdf
|
|
||||||
okular $<
|
|
||||||
oprof-view-callgraph-dot: oprof-callgraph.dot
|
|
||||||
xdot $<
|
|
||||||
|
|
||||||
#operf: operf.txt
|
|
||||||
#operf.txt:
|
|
||||||
# operf --session-dir $(OPROF_OUT_DIR) $(PROF_CMD)
|
|
||||||
#operf-view-txt: operf.txt
|
|
||||||
# less -S $<
|
|
||||||
#operf-callgraph.pdf: gmon.out
|
|
||||||
# operf $(PROF_EXE_PATH) | operf2dot | dot -Tpdf -o $@.tmp
|
|
||||||
# mv $@.tmp $@
|
|
||||||
#operf-pdf: operf-callgraph.pdf
|
|
||||||
|
|
||||||
clean.oprof:
|
|
||||||
$(RM) -rf $(OPROF_OUT_DIR) oprof-callgraph.txt oprof-callgraph.pdf oprof-callgraph.dot
|
|
||||||
|
|
||||||
# ---- gcov
|
|
||||||
|
|
||||||
clean.gcov:
|
|
||||||
$(RM) -f *.gcda *.gcov
|
|
||||||
|
|
||||||
# ---- gprof
|
|
||||||
|
|
||||||
clean: clean.gprof
|
|
||||||
gprof: gprof.txt
|
|
||||||
gprof.txt:
|
|
||||||
gprof $(PROF_EXE_PATH) > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
gprof-view-txt: gprof.txt
|
|
||||||
less -S $<
|
|
||||||
gprof-callgraph.pdf: gmon.out
|
|
||||||
gprof $(PROF_EXE_PATH) | gprof2dot | dot -Tpdf -o $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
gprof-pdf: gprof-callgraph.pdf
|
|
||||||
gprof-view-callgraph-pdf: gprof-callgraph.pdf
|
|
||||||
okular $<
|
|
||||||
clean.gprof:
|
|
||||||
$(RM) -f gmon.out gprof.txt *.tmp gprof-callgraph.pdf
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
include $(JWBDIR)/make/profiler-defs.mk
|
|
||||||
include $(JWBDIR)/make/profiler-rules-run.mk
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
CAP_PROJECT := $(shell echo $(PROJECT) | tr [a-z] [A-Z])
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
$(CAP_PROJECT)_VERSION := $(VERSION)
|
|
||||||
$(CAP_PROJECT)_INSTALL_LIBDIR := $(INSTALL_LIBDIR)
|
|
||||||
$(CAP_PROJECT)_TOPDIR := $(TOPDIR)
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
all:
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/projects-dir.mk
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: LGPL-2.0-only
|
|
||||||
#
|
|
||||||
# Makefile for managing multiple software repositories in one tree
|
|
||||||
#
|
|
||||||
# (C) Copyright 2001-2025, Jan Lindemann <jan@janware.com>
|
|
||||||
#
|
|
||||||
# This is the top-level Makefile for a janware software build tree. It is
|
|
||||||
# provided under the terms of the GNU Lesser Public License, Version 2.
|
|
||||||
#
|
|
||||||
# Some of its targets download software from janware GmbH servers. For those,
|
|
||||||
# you will need a janware.com user account. Ask admin@janware.com if you want
|
|
||||||
# one, then define the JANWARE_USER = <janware user name> environment variable.
|
|
||||||
#
|
|
||||||
# Current documentation on how this Makefile is meant to be used can be found
|
|
||||||
# under https://janware.com/wiki/pub/en/sw/build/. Running "make help" might
|
|
||||||
# take you there semi-automatically.
|
|
||||||
#
|
|
||||||
|
|
||||||
PROJECTS_MAKEFILE_NAME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
|
||||||
JWBDIR_GIT_REMOTE ?= ssh://$(JANWARE_USER)@git.janware.com/srv/git/jan/proj/jw-build
|
|
||||||
JWBDIR ?= $(notdir $(JWBDIR_GIT_REMOTE))
|
|
||||||
PROJECTS_DIR_INCLUDE_MK = $(JWBDIR)/make/projects-dir-include.mk
|
|
||||||
|
|
||||||
ifndef JANWARE_USER
|
|
||||||
JANWARE_USER = $(shell id -un)
|
|
||||||
$(warning Assuming JANWARE_USER=$(JANWARE_USER) from id -un)
|
|
||||||
$(warning Explicitly set environment variable JANWARE_USER to turn off this warning!)
|
|
||||||
endif
|
|
||||||
|
|
||||||
-include local.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
|
|
||||||
include $(PROJECTS_DIR_INCLUDE_MK)
|
|
||||||
|
|
||||||
$(PROJECTS_DIR_INCLUDE_MK):
|
|
||||||
git clone $(JWBDIR_GIT_REMOTE) $(JWBDIR)
|
|
||||||
[ -L $(PROJECTS_MAKEFILE_NAME) ] || \
|
|
||||||
ln -sf `find $(JWBDIR) -type f -print0 | xargs -0 grep -l some-random-string-to-id-this-makefile` \
|
|
||||||
$(PROJECTS_MAKEFILE_NAME)
|
|
||||||
|
|
@ -1,442 +0,0 @@
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: GPL-2.0+
|
|
||||||
#
|
|
||||||
# Manage multiple software repositories in one tree
|
|
||||||
#
|
|
||||||
# (C) Copyright 2001-2019, Jan Lindemann <jan@janware.com>
|
|
||||||
#
|
|
||||||
# This is the top-level Makefile for a janware software build tree. It is
|
|
||||||
# provided under the terms of the GNU Lesser Public License, Version 2.
|
|
||||||
#
|
|
||||||
# Some of its targets download software from janware GmbH servers. For those,
|
|
||||||
# you will need a janware.com user account. Ask admin@janware.com if you want
|
|
||||||
# one, then define the JANWARE_USER = <janware user name> environment variable.
|
|
||||||
#
|
|
||||||
# Current documentation on how this Makefile is meant to be used can be found
|
|
||||||
# under https://janware.com/wiki/pub/en/sw/build/. Running "make help" might
|
|
||||||
# take you there semi-automatically.
|
|
||||||
#
|
|
||||||
|
|
||||||
# ------------ Makefile and environment variable definitions
|
|
||||||
|
|
||||||
.NOTPARALLEL:
|
|
||||||
|
|
||||||
-include local.mk
|
|
||||||
PROJECTS_MAKEFILE_NAME ?= $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
|
||||||
|
|
||||||
# -- Find JWBDIR
|
|
||||||
DEV_PROJECTS_DIR ?= .
|
|
||||||
JWBDIR_NAME ?= jw-build
|
|
||||||
JWBDIR_SEARCH_PATH ?= $(DEV_PROJECTS_DIR) $(BUILD_TOOLS_PREFIX)/opt/$(FLAVOUR_PATH_PREFIX)
|
|
||||||
JWBDIR ?= $(firstword $(wildcard $(addsuffix /$(JWBDIR_NAME),$(JWBDIR_SEARCH_PATH))))
|
|
||||||
|
|
||||||
JW_BUILD_BINDIR = $(JWBDIR)/bin
|
|
||||||
JWB_SCRIPT_DIR = $(firstword $(wildcard ./$(JWBDIR_NAME)/scripts $(JW_BUILD_BINDIR)) jwb-script-dir-not-found)
|
|
||||||
JW_BUILD_REMOTE_BINDIR = /opt/jw-build/bin
|
|
||||||
|
|
||||||
SHELL = /bin/bash -o pipefail +H
|
|
||||||
PROJECTS_TXT ?= projects.txt
|
|
||||||
JW_BUILD_VERBOSE ?= false
|
|
||||||
BASE_PKGS = git cvs make sudo time time xdg-utils python3
|
|
||||||
PREREQ_RELEASE ?= pull
|
|
||||||
|
|
||||||
# ------------ evaluate Makefile and environment variables
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(PROJECTS_TXT)),)
|
|
||||||
PROJECTS ?= $(shell cat $(PROJECTS_TXT) | sed '/^ *\#/ d')
|
|
||||||
else
|
|
||||||
PROJECTS ?= $(shell ls -d */GNUmakefile */Makefile 2>/dev/null | sed 's%/[^/]*%%' | sort -u)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(JW_BUILD_VERBOSE),true)
|
|
||||||
SSH_WRAPPER_TRACE ?= -x
|
|
||||||
endif
|
|
||||||
|
|
||||||
export JW_BUILD_VERBOSE
|
|
||||||
|
|
||||||
# ------------ external programs I
|
|
||||||
|
|
||||||
CWD := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
|
||||||
GET_OS_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/get-os.sh $(JW_BUILD_BINDIR)/get-os.sh) get-os-sh-not-found)
|
|
||||||
SSH_WRAPPER_SH := $(CWD)/ssh-wrapper.sh
|
|
||||||
|
|
||||||
EXCLUDES_FILE ?= exclude.txt
|
|
||||||
EXCLUDES_FILES = $(wildcard exclude-$(shell $(GET_OS_SH) name 2>/dev/null).txt exclude-$(shell $(GET_OS_SH) 2>/dev/null).txt $(EXCLUDES_FILE))
|
|
||||||
ifneq ($(EXCLUDES_FILES),)
|
|
||||||
EXCLUDE_FROM_BUILD += $(shell sed 's/\#.*//g' $(EXCLUDES_FILES))
|
|
||||||
endif
|
|
||||||
OFFLINE_PROJECTS ?= $(EXCLUDE_FROM_BUILD)
|
|
||||||
|
|
||||||
TEXT_FILES_CACHE ?= text-files.txt
|
|
||||||
|
|
||||||
ifndef JANWARE_USER
|
|
||||||
ifneq ($(wildcard CVS/Root),)
|
|
||||||
JANWARE_USER = $(shell sed '/^:ext/ !d; s/:ext:\([^@]\+\)@.*/\1/' CVS/Root)
|
|
||||||
$(warning Assuming JANWARE_USER=$(JANWARE_USER) from CVS/Root)
|
|
||||||
else
|
|
||||||
JANWARE_USER = $(shell id -un)
|
|
||||||
$(warning Assuming JANWARE_USER=$(JANWARE_USER) from id -un)
|
|
||||||
endif
|
|
||||||
$(warning Explicitly set environment variable JANWARE_USER to turn off this warning!)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(JANWARE_USER),)
|
|
||||||
OFFLINE ?= true
|
|
||||||
else
|
|
||||||
export JANWARE_USER
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(OFFLINE),true)
|
|
||||||
UNAVAILABLE_TARGETS ?= pull.done update.done clone.done
|
|
||||||
else
|
|
||||||
UNAVAILABLE_TARGETS ?=
|
|
||||||
export CVSROOT = :ext:$(JANWARE_USER)@cvs.janware.com:/srv/cvs
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(JW_BUILD_SSH),)
|
|
||||||
export CVS_RSH := $(JW_BUILD_SSH)
|
|
||||||
else
|
|
||||||
export CVS_RSH := $(SSH_WRAPPER_SH)
|
|
||||||
endif
|
|
||||||
|
|
||||||
export GIT_SSH := $(CVS_RSH)
|
|
||||||
ifeq ($(filter pkg-%,$(MAKECMDGOALS)),)
|
|
||||||
export JW_BUILD_SSH_EXTRA_OPTS += -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPath=/tmp/%r@jw-build:%h:%p -o ControlPersist=3m -l $(JANWARE_USER)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(CLONE_FROM_USER),)
|
|
||||||
export PGIT_CLONE_FROM_USER = $(CLONE_FROM_USER)
|
|
||||||
else
|
|
||||||
export PGIT_CLONE_FROM_USER = $(JANWARE_USER)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(OFFLINE_PROJECTS),)
|
|
||||||
export PGIT_IGNORE = $(OFFLINE_PROJECTS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(EXCLUDE_FROM_BUILD),)
|
|
||||||
PROJECTS_PY_EXTRA_BUILD_OPTS += --exclude "$(EXCLUDE_FROM_BUILD)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
# non-interactive mode
|
|
||||||
INTERACTIVE ?= true
|
|
||||||
ifneq ($(INTERACTIVE),true)
|
|
||||||
DASH_Y := -y
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ------------ external programs II
|
|
||||||
|
|
||||||
BROWSER ?= xdg-open
|
|
||||||
EDITOR ?= xdg-open
|
|
||||||
ifeq ($(TIME),)
|
|
||||||
TIME = $(shell which time) -p
|
|
||||||
endif
|
|
||||||
PROJECTS_PY = python3 $(JWB_SCRIPT_DIR)/projects.py --prefix $(shell pwd) $(PROJECTS_PY_EXTRA_OPTS)
|
|
||||||
PROJECTS_PY_BUILD = $(PROJECTS_PY) build $(PROJECTS_PY_EXTRA_BUILD_OPTS)
|
|
||||||
PGIT_SH = /bin/bash $(JWB_SCRIPT_DIR)/pgit.sh
|
|
||||||
PURGE_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/purge-stale-projects.sh $(JW_BUILD_BINDIR)/purge-stale-projects.sh) purge-not-found)
|
|
||||||
PKG_MANAGER_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/pkg-manager.sh $(JW_BUILD_BINDIR)/pkg-manager.sh) pkg-manager-not-found)
|
|
||||||
CREATE_PROJECT_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/jw-build-create-project.sh $(JW_BUILD_BINDIR)/jw-build-create-project.sh) jw-build-create-project-not-found)
|
|
||||||
LIST_VCS_FILES_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/scm.sh $(JW_BUILD_BINDIR)/scm.sh) scm-sh-not-found) ls-files
|
|
||||||
JW_PKG = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/jw-pkg $(JW_BUILD_BINDIR)/jw-pkg) jw-pkg-not-found)
|
|
||||||
GIT_SRV_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@git.janware.com $(JW_BUILD_REMOTE_BINDIR)/git-srv-admin.sh
|
|
||||||
CVS_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@cvs.janware.com $(JW_BUILD_REMOTE_BINDIR)/cvs-admin.sh
|
|
||||||
|
|
||||||
# ------------ projects to be built
|
|
||||||
|
|
||||||
TARGET_PROJECTS = $(filter-out $(EXCLUDE_FROM_BUILD),$(PROJECTS))
|
|
||||||
BUILD_PROJECTS = $(shell $(PROJECTS_PY_BUILD) --build-order all $(TARGET_PROJECTS))
|
|
||||||
GIT_PROJECTS = $(patsubst %/,%,$(dir $(wildcard $(addsuffix /.git,$(BUILD_PROJECTS)))))
|
|
||||||
CVS_PROJECTS = $(patsubst %/,%,$(dir $(wildcard $(addsuffix /CVS,$(BUILD_PROJECTS)))))
|
|
||||||
|
|
||||||
# ------------ targets
|
|
||||||
|
|
||||||
# --- mandatory targets
|
|
||||||
|
|
||||||
all: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
|
|
||||||
$(TIME) $(PROJECTS_PY_BUILD) $@ $(TARGET_PROJECTS)
|
|
||||||
clean: clean-dirs
|
|
||||||
distclean: clean-all-dirs done.clean
|
|
||||||
install:
|
|
||||||
@echo
|
|
||||||
@echo " Target install is not supported by this Makefile."
|
|
||||||
@echo " Target pkg-rebuild-reinstall might be what you are looking for."
|
|
||||||
@echo
|
|
||||||
@exit 1
|
|
||||||
|
|
||||||
# --- build targets
|
|
||||||
|
|
||||||
rebuild: clean purge pull subdirs-all
|
|
||||||
|
|
||||||
subdirs-%:
|
|
||||||
FORCE_REBUILD_SUBDIRS=true make $*
|
|
||||||
|
|
||||||
# --- informative-only targets
|
|
||||||
|
|
||||||
help doc-project doc-module:
|
|
||||||
$(BROWSER) $(firstword $(shell sed '/https:/ !d; s%.*https%https%; s/ .*//' $(firstword $(MAKEFILE_LIST))))
|
|
||||||
|
|
||||||
status: $(SSH_WRAPPER_SH)
|
|
||||||
for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done
|
|
||||||
cvs status $(addsuffix VERSION,$(CVS_PROJECTS))
|
|
||||||
$(PGIT_SH) -uno status
|
|
||||||
|
|
||||||
build-order-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
|
|
||||||
$(PROJECTS_PY_BUILD) --build-order $* $(TARGET_PROJECTS) | sed 's/ */\n/g'
|
|
||||||
|
|
||||||
build-order: build-order-all
|
|
||||||
|
|
||||||
echo-build-deps:
|
|
||||||
@$(PROJECTS_PY) required-os-pkg --skip-excluded --flavours "build" $(TARGET_PROJECTS)
|
|
||||||
|
|
||||||
echo-install-deps:
|
|
||||||
@$(PROJECTS_PY) required-os-pkg --skip-excluded --flavours "build run" $(TARGET_PROJECTS)
|
|
||||||
|
|
||||||
echo-release-deps:
|
|
||||||
@$(PROJECTS_PY) required-os-pkg --skip-excluded --flavours "build run release" $(TARGET_PROJECTS)
|
|
||||||
echo-os:
|
|
||||||
@$(GET_OS_SH)
|
|
||||||
|
|
||||||
echo-projects:
|
|
||||||
@echo $(PROJECTS)
|
|
||||||
|
|
||||||
echo-target-projects:
|
|
||||||
@echo $(TARGET_PROJECTS)
|
|
||||||
|
|
||||||
echo-excludes:
|
|
||||||
@echo $(EXCLUDE_FROM_BUILD)
|
|
||||||
|
|
||||||
edit-%: | $(TEXT_FILES_CACHE)
|
|
||||||
$(EDITOR) $(shell grep "/$*$$" $(TEXT_FILES_CACHE))
|
|
||||||
|
|
||||||
distclean: clean.text-files-cache
|
|
||||||
clean.text-files-cache:
|
|
||||||
rm -f $(TEXT_FILES_CACHE)
|
|
||||||
list-files:
|
|
||||||
@realpath PROJECTS_MAKEFILE_NAME
|
|
||||||
@for p in $(BUILD_PROJECTS); do \
|
|
||||||
$(LIST_VCS_FILES_SH) -znf $$p | sed -z "s/^/$$p\//" | \
|
|
||||||
xargs -0 realpath ;\
|
|
||||||
done
|
|
||||||
$(TEXT_FILES_CACHE):
|
|
||||||
@make -s text-files-update
|
|
||||||
text-files-update:
|
|
||||||
make -s --no-print-directory list-files | tr '\n' '\0' | xargs -0 file -N | sed "/:.*text/I !d; s/:.*//" > $(TEXT_FILES_CACHE).tmp
|
|
||||||
mv $(TEXT_FILES_CACHE).tmp $(TEXT_FILES_CACHE)
|
|
||||||
text-files-update-all:
|
|
||||||
@PROJECTS_TXT= make text-files-update
|
|
||||||
text-files-list list-text-files: | $(TEXT_FILES_CACHE)
|
|
||||||
@cat $(TEXT_FILES_CACHE)
|
|
||||||
text-files-list-0 list-text-files-0: | $(TEXT_FILES_CACHE)
|
|
||||||
@cat $(TEXT_FILES_CACHE) | tr '\n' '\0'
|
|
||||||
|
|
||||||
cloc:
|
|
||||||
for p in $(GIT_PROJECTS); do \
|
|
||||||
git -C $$p submodule status | sed "s|^ *\([^ ]\+\) \+\([^ ]\+\) *.*|$$p/\2|" ;\
|
|
||||||
done > cloc-ignore.txt
|
|
||||||
for p in $(foreach s,dist include bin lib,$(addsuffix /$s,$(BUILD_PROJECTS))); do \
|
|
||||||
echo $$p >> cloc-ignore.txt ;\
|
|
||||||
done
|
|
||||||
cloc --exclude-list-file=cloc-ignore.txt $(BUILD_PROJECTS)
|
|
||||||
|
|
||||||
# --- package-related targets
|
|
||||||
|
|
||||||
pkg-manager-refresh:
|
|
||||||
$(PKG_MANAGER_SH) refresh $(DASH_Y)
|
|
||||||
|
|
||||||
pkg-install-build-deps:
|
|
||||||
$(PKG_MANAGER_SH) install $(DASH_Y) "$(BASE_PKGS) $(shell $(PROJECTS_PY) required-os-pkg --skip-excluded --flavours build $(TARGET_PROJECTS))"
|
|
||||||
|
|
||||||
pkg-install-release-deps:
|
|
||||||
$(PKG_MANAGER_SH) install $(DASH_Y) "$(BASE_PKGS) $(shell $(PROJECTS_PY) required-os-pkg --skip-excluded --flavours 'build run release' $(TARGET_PROJECTS))"
|
|
||||||
|
|
||||||
pkg-exclude-built-today:
|
|
||||||
touch $(EXCLUDES_FILE)
|
|
||||||
$(JW_PKG) built-today > built-today.tmp
|
|
||||||
cat $(EXCLUDES_FILE) built-today.tmp | sed 's/ */\n/g' | sort -u > $(EXCLUDES_FILE).tmp
|
|
||||||
mv $(EXCLUDES_FILE).tmp $(EXCLUDES_FILE)
|
|
||||||
distclean: clean.pkg-exclude-built-today
|
|
||||||
clean.pkg-exclude-built-today:
|
|
||||||
rm -f $(EXCLUDES_FILE).tmp built-today.tmp
|
|
||||||
|
|
||||||
pkg-exclude-installed:
|
|
||||||
$(JW_PKG) list-projects | while read p; do sed -i "s/^# *$$p$$/$$p/" $(EXCLUDES_FILE) ; done
|
|
||||||
|
|
||||||
pkg-list-groups:
|
|
||||||
@find . -name project.conf | xargs sed '/^ *group *=/!d; s/group *= *//; s/"//g' | sort -u
|
|
||||||
|
|
||||||
pkg-release-reinstall: $(PREREQ_RELEASE)
|
|
||||||
|
|
||||||
pkg-release-all:
|
|
||||||
/bin/bash ./packager-client/scripts/packager-client-2.sh
|
|
||||||
|
|
||||||
pkg-fetch-from-%:
|
|
||||||
ssh $* /opt/jw-base/bin/jw-pkg list -s > $(PROJECTS_TXT).tmp
|
|
||||||
mv $(PROJECTS_TXT).tmp $(PROJECTS_TXT)
|
|
||||||
|
|
||||||
pkg-init-%:
|
|
||||||
$(CREATE_PROJECT_SH) $*
|
|
||||||
|
|
||||||
pkg-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
|
|
||||||
$(PROJECTS_PY_BUILD) $@ $(TARGET_PROJECTS)
|
|
||||||
|
|
||||||
# --- generic cleanup targets
|
|
||||||
|
|
||||||
clean-dirs:
|
|
||||||
echo $(sort $(dir $(wildcard */*.done))) | xargs -r $(PROJECTS_PY_BUILD) clean
|
|
||||||
|
|
||||||
clean-all-dirs:
|
|
||||||
$(PROJECTS_PY_BUILD) clean $(PROJECTS)
|
|
||||||
make clean-dirs
|
|
||||||
|
|
||||||
purge: $(SSH_WRAPPER_SH)
|
|
||||||
ifneq ($(PURGE_SH),/bin/bash purge-not-found)
|
|
||||||
$(PURGE_SH)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(PROJECTS_TXT):
|
|
||||||
echo $(PROJECTS) | sed 's/ /\n/g; s%/%%g' > $@
|
|
||||||
|
|
||||||
done.clean:
|
|
||||||
rm -f *.done
|
|
||||||
|
|
||||||
# --- collab targets
|
|
||||||
|
|
||||||
list-maintainers: $(SSH_WRAPPER_SH)
|
|
||||||
$(GIT_SRV_ADMIN_SH) $@
|
|
||||||
|
|
||||||
update pull: purge cvs-update git-clone
|
|
||||||
touch pull.done
|
|
||||||
|
|
||||||
sync: pull push
|
|
||||||
|
|
||||||
sync-all: pull-all push-all
|
|
||||||
|
|
||||||
sync-%:
|
|
||||||
ssh $* make -C $(shell pwd) sync
|
|
||||||
|
|
||||||
pull-all: purge cvs-update git-clone git-pull-all
|
|
||||||
touch clone.done
|
|
||||||
touch pull.done
|
|
||||||
|
|
||||||
diff-all diff: $(SSH_WRAPPER_SH)
|
|
||||||
cvs diff -u; $(PGIT_SH) diff
|
|
||||||
|
|
||||||
cvs-diff: $(SSH_WRAPPER_SH)
|
|
||||||
cvs diff -u
|
|
||||||
|
|
||||||
cvs-update: $(SSH_WRAPPER_SH)
|
|
||||||
rm -f $@.done
|
|
||||||
make $@.done
|
|
||||||
|
|
||||||
git-push push: $(SSH_WRAPPER_SH)
|
|
||||||
$(PGIT_SH) push
|
|
||||||
|
|
||||||
git-push-all: $(SSH_WRAPPER_SH)
|
|
||||||
$(PGIT_SH) push --all --recurse-submodules=on-demand
|
|
||||||
|
|
||||||
git-diff: $(SSH_WRAPPER_SH)
|
|
||||||
$(PGIT_SH) diff
|
|
||||||
|
|
||||||
git-short-diff: $(SSH_WRAPPER_SH)
|
|
||||||
$(PGIT_SH) diff --shortstat
|
|
||||||
|
|
||||||
git-status:
|
|
||||||
$(PGIT_SH) status -uno
|
|
||||||
|
|
||||||
|
|
||||||
git-pull: $(SSH_WRAPPER_SH)
|
|
||||||
$(PGIT_SH) clone
|
|
||||||
|
|
||||||
git-pull-mini: $(SSH_WRAPPER_SH)
|
|
||||||
PGIT_CLONE_PROJECTS="$(patsubst %/.git,%,$(wildcard $(addsuffix /.git,$(shell make -s build-order))))" $(PGIT_SH) clone
|
|
||||||
|
|
||||||
git-pull-all: $(SSH_WRAPPER_SH)
|
|
||||||
$(PGIT_SH) pull --all
|
|
||||||
|
|
||||||
git-clone: $(SSH_WRAPPER_SH)
|
|
||||||
$(PGIT_SH) clone
|
|
||||||
touch clone.done
|
|
||||||
|
|
||||||
git-clone-%: $(SSH_WRAPPER_SH)
|
|
||||||
PGIT_CLONE_FROM_USER=$* $(PGIT_SH) clone
|
|
||||||
|
|
||||||
git-show-non-master-branches:
|
|
||||||
@$(PGIT_SH) branch 2>&1 | \
|
|
||||||
sed '/^#\|^*/!d; s/.*git -C //; s/ *branch *//; s/ *\* *//' | \
|
|
||||||
while read p; do \
|
|
||||||
read b ;\
|
|
||||||
if [ "$$b" != "master" ]; then \
|
|
||||||
echo " * $$p: $$b" ;\
|
|
||||||
fi ;\
|
|
||||||
done
|
|
||||||
|
|
||||||
# git-echo-link-<filename> returns a string functioning as hyperlink to
|
|
||||||
# matching files in git when embedded into a janware wiki or ticket.
|
|
||||||
git-echo-links-%: | $(TEXT_FILES_CACHE)
|
|
||||||
sed "/$*$$/!d; s%$(CWD)%%; s|^|\n \[\[jgit>/proj/$(JANWARE_USER)/|; s/$$/|$*\]\]\n/" $(TEXT_FILES_CACHE)
|
|
||||||
|
|
||||||
git-update-project-descriptions: $(SSH_WRAPPER_SH)
|
|
||||||
$(GIT_SRV_ADMIN_SH) -j update-descriptions all
|
|
||||||
|
|
||||||
git-pull-%: $(SSH_WRAPPER_SH) cvs-update.done
|
|
||||||
PGIT_CLONE_FROM_USER=$* $(PGIT_SH) clone
|
|
||||||
|
|
||||||
git-commit:
|
|
||||||
$(PGIT_SH) commit
|
|
||||||
|
|
||||||
git-conv-%: $(SSH_WRAPPER_SH)
|
|
||||||
[ -e $*/.git ] || { \
|
|
||||||
mv $* old/ ;\
|
|
||||||
if PROJECTS="$*" make clone; then \
|
|
||||||
sed -i "/^D\/$*\// d" CVS/Entries ;\
|
|
||||||
else \
|
|
||||||
mv old/$* . ;\
|
|
||||||
fi \
|
|
||||||
}
|
|
||||||
|
|
||||||
git-check-conv: $(SSH_WRAPPER_SH)
|
|
||||||
for p in `$(GIT_SRV_ADMIN_SH) -u jan -j list-personal-projects`; do \
|
|
||||||
make git-conv-$$p ;\
|
|
||||||
done
|
|
||||||
|
|
||||||
# --- rules
|
|
||||||
|
|
||||||
$(SSH_WRAPPER_SH): $(PROJECTS_MAKEFILE_NAME)
|
|
||||||
/bin/echo -e '#!/bin/bash $(SSH_WRAPPER_TRACE)\n\nexec /usr/bin/ssh $$JW_BUILD_SSH_EXTRA_OPTS "$$@"' > $@.tmp
|
|
||||||
chmod 700 $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
ssh-wrapper: $(SSH_WRAPPER_SH)
|
|
||||||
clean.ssh-wrapper:
|
|
||||||
rm -f $(SSH_WRAPPER_SH)
|
|
||||||
distclean: clean.ssh-wrapper
|
|
||||||
|
|
||||||
define check_cvs_user
|
|
||||||
@if ! grep -q ":ext:$(JANWARE_USER)@" CVS/Root; then \
|
|
||||||
echo "Wrong username in CVS/Root, change that to: $(CVSROOT)" ;\
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
cvsdir.done: $(SSH_WRAPPER_SH)
|
|
||||||
if [ ! -d CVS ]; then \
|
|
||||||
mkdir CVS && \
|
|
||||||
echo $(CVSROOT) > CVS/Root && \
|
|
||||||
echo proj > CVS/Repository && \
|
|
||||||
touch CVS/Entries ;\
|
|
||||||
fi
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
cvs-update.done: cvsdir.done $(SSH_WRAPPER_SH)
|
|
||||||
$(check_cvs_user)
|
|
||||||
cvs update -dP Makefile $(shell $(CVS_ADMIN_SH) list-projects)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
update.done: purge
|
|
||||||
|
|
||||||
pull.done: $(filter-out $(UNAVAILABLE_TARGETS),cvs-update.done clone.done)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
clone.done: $(filter-out $(UNAVAILABLE_TARGETS),$(SSH_WRAPPER_SH))
|
|
||||||
$(PGIT_SH) clone
|
|
||||||
touch $@
|
|
||||||
119
make/py-defs.mk
119
make/py-defs.mk
|
|
@ -1,119 +0,0 @@
|
||||||
ENV_PYTHONPATH := $(PYTHONPATH)
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/py-version.mk
|
|
||||||
|
|
||||||
ifeq ($(DEVELOPMENT),true)
|
|
||||||
PY_SITE_PACKAGES_PATH := $(PREFIX)/python$(PYTHON_VERSION)/site-packages
|
|
||||||
else
|
|
||||||
PY_SITE_PACKAGES_PATH := $(shell $(PYTHON) -c "import site; print([d for d in site.getsitepackages() if d.find('/local/') == -1][0])")
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef PY_PREREQ_BUILD
|
|
||||||
PY_PREREQ_BUILD := $(shell $(proj_query_cmd) pkg-requires --subsections jw -d ' ' -p --no-version build $(PROJECT))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef PY_PREREQ_BUILD_DIRS
|
|
||||||
PY_PREREQ_BUILD_DIRS := $(shell $(proj_query_cmd) proj-dir $(PY_PREREQ_BUILD))
|
|
||||||
endif
|
|
||||||
|
|
||||||
PY_MYPY ?= mypy --ignore-missing-imports --no-namespace-packages
|
|
||||||
|
|
||||||
PY_SRC_PY ?= $(wildcard *.py)
|
|
||||||
PY_ALL_PY = $(PY_SRC_PY)
|
|
||||||
|
|
||||||
ifneq ($(PYTHON_MAJOR),3)
|
|
||||||
PY_PYC = $(patsubst %.py,%.pyc,$(PY_ALL_PY))
|
|
||||||
else
|
|
||||||
PY_CPYTHON_PREFIX := $(shell $(PYTHON) -c "import sys; print('cpython-{}{}'.format(sys.version_info[0],sys.version_info[1]))")
|
|
||||||
PY_PYC = $(patsubst %.py,__pycache__/%.$(PY_CPYTHON_PREFIX).pyc,$(PY_ALL_PY))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(PY_INSTALL_DIR),)
|
|
||||||
PY_INSTALL_DIR_PY ?= $(PY_INSTALL_DIR)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# deduce PY_INSTALL_DIR_PY from working directory below .. python/
|
|
||||||
ifeq ($(PY_INSTALL_DIR_PY),)
|
|
||||||
PY_INSTALL_PKG_MOD ?= $(shell $(ECHO) $(CWD) | $(SED) 's%.*/python/%%; s%/.*%%')
|
|
||||||
PY_INSTALL_SUB_MOD ?= $(shell $(ECHO) $(CWD) | $(SED) "s%.*/$(PY_INSTALL_PKG_MOD)\(/\|$$\)%%")
|
|
||||||
ifneq ($(PY_INSTALL_SUB_MOD),)
|
|
||||||
PY_INSTALL_MOD ?= $(PY_INSTALL_PKG_MOD)/$(PY_INSTALL_SUB_MOD)
|
|
||||||
else
|
|
||||||
PY_INSTALL_MOD ?= $(PY_INSTALL_PKG_MOD)
|
|
||||||
endif
|
|
||||||
PY_MOD ?= $(subst /,.,$(PY_INSTALL_MOD))
|
|
||||||
PY_ALL_PY += __init__.py
|
|
||||||
PY_INSTALL_DIR_PY ?= $(ENV_PREFIX)$(PY_SITE_PACKAGES_PATH)/$(patsubst .,/,$(PY_INSTALL_MOD))
|
|
||||||
else
|
|
||||||
ifeq ($(PY_INSTALL_DIR_PY),)
|
|
||||||
$(error PY_INSTALL_DIR_PY is undefined)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(PYTHON_MAJOR),3)
|
|
||||||
PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY)/__pycache__
|
|
||||||
else
|
|
||||||
PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY)
|
|
||||||
endif
|
|
||||||
|
|
||||||
PY_INSTALL ?= true
|
|
||||||
PY_INSTALL_REG ?= true
|
|
||||||
ifneq ($(PY_INSTALL),true)
|
|
||||||
PY_INSTALL_REG = false
|
|
||||||
endif
|
|
||||||
PY_INSTALL_PYC ?= true
|
|
||||||
ifneq ($(PY_INSTALL_REG),true)
|
|
||||||
PY_INSTALL_PYC = false
|
|
||||||
endif
|
|
||||||
|
|
||||||
PY_INSTALL_DIRS ?= $(sort $(PY_INSTALL_DIR_PY) $(PY_INSTALL_DIR_PYC))
|
|
||||||
PY_INSTALLED_PY = $(addprefix $(PY_INSTALL_DIR_PY)/,$(sort $(PY_ALL_PY)))
|
|
||||||
ifeq ($(PY_INSTALL_PYC),true)
|
|
||||||
PY_INSTALLED_PYC = $(addprefix $(PY_INSTALL_DIR_PY)/,$(PY_PYC))
|
|
||||||
endif
|
|
||||||
ifeq ($(PY_INSTALL_REG),true)
|
|
||||||
PY_INSTALLED_REG = $(PY_INSTALLED_PY) $(PY_INSTALLED_PYC)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(origin PYTHONPATH),undefined)
|
|
||||||
PYTHONPATH := $(call proj_query, pythonpath $(PROJECT) $(PY_PREREQ_RUN))
|
|
||||||
endif
|
|
||||||
#PYTHONPATH = $(subst $(space),,$(ENV_PYTHONPATH)$(foreach d,$(PY_MODULE_DIRS),:$(d)))
|
|
||||||
MYPYPATH = $(PYTHONPATH)
|
|
||||||
export PYTHONPATH MYPYPATH
|
|
||||||
|
|
||||||
# not used anywhere
|
|
||||||
#PY_PROJ_MODULE_DIRS ?= $(wildcard $(foreach subdir,/tools/python /src/python,$(addsuffix $(subdir),$(TOPDIR) $(PY_PREREQ_BUILD_DIRS))))
|
|
||||||
#PY_MODULE_DIRS ?= $(PY_PROJ_MODULE_DIRS)
|
|
||||||
#PY_MODULES ?= $(PY_PROJ_MODULES)
|
|
||||||
#PY_PROJ_MODULES += $(dir $(wildcard $(PY_MODULE_DIRS)/*/__init__.py))
|
|
||||||
|
|
||||||
ifneq ($(PY_DEFS_MK_INCLUDED),true)
|
|
||||||
all:
|
|
||||||
clean: pyc.clean
|
|
||||||
|
|
||||||
echo-py:
|
|
||||||
@echo "PYTHON = $(PYTHON)"
|
|
||||||
@echo "PY_INSTALL_DIR_PY = $(PY_INSTALL_DIR_PY)"
|
|
||||||
@echo "PROJECT = $(PROJECT)"
|
|
||||||
@echo "PY_SITE_PACKAGES_PATH = $(PY_SITE_PACKAGES_PATH)"
|
|
||||||
@echo "PY_MODULES = $(PY_MODULES)"
|
|
||||||
@echo "PYTHONPATH = $(PYTHONPATH)"
|
|
||||||
@echo "MYPYPATH = $(MYPYPATH)"
|
|
||||||
@echo "PY_INSTALL_MOD = $(PY_INSTALL_MOD)"
|
|
||||||
@echo "PY_INSTALL_SUB_MOD = $(PY_INSTALL_SUB_MOD)"
|
|
||||||
# not used anywhere"
|
|
||||||
#@echo "PY_PROJ_MODULE_DIRS = $(PY_PROJ_MODULE_DIRS)"
|
|
||||||
#@echo "PY_MODULE_DIRS = $(PY_MODULE_DIRS)"
|
|
||||||
|
|
||||||
pyc.clean:
|
|
||||||
$(RM) -rf $(wildcard *.pyc) __pycache__
|
|
||||||
libpath: py-libpath
|
|
||||||
py-libpath:
|
|
||||||
@echo export PYTHONPATH=$(PYTHONPATH)
|
|
||||||
@echo export MYPYPATH=$(MYPYPATH)
|
|
||||||
endif
|
|
||||||
|
|
||||||
PY_DEFS_MK_INCLUDED := true
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/ldlibpath.mk
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/py-defs.mk
|
|
||||||
include $(JWBDIR)/make/dirs.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
|
|
||||||
PY_INIT_TMPL = $(wildcard __init__.py.tmpl)
|
|
||||||
PY_SED_EXTRACT_EXPORT ?= /\(\(class\|def\)\s\+[a-zA-Z_].*\|^ *\S\+\s*=.*\)\# *export/ !d; /^\s*\#/ d; s/\(async\)* *\(class\|def\) *//; s/[(:=].*//
|
|
||||||
PY_INIT_FILTER ?= cat
|
|
||||||
|
|
||||||
#leftparen := (
|
|
||||||
#PY_EXPORT ?= $(shell sed '/\(class\|def\) ..*\# *export/ !d; s/\(class\|def\) *//; s/[$(leftparen):].*//' $(PY_SRC_PY))
|
|
||||||
|
|
||||||
all: $(PY_PYC)
|
|
||||||
install: install-dirs.done install-reg.done
|
|
||||||
clean: py.clean
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/py-rules.mk
|
|
||||||
|
|
||||||
__init__.py: $(PY_INIT_TMPL) $(filter-out __init__.py,$(PY_SRC_PY))
|
|
||||||
if [ "$(PY_INIT_TMPL)" ]; then cat "$(PY_INIT_TMPL)" > $@.tmp; else > $@.tmp; fi
|
|
||||||
/bin/bash +H $(JWB_SCRIPT_DIR)/python-tools.sh create-init -m $(PY_MOD) -e "$(PY_SED_EXTRACT_EXPORT)" \
|
|
||||||
$(filter-out __init__.py,$(PY_ALL_PY)) $(SUBDIRS_TO_ITERATE) | $(PY_INIT_FILTER) | tee -a $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/py-defs.mk
|
|
||||||
include $(JWBDIR)/make/dirs.mk
|
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
|
||||||
include $(JWBDIR)/make/py-rules.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
install:
|
|
||||||
clean: py.clean
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
ifeq ($(PY_RUN_CHECK_AFTER_BUILD),true)
|
|
||||||
all: check
|
|
||||||
endif
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
all:
|
|
||||||
|
|
||||||
py.clean:
|
|
||||||
$(RM) -f *.done *.pyc *.rep
|
|
||||||
/bin/bash $(JWB_SCRIPT_DIR)/scm.sh clean -f __init__.py
|
|
||||||
$(RM) -rf __pycache__ .mypy_cache
|
|
||||||
|
|
||||||
install-dirs.done:
|
|
||||||
$(INSTALL) -d -m $(PYJWBDIRMODE) -o $(PYJWBDIROWNER) -g $(PYJWBDIRGROUP) $(PY_INSTALL_DIRS)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
install-reg.done: install-dirs.done $(PY_INSTALLED_REG)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(PY_INSTALL_DIR_PY)/%.py: %.py
|
|
||||||
$(INSTALL) -p -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
|
|
||||||
|
|
||||||
ifneq ($(PYTHON_MAJOR),3)
|
|
||||||
%.pyc: %.py
|
|
||||||
else
|
|
||||||
__pycache__/%.$(PY_CPYTHON_PREFIX).pyc: %.py
|
|
||||||
endif
|
|
||||||
$(PYTHON) -c "import py_compile; py_compile.compile(\"$<\", doraise=True)"
|
|
||||||
|
|
||||||
ifeq ($(PYTHON_MAJOR),3)
|
|
||||||
$(PY_INSTALL_DIR_PY)/__pycache__/%.$(PY_CPYTHON_PREFIX).pyc: __pycache__/%.$(PY_CPYTHON_PREFIX).pyc
|
|
||||||
else
|
|
||||||
$(PY_INSTALL_DIR_PY)/%.pyc: %.pyc
|
|
||||||
endif
|
|
||||||
$(INSTALL) -p -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
|
|
||||||
|
|
||||||
check:
|
|
||||||
$(PY_MYPY) $(shell /bin/bash $(JWB_SCRIPT_DIR)/scm.sh ls-files | grep '\.py$$')
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/py-defs.mk
|
|
||||||
#include $(JWBDIR)/make/scripts-targets.mk
|
|
||||||
#include $(JWBDIR)/make/rules.mk
|
|
||||||
|
|
||||||
EXE ?= $(firstword $(wildcard main.py runme.py test.py *.py))
|
|
||||||
EXE_ARGS ?=
|
|
||||||
|
|
||||||
all:
|
|
||||||
install:
|
|
||||||
clean:
|
|
||||||
distclean:
|
|
||||||
test:
|
|
||||||
|
|
||||||
run:
|
|
||||||
$(PYTHON) $(EXE) $(EXE_ARGS)
|
|
||||||
|
|
||||||
run.sh:
|
|
||||||
echo -e "#!/bin/bash\n\nexport PYTHONPATH=$(PYTHONPATH)\nset -x\nexec $(PYTHON) $(EXE)" '"$$@"' > $@.tmp
|
|
||||||
chmod 755 $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
clean-run-sh:
|
|
||||||
rm -f run.sh
|
|
||||||
clean: clean-run-sh
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
EXE ?= $(shell $(PWD)).py
|
|
||||||
EXE_PATH ?= ./$(EXE)
|
|
||||||
|
|
||||||
all:
|
|
||||||
install:
|
|
||||||
clean:
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
run:
|
|
||||||
$(PYTHON) -m $(shell echo $(patsubst %.py,%,$(EXE)) | sed 's%^\./%%; s%/%.%g') $(EXE_ARGS)
|
|
||||||
|
|
||||||
pyc.clean:
|
|
||||||
find . -name '*.pyc' -print0 | xargs -r -0 $(RM) -f
|
|
||||||
157
make/qt-defs.mk
157
make/qt-defs.mk
|
|
@ -1,157 +0,0 @@
|
||||||
ifeq ($(USE_QT),true)
|
|
||||||
|
|
||||||
USE_X = true
|
|
||||||
FINAL_CPPFLAGS += -DQT_THREAD_SUPPORT
|
|
||||||
|
|
||||||
#ifeq ($(PKG_FORMAT),rpm)
|
|
||||||
#QT_VERSION ?= $(shell rpm -q --queryformat='%{VERSION}' --whatprovides qt)
|
|
||||||
#else
|
|
||||||
#QT_VERSION = $(shell dpkg -s libqtcore4 | sed '^CVersion:/ !d; s/Version: *//')
|
|
||||||
#endif
|
|
||||||
#QT_MAJOR_VERSION ?= $(shell echo $(QT_VERSION) | cut -d\. -f1)
|
|
||||||
#
|
|
||||||
#ifeq ($(QT_MAJOR_VERSION),2)
|
|
||||||
# QT_PREFIX ?= $(SYSTEM_LIBDIR)/qt2
|
|
||||||
# INCLUDE += -I$(QT_PREFIX)/include
|
|
||||||
#else
|
|
||||||
# ifeq ($(QT_MAJOR_VERSION),3)
|
|
||||||
# QT_PREFIX ?= $(SYSTEM_LIBDIR)/qt3
|
|
||||||
# INCLUDE += -I$(QT_PREFIX)/include
|
|
||||||
# else
|
|
||||||
# ifeq ($(QT_MAJOR_VERSION),4)
|
|
||||||
# #QT_PREFIX ?= $(HOME)/opt/qt4
|
|
||||||
# QT_PREFIX ?= /usr
|
|
||||||
# INCLUDE += -I$(QT_PREFIX)/include \
|
|
||||||
# $(addprefix -I$(QT_PREFIX)/include/, \
|
|
||||||
# Qt Qt3Support QtAssistant QtCore QtDesigner \
|
|
||||||
# QtGui QtNetwork QtOpenGL QtScript)
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#
|
|
||||||
#ifeq ($(ARCH),x86)
|
|
||||||
# LD_LIB_PATH += $(QT_PREFIX)/lib
|
|
||||||
# QT_LDFLAGS += -L$(QT_PREFIX)/lib
|
|
||||||
#else
|
|
||||||
# ifeq ($(QT_MAJOR_VERSION),4)
|
|
||||||
# LD_LIB_PATH += $(QT_PREFIX)/lib
|
|
||||||
# QT_LDFLAGS += -L$(QT_PREFIX)/lib
|
|
||||||
# else
|
|
||||||
# LD_LIB_PATH += $(QT_PREFIX)/$(SYSTEM_LIBDIR_NAME)
|
|
||||||
# QT_LDFLAGS += -L$(QT_PREFIX)/$(SYSTEM_LIBDIR_NAME)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#
|
|
||||||
#MOC ?= $(QT_PREFIX)/bin/moc
|
|
||||||
#UIC ?= $(QT_PREFIX)/bin/uic
|
|
||||||
#RCC ?= $(QT_PREFIX)/bin/rcc
|
|
||||||
#
|
|
||||||
#ifdef REENTRANT
|
|
||||||
# ifneq ($(QT_MAJOR_VERSION),4)
|
|
||||||
# FINAL_LPPFLAGS += $(QT_LDFLAGS) -lqt-mt
|
|
||||||
# else
|
|
||||||
# # FINAL_LPPFLAGS += $(QT_LDFLAGS) -lQtSql -lQtNetwork -lQtOpenGL -lQtDesigner_debug -lQtGui_debug -lQtCore_debug
|
|
||||||
# FINAL_LPPFLAGS += $(QT_LDFLAGS) -lQtWebKit -lQt3Support -lQtSql -lQtNetwork -lQtOpenGL -lQtDesigner -lQtGui -lQtCore
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# ifneq ($(QT_MAJOR_VERSION),4)
|
|
||||||
# FINAL_LPPFLAGS += $(QT_LDFLAGS) -lqt
|
|
||||||
# else
|
|
||||||
# # FINAL_LPPFLAGS += $(QT_LDFLAGS) -lQtSql -lQtNetwork -lQtOpenGL -lQtDesigner_debug -lQtGui_debug -lQtCore_debug
|
|
||||||
# FINAL_LPPFLAGS += $(QT_LDFLAGS) -lQtWebKit -lQt3Support -lQtSql -lQtNetwork -lQtOpenGL -lQtDesigner -lQtGui -lQtCore
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# ------------------------------- Qt defs
|
|
||||||
|
|
||||||
#Qt5Designer \
|
|
||||||
|
|
||||||
ifeq ($(QT_MAJOR_VERSION),5)
|
|
||||||
QT_MODULES ?= \
|
|
||||||
Qt5Concurrent \
|
|
||||||
Qt5Core \
|
|
||||||
Qt5DBus \
|
|
||||||
Qt5Gui \
|
|
||||||
Qt5Help \
|
|
||||||
Qt5Network \
|
|
||||||
Qt5OpenGLExtensions \
|
|
||||||
Qt5OpenGL \
|
|
||||||
Qt5PrintSupport \
|
|
||||||
Qt5Qml \
|
|
||||||
Qt5Quick \
|
|
||||||
Qt5QuickTest \
|
|
||||||
Qt5QuickWidgets \
|
|
||||||
Qt5Sensors \
|
|
||||||
Qt5Sql \
|
|
||||||
Qt5Svg \
|
|
||||||
Qt5Test \
|
|
||||||
Qt5UiTools \
|
|
||||||
Qt5WebEngine \
|
|
||||||
Qt5WebEngineWidgets \
|
|
||||||
Qt5WebKit \
|
|
||||||
Qt5WebKitWidgets \
|
|
||||||
Qt5Widgets \
|
|
||||||
Qt5X11Extras \
|
|
||||||
Qt5XmlPatterns \
|
|
||||||
Qt5Xml
|
|
||||||
else
|
|
||||||
QT_MODULES ?= \
|
|
||||||
Qt3Support \
|
|
||||||
QtCLucene \
|
|
||||||
QtCore \
|
|
||||||
QtDBus \
|
|
||||||
QtDeclarative \
|
|
||||||
QtDesignerComponents \
|
|
||||||
QtDesigner \
|
|
||||||
QtGui \
|
|
||||||
QtHelp \
|
|
||||||
QtMultimedia \
|
|
||||||
QtNetwork \
|
|
||||||
QtOpenGL \
|
|
||||||
QtScript \
|
|
||||||
QtScriptTools \
|
|
||||||
QtSql \
|
|
||||||
QtSvg \
|
|
||||||
QtTest \
|
|
||||||
QtUiTools \
|
|
||||||
QtWebKit \
|
|
||||||
QtXmlPatterns \
|
|
||||||
QtXml
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
QT_BIN_PREFIX ?= $(strip $(shell pkg-config --variable=host_bins $(QT_MODULES)))
|
|
||||||
MOC ?= $(QT_BIN_PREFIX)/moc
|
|
||||||
UIC ?= $(QT_BIN_PREFIX)/uic
|
|
||||||
RCC ?= $(QT_BIN_PREFIX)/rcc
|
|
||||||
FINAL_LPPFLAGS += $(QT_LDFLAGS) $(shell pkg-config --libs $(QT_MODULES))
|
|
||||||
FINAL_INCLUDE += $(QT_LDFLAGS) $(shell pkg-config --cflags $(QT_MODULES))
|
|
||||||
CXXFLAGS += -D_QT_MAJOR_=$(QT_MAJOR_VERSION)
|
|
||||||
|
|
||||||
# ------------------------------- jw-build defs
|
|
||||||
|
|
||||||
UIFILES += $(wildcard *.ui)
|
|
||||||
RCCFILES += $(wildcard *.qrc)
|
|
||||||
|
|
||||||
ifneq ($(wildcard *.h),)
|
|
||||||
MOC_H_HC += $(shell grep -l Q_OBJECT $(wildcard *.h))
|
|
||||||
endif
|
|
||||||
MOC_H_UI += $(patsubst %.ui,ui_%.h,$(UIFILES))
|
|
||||||
MOC_H += $(sort $(MOC_H_HC) $(MOC_H_UI))
|
|
||||||
MOC_CPP += $(patsubst %.h,moc_%.cpp,$(notdir $(MOC_H_HC)))
|
|
||||||
# $(patsubst %.ui,moc_%.cpp,$(UIFILES)) \
|
|
||||||
RCC_CPP += $(patsubst %.qrc,rcc_%.cpp, $(RCCFILES))
|
|
||||||
ifeq ($(QT_MAJOR_VERSION),4)
|
|
||||||
UIC_H += $(patsubst %.ui,ui_%.h, $(UIFILES))
|
|
||||||
else
|
|
||||||
UIC_H += $(patsubst %.ui,%.h, $(UIFILES))
|
|
||||||
FINAL_CFLAGS += -fPIC
|
|
||||||
FINAL_CXXFLAGS += -fPIC
|
|
||||||
endif
|
|
||||||
UIC_CPP += $(patsubst %.ui,uic_%.cpp, $(UIFILES))
|
|
||||||
|
|
||||||
BUILD_OBJ += $(patsubst %.cpp,%.o,$(MOC_CPP))
|
|
||||||
BUILD_OBJ += $(patsubst %.cpp,%.o,$(UIC_CPP))
|
|
||||||
BUILD_OBJ += $(patsubst %.cpp,%.o,$(RCC_CPP))
|
|
||||||
|
|
||||||
endif # USE_QT
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
QMAKE_MAKEFILE = Makefile.qt
|
|
||||||
EXE ?= $(notdir $(shell $(PWD)))
|
|
||||||
QMAKE = qmake-qt5
|
|
||||||
|
|
||||||
all:
|
|
||||||
install:
|
|
||||||
clean: qmake.clean
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
$(QMAKE_MAKEFILE):
|
|
||||||
$(QMAKE) -o $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
all: $(QMAKE_MAKEFILE)
|
|
||||||
make -f $< $@
|
|
||||||
|
|
||||||
qmake.clean:
|
|
||||||
if [ -f $(QMAKE_MAKEFILE) ]; then make -f $(QMAKE_MAKEFILE) clean; fi
|
|
||||||
$(RM) -f $(QMAKE_MAKEFILE) *.tmp $(EXE) .qmake.stash
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
ifeq ($(QT_MAJOR_VERSION),3)
|
|
||||||
moc_%.cpp: %.h
|
|
||||||
$(MOC) -o $@ $<
|
|
||||||
else
|
|
||||||
moc_%.cpp: %.h
|
|
||||||
$(MOC) $(filter -D% -I%,$(strip $(FINAL_CXXFLAGS) $(FINAL_CPPFLAGS))) -o $@ $<
|
|
||||||
moc_%.cpp: include/%.h
|
|
||||||
$(MOC) $(filter -D% -I%,$(strip $(FINAL_CXXFLAGS) $(FINAL_CPPFLAGS))) -o $@ $<
|
|
||||||
endif
|
|
||||||
|
|
||||||
rcc_%.cpp: %.qrc
|
|
||||||
$(RCC) -o $@ $<
|
|
||||||
|
|
||||||
ifeq ($(QT_MAJOR_VERSION),4)
|
|
||||||
ui_%.h: %.ui
|
|
||||||
else
|
|
||||||
%.h: %.ui
|
|
||||||
endif
|
|
||||||
$(UIC) $< -o $@
|
|
||||||
|
|
||||||
ifeq ($(QT_MAJOR_VERSION),4)
|
|
||||||
uic_%.cpp: ui_%.h
|
|
||||||
echo -e "#include \"$<\"\n" > $@
|
|
||||||
else
|
|
||||||
uic_%.cpp: %.h %.ui
|
|
||||||
$(UIC) $*.ui -i $< -o $@
|
|
||||||
endif
|
|
||||||
20
make/qt.mk
20
make/qt.mk
|
|
@ -1,20 +0,0 @@
|
||||||
all:
|
|
||||||
clean: mocclean uicclean rccclean
|
|
||||||
|
|
||||||
run-qt-%:
|
|
||||||
$(QT_PREFIX)/bin/$*
|
|
||||||
design:
|
|
||||||
$(QT_PREFIX)/bin/designer $(UIFILES)
|
|
||||||
|
|
||||||
assist: run-qt-assistant
|
|
||||||
#design: run-qt-designer
|
|
||||||
translation: run-qt-linguist
|
|
||||||
release: run-qt-lrelease
|
|
||||||
update: run-qt-lupdate
|
|
||||||
qm2ts: run-qt-qm2ts
|
|
||||||
qumake: run-qt-qmake
|
|
||||||
qt3to4: run-qt-qt3to4
|
|
||||||
qtconfig:run-qt-qtconfig
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/qtversion.mk
|
|
||||||
include $(JWBDIR)/make/qt-rules.mk
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2005 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
USE_QT = true
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
include $(JWBDIR)/make/qt-defs.mk
|
|
||||||
include $(JWBDIR)/make/exe.mk
|
|
||||||
include $(JWBDIR)/make/qt.mk
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2005 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
USE_QT = true
|
|
||||||
QT_MAJOR_VERSION ?= 4
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/plugin.mk
|
|
||||||
include $(JWBDIR)/make/qt.mk
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2005 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/qtversion.mk
|
|
||||||
include $(JWBDIR)/make/so.mk
|
|
||||||
include $(JWBDIR)/make/qt.mk
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/qtversion.mk
|
|
||||||
include $(JWBDIR)/make/tools.mk
|
|
||||||
#include $(JWBDIR)/make/defs.mk
|
|
||||||
#include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
#ALL += $(BUILD_LIBDIR) $(PREREQ_DONE) $(BUILD_HDR) $(LOCAL_EXE_SH) $(MEMBERS)
|
|
||||||
#include $(JWBDIR)/make/rules.mk
|
|
||||||
#clean: objclean textclean localclean
|
|
||||||
#install: $(ALL)
|
|
||||||
include $(JWBDIR)/make/qt.mk
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
USE_QT ?= true
|
|
||||||
QT_MAJOR_VERSION ?= 5
|
|
||||||
166
make/run.mk
166
make/run.mk
|
|
@ -1,166 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
|
|
||||||
DIR_BASENAME = $(notdir $(CWD))
|
|
||||||
|
|
||||||
ifneq ($(TARGET_PRODUCT),)
|
|
||||||
EXE_BASENAME_PREFIX ?= $(TARGET_PRODUCT)-
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(EXE_BASENAME),)
|
|
||||||
ifneq ($(DIR_BASENAME),test)
|
|
||||||
EXE_BASENAME = $(EXE_BASENAME_PREFIX)$(DIR_BASENAME)
|
|
||||||
else
|
|
||||||
EXE_BASENAME = $(EXE_BASENAME_PREFIX)test-$(notdir $(shell cd ..; $(PWD)))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(EXE_BASENAME),)
|
|
||||||
ifneq ($(TARGET),mingw)
|
|
||||||
EXE ?= $(EXE_BASENAME)
|
|
||||||
SHORTCUT_SCRIPT ?= ./run.sh
|
|
||||||
else
|
|
||||||
EXE ?= $(EXE_BASENAME).exe
|
|
||||||
SHORTCUT_SCRIPT ?= run.bat
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXE_PATH ?= ./$(EXE)
|
|
||||||
CHECK_CONF_EXE ?= $(firstword $(wildcard $(PROJECTS_DIR)/valdi/bin/checkconf) checkconf)
|
|
||||||
|
|
||||||
FINAL_CFLAGS += -DEXE_NAME=\"$(EXE)\"
|
|
||||||
FINAL_CXXFLAGS += -DEXE_NAME=\"$(EXE)\"
|
|
||||||
|
|
||||||
# ----- linker scripts from tagged templates
|
|
||||||
#BUILD_LD_DIR = $(wildcard $(firstword $(call $(TAGGED_TMPL_DIRS),ld)))
|
|
||||||
#BUILD_LD_DIR = $(firstword $(foreach tag,$(TAGGED_TMPL_TAGS),$(foreach repo,$(TOPDIR)/tmpl/tagged $(JWBDIR)/tmpl/tagged,$(wildcard $(repo)/$(tag)/ld))))
|
|
||||||
#BUILD_LD_DIR = $(firstword $(wildcard $(foreach tag,$(TAGGED_TMPL_TAGS),$(foreach repo,$(TOPDIR)/tmpl/tagged $(JWBDIR)/tmpl/tagged,$(repo)/$(tag)/ld))))
|
|
||||||
|
|
||||||
#BUILD_LD_TMPL_DIRS ?= $(foreach tag,$(TAGGED_TMPL_TAGS),$(foreach repo,$(TOPDIR)/tmpl/tagged $(JWBDIR)/tmpl/tagged,$(repo)/$(tag)/ld))
|
|
||||||
#BUILD_LD_DIRS += $(wildcard $(BUILD_LD_TMPL_DIRS))
|
|
||||||
#FINAL_LDFLAGS += $(foreach d,$(BUILD_LD_DIRS),-L$(d) $(addprefix -T ,$(sort $(notdir $(wildcard $(d)/*.ld)))))
|
|
||||||
|
|
||||||
BUILD_LD_DIRS = $(call uniq,$(dir $(foreach d,$(BUILD_LD_CHECK_DIRS),$(wildcard $(d)/*.ld))))
|
|
||||||
LD_SCRIPTS = $(foreach d,$(BUILD_LD_DIRS),$(wildcard $(d)/*.ld))
|
|
||||||
FINAL_LDFLAGS += $(foreach d,$(BUILD_LD_DIRS),-L$(d) $(addprefix -T ,$(sort $(notdir $(wildcard $(d)/*.ld)))))
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/profiler.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
include $(JWBDIR)/make/ldlibpath.mk
|
|
||||||
include $(JWBDIR)/make/path-rules.mk
|
|
||||||
include $(JWBDIR)/make/debugger.mk
|
|
||||||
|
|
||||||
EXE_ARGS += $(LOCAL_EXE_ARGS)
|
|
||||||
EXE_CMD ?= $(EXE_PATH) $(EXE_ARGS)
|
|
||||||
|
|
||||||
ifneq ($(wildcard local.supp),)
|
|
||||||
VALGRIND_OPTS += --suppressions=local.supp
|
|
||||||
endif
|
|
||||||
|
|
||||||
all:
|
|
||||||
install:
|
|
||||||
clean: runclean localclean
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
run-deps: all
|
|
||||||
$(RM) -f core core.* vgcore vgcore.*
|
|
||||||
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
run test: run-deps
|
|
||||||
@echo "wine $(EXE_CMD)"
|
|
||||||
@echo -e "set PATH=%PATH;$(DLL_PATH)\n" \
|
|
||||||
"$(EXE_CMD)" | wine cmd
|
|
||||||
|
|
||||||
start: run-deps
|
|
||||||
@echo "wine $(EXE_CMD)"
|
|
||||||
@echo -e "set PATH=%PATH;$(DLL_PATH)\n" \
|
|
||||||
"$(EXE_CMD)" | wine cmd &
|
|
||||||
|
|
||||||
else
|
|
||||||
run test: run-deps
|
|
||||||
$(EXE_CMD)
|
|
||||||
start: run-deps
|
|
||||||
$(EXE_CMD) &
|
|
||||||
|
|
||||||
which:
|
|
||||||
$(WHICH) $(EXE_PATH)
|
|
||||||
|
|
||||||
$(SHORTCUT_SCRIPT):
|
|
||||||
ifeq ($(TARGET),mingw)
|
|
||||||
echo "set PATH=%PATH;$(DLL_PATH)" > $@.tmp
|
|
||||||
echo "$(EXE_CMD)" >> $@.tmp
|
|
||||||
else
|
|
||||||
echo -e "#!/bin/bash\n\n$(RM) -f core.*\nexport LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)\nexport PATH=$(PATH)\n$(EXE_CMD)" > $@.tmp
|
|
||||||
chmod 755 $@.tmp
|
|
||||||
endif
|
|
||||||
mv $@.tmp $@
|
|
||||||
shortcut: $(SHORTCUT_SCRIPT)
|
|
||||||
distclean.shortcut:
|
|
||||||
$(RM) -f $(SHORTCUT_SCRIPT)
|
|
||||||
distclean: distclean.shortcut
|
|
||||||
|
|
||||||
# unfortunately iwatch supports only one directory :-(
|
|
||||||
autorun:
|
|
||||||
make run &
|
|
||||||
iwatch -e close_write -c "$(HOME)/bin/run-once.sh make restart" \
|
|
||||||
$(BUILD_LIBDIR)
|
|
||||||
|
|
||||||
wait-stop:
|
|
||||||
while /sbin/checkproc $(notdir $(EXE_PATH)); do sleep 1; done
|
|
||||||
|
|
||||||
restart: stop wait-stop all start
|
|
||||||
|
|
||||||
valgrind: run-deps
|
|
||||||
valgrind $(VALGRIND_OPTS) $(EXE_CMD)
|
|
||||||
|
|
||||||
valkyrie: run-deps
|
|
||||||
valkyrie $(VALGRIND_OPTS) $(EXE_CMD)
|
|
||||||
|
|
||||||
efence: run-deps
|
|
||||||
ef $(EXE_CMD)
|
|
||||||
|
|
||||||
supp.tmp:
|
|
||||||
valgrind --gen-suppressions=all $(EXE_CMD) 2>$@.tmp; mv $@.tmp $@ || exit 0
|
|
||||||
|
|
||||||
vg-create-supp: supp.tmp
|
|
||||||
$(CAT) $< | $(JWB_SCRIPT_DIR)/parse-valgrind-suppressions.sh > local.supp
|
|
||||||
$(RM) -f supp.tmp
|
|
||||||
vg-add-supp:
|
|
||||||
$(CAT) | $(JWB_SCRIPT_DIR)/parse-valgrind-suppressions.sh >> local.supp
|
|
||||||
clean: vg-clean-supp
|
|
||||||
vg-clean-supp:
|
|
||||||
$(RM) -f local.supp
|
|
||||||
|
|
||||||
clean: clean.out
|
|
||||||
clean.out:
|
|
||||||
$(RM) -f run.out
|
|
||||||
|
|
||||||
snap:
|
|
||||||
killall -SIGUSR1 $(notdir $(EXE_PATH))
|
|
||||||
|
|
||||||
check-conf:
|
|
||||||
$(CHECK_CONF_EXE) -p --log-flags console \
|
|
||||||
$(shell echo $(EXE_ARGS) | sed 's/.*--config-file *//; s/ .*//')
|
|
||||||
endif
|
|
||||||
|
|
||||||
stop:
|
|
||||||
if /sbin/checkproc $(notdir $(EXE_PATH)); then killall $(notdir $(EXE_PATH)); fi
|
|
||||||
kill:
|
|
||||||
killall -9 $(notdir $(EXE_PATH))
|
|
||||||
|
|
||||||
abort:
|
|
||||||
killall -6 $(notdir $(EXE_PATH))
|
|
||||||
|
|
||||||
strace: $(EXE_PATH) $(EXE_BIN) run-deps
|
|
||||||
strace -f $(STRACE_EXTRA_OPTS) $(EXE_CMD)
|
|
||||||
|
|
||||||
tee: $(EXE_PATH) $(EXE_BIN) run-deps
|
|
||||||
$(EXE_CMD) 2>&1 | tee run.out
|
|
||||||
|
|
||||||
kcg:
|
|
||||||
kcachegrind callgrind.*
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
# === variable definitions
|
|
||||||
GET_OS_SH = sh $(JWB_SCRIPT_DIR)/get-os.sh
|
|
||||||
GENERATE_SELECTION = sh $(JWB_SCRIPT_DIR)/generate_selection.sh
|
|
||||||
UPLOAD_SH = sh $(JWB_SCRIPT_DIR)/upload.sh
|
|
||||||
|
|
||||||
DISTRIBUTOR = $(shell $(GET_OS_SH) | cut -d- -f1)
|
|
||||||
DISTRO_RELEASE = $(shell $(GET_OS_SH) | cut -d- -f2-)
|
|
||||||
UPLOAD_URL = root@pkg.janware.com:/srv/ftp/pub/packages/linux/$(DISTRIBUTOR)/$(DISTRO_RELEASE)/setup/descr
|
|
||||||
|
|
||||||
SELECTION = $(shell $(GENERATE_SELECTION) -s)-packages.txt
|
|
||||||
CHANNEL_LIST = $(shell $(GENERATE_SELECTION) -s)-channels.txt
|
|
||||||
|
|
||||||
# === targets
|
|
||||||
all: selection.done channels.done
|
|
||||||
install:
|
|
||||||
clean:
|
|
||||||
$(RM) -rf *.done *.tmp
|
|
||||||
distclean: clean
|
|
||||||
upload: upload.done
|
|
||||||
install-smart: rpm-install-smart.done
|
|
||||||
commit: selection.done channels.done
|
|
||||||
cvs add $(SELECTION) $(CHANNEL_LIST) || exit 0
|
|
||||||
cvs commit -m "o updated by target $@"
|
|
||||||
smart-update: smart-update.done
|
|
||||||
smart-config: smart-config.done
|
|
||||||
write: selection.done channels.done
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
|
|
||||||
# === rules
|
|
||||||
selection.done: $(JWBDIR)/make/smart-selection.mk
|
|
||||||
rpm -qa --queryformat '%{NAME}\n' | sort -u | \
|
|
||||||
$(SED) '/gpg-pubkey/ d' > $(SELECTION).tmp
|
|
||||||
mv $(SELECTION).tmp $(SELECTION)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
channels.done: $(JWBDIR)/make/smart-selection.mk
|
|
||||||
smart channel --show | $(SED) '/\[rpm-sys\]/,+3 d' > $(CHANNEL_LIST)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
upload.done: selection.done
|
|
||||||
sh $(UPLOAD_SH) $(SELECTION) $(CHANNEL_LIST) $(UPLOAD_URL)
|
|
||||||
$(CVS_RSH) -l root pkg.janware.com $(UPDATE_REPO_SH)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
rpm-install-smart.done:
|
|
||||||
if ! rpm -q smart >/dev/null 2>&1 ; then \
|
|
||||||
wget --http-user=$(JANWARE_USER) https://janware.com:/files/packages/linux/$(DISTRIBUTOR)/$(DISTRO_RELEASE)/rpm/i686/smart.rpm; \
|
|
||||||
sudo rpm -U smart.rpm; \
|
|
||||||
sudo smart update; \
|
|
||||||
sudo smart channel --remove-all; \
|
|
||||||
fi
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
smart-update.done:
|
|
||||||
sudo smart update || exit 0
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
%-packages.txt-install: smart-update.done
|
|
||||||
$(CAT) $*-packages.txt | xargs sudo smart install -y
|
|
||||||
|
|
||||||
%-channels.txt-replace:
|
|
||||||
sudo smart channel -y --remove-all
|
|
||||||
sudo smart channel -y --add $*-channels.txt
|
|
||||||
sudo smart update || exit 0
|
|
||||||
|
|
||||||
smart-config.done:
|
|
||||||
sudo smart config --set rpm-check-signatures=false
|
|
||||||
sudo smart config --set remove-packages=false
|
|
||||||
touch $@
|
|
||||||
24
make/so.mk
24
make/so.mk
|
|
@ -1,24 +0,0 @@
|
||||||
# generic utility modules
|
|
||||||
# (c) 2001 jannet it services
|
|
||||||
# contact@jannet.de
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/defs.mk
|
|
||||||
include $(JWBDIR)/make/defs-cpp.mk
|
|
||||||
|
|
||||||
LDFLAGS += -shared
|
|
||||||
BUILD_SHOBJS = $(addprefix $(BUILD_LIBDIR)/, $(SHOBJS))
|
|
||||||
SHOBJS = $(patsubst %.cpp,$(SO_PREFIX)%.so,$(patsubst %.cc,$(SO_PREFIX)%.so,$(patsubst %.c,$(SO_PREFIX)%.so,$(SRC_ALL_CPP))))
|
|
||||||
INSTALLED_SHOBJS += $(addprefix $(INSTALL_LIBDIR)/,$(SHOBJS))
|
|
||||||
INSTALLED_ALL_LIBS += $(INSTALLED_SHOBJS)
|
|
||||||
|
|
||||||
include $(JWBDIR)/make/ldlibpath.mk
|
|
||||||
include $(JWBDIR)/make/debugger.mk
|
|
||||||
include $(JWBDIR)/make/rules.mk
|
|
||||||
|
|
||||||
all: $(SHOBJS) $(BUILD_SHOBJS)
|
|
||||||
clean: objclean textclean localclean profclean
|
|
||||||
install: $(ALL) install_dir_LIB installso
|
|
||||||
|
|
||||||
$(BUILD_LIBDIR)/%.so: %.so
|
|
||||||
install -m 755 $< $@
|
|
||||||
30
make/song.mk
30
make/song.mk
|
|
@ -1,30 +0,0 @@
|
||||||
CHORD := $(firstword $(shell which chordpro chordii chord))
|
|
||||||
CHOPRO = $(wildcard *.chopro *.cho *.CHOPRO)
|
|
||||||
CHOPRO_PDF = $(addsuffix .pdf,$(basename $(CHOPRO)))
|
|
||||||
CHOPRO_PS = $(addsuffix .ps,$(basename $(CHOPRO)))
|
|
||||||
|
|
||||||
all: $(CHOPRO_PDF)
|
|
||||||
install:
|
|
||||||
clean: clean.chopro clean.tmp
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
pdf: $(CHOPRO_PDF)
|
|
||||||
kpdf: $(CHOPRO_PDF)
|
|
||||||
kpdf $<
|
|
||||||
|
|
||||||
%.pdf: %.ps
|
|
||||||
ps2pdf $< $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
%.ps: %.chopro
|
|
||||||
$(CHORD) $< > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
clean.chopro:
|
|
||||||
$(RM) -f $(CHOPRO_PS) $(CHOPRO_PDF)
|
|
||||||
|
|
||||||
clean.tmp:
|
|
||||||
$(RM) -f *.tmp
|
|
||||||
|
|
||||||
view: $(CHOPRO_PDF)
|
|
||||||
okular $<
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue