From bc883deed4be8b1707b365b53cfdccbc713b0d32 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 14 Nov 2025 15:02:56 +0100 Subject: [PATCH] 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 --- CHANGES | 7 - README.md | 225 -- bin/Makefile | 35 - conf/Makefile | 4 - conf/etc/Makefile | 9 - conf/etc/jw-rc.status | 463 ---- conf/jcs/Makefile | 9 - conf/jcs/jcs.conf | 8 - conf/jcs/jcs.mk | 122 - conf/jcs/templates/dir/module/Makefile | 5 - conf/jcs/templates/dir/src/Makefile | 15 - conf/profile/Makefile | 4 - conf/profile/alias-cdc.sh | 2 - conf/profile/cvsroot.sh | 3 - conf/profile/path-jw-build.sh | 7 - doc/Makefile | 6 - doc/design-goals.txt | 19 - doc/licenses/Makefile | 6 - doc/licenses/lgpl-2.1.txt | 502 ---- doc/packaging/Makefile | 4 - doc/packaging/add-pkg-conflicts-support.patch | 351 --- htdocs/Makefile | 5 - htdocs/images/Makefile | 5 - htdocs/images/logo-janware/Makefile | 7 - .../logo-janware/logo-janware-minimal.svg | 13 - htdocs/images/logo-janware/logo-janware.svg | 258 -- make/autoconf.mk | 49 - make/backup.mk | 16 - make/bin.mk | 12 - make/cleandirs.mk | 28 - make/conf.mk | 23 - make/contrib.mk | 47 - make/cpp-extra-targets.mk | 8 - make/cpp.mk | 1 - make/crontab.mk | 23 - make/dav.mk | 44 - make/debugger.mk | 83 - make/decompress.mk | 19 - make/defs-cpp.mk | 808 ------- make/depend.mk | 45 - make/disabled.mk | 7 - make/dist.mk | 87 - make/doxygen.mk | 130 - make/dummy.mk | 13 - make/exe.mk | 21 - make/generic.mk | 12 - make/gettext.mk | 91 - make/git-submod.mk | 44 - make/header.mk | 12 - make/htdocs.mk | 70 - make/images.mk | 7 - make/include.mk | 44 - make/install-files.mk | 54 - make/isolinux.mk | 62 - make/java.mk | 17 - make/js.mk | 31 - make/ldlibpath.mk | 17 - make/lib.mk | 96 - make/libsrc.mk | 6 - make/lilypond.mk | 36 - make/linux-rpm-build.mk | 215 -- make/linux-rpm.mk | 176 -- make/lo.mk | 72 - make/main.mk | 10 - make/mcu-defs.mk | 81 - make/mcu-exe.mk | 28 - make/mcu-flash.mk | 45 - make/mcu-topdir.mk | 3 - make/path-rules.mk | 4 - make/plugin-defs.mk | 27 - make/plugin-version.mk | 17 - make/plugin.mk | 22 - make/prereq-installed.mk | 5 - make/profile.mk | 26 - make/profiler-defs.mk | 30 - make/profiler-rules-run.mk | 84 - make/profiler.mk | 2 - make/projdefs.mk | 12 - make/projects-dir-include.mk | 3 - make/projects-dir-minimal.mk | 41 - make/projects-dir.mk | 442 ---- make/py-defs.mk | 119 - make/py-mod.mk | 24 - make/py-mods.mk | 14 - make/py-rules.mk | 33 - make/py-run.mk | 24 - make/python-cli.mk | 15 - make/qt-defs.mk | 157 -- make/qt-pro.mk | 19 - make/qt-rules.mk | 27 - make/qt.mk | 20 - make/qtexe.mk | 12 - make/qtplugin.mk | 10 - make/qtso.mk | 8 - make/qttools.mk | 14 - make/qtversion.mk | 2 - make/run.mk | 166 -- make/smart-selection.mk | 70 - make/so.mk | 24 - make/song.mk | 30 - make/standalone-exe.mk | 33 - make/std-tools.mk | 34 - make/subdirs.mk | 16 - make/subtree.mk | 44 - make/suse-selection.mk | 23 - make/svg.mk | 59 - make/swig.mk | 209 -- make/tag-defs.mk | 1 - make/tag-rules.mk | 7 - make/tagged-tmpl-repo.mk | 5 - make/tagged-tmpl.mk | 23 - make/targets-tools.mk | 105 - make/test-exe.mk | 32 - make/test-java.mk | 13 - make/tex.mk | 433 ---- make/text.mk | 13 - make/textest.mk | 34 - make/theme-images.mk | 34 - make/tmpl.mk | 22 - make/tools-matlab.mk | 1 - make/tools.mk | 20 - make/topdir-autoconf.mk | 11 - make/upload-defs-rpm.mk | 45 - make/upload-rules.mk | 17 - make/upload.mk | 31 - make/vim.mk | 2 - make/winres.rc.tmpl | 53 - make/wt-defs.mk | 21 - make/yapp.mk | 28 - make/zip-windows-files.mk | 60 - scripts/build-release.sh | 8 - scripts/collect-installed-pkg-changes.sh | 111 - scripts/convert-doc-to-wiki.sh | 117 - scripts/convert-to-greyed-out-image.sh | 33 - scripts/create-mkdebian.sh | 159 -- scripts/create-mkspec.sh | 168 -- scripts/cvs-admin.sh | 41 - scripts/dpm.sh | 189 -- scripts/generate-boot-medium.sh | 201 -- scripts/git-srv-admin.sh | 246 -- scripts/ini-section.sh | 9 - scripts/ini-tools.sh | 56 - scripts/integrate-distro.sh | 1595 ------------- scripts/jannet | 226 -- scripts/jcs | 2096 ----------------- scripts/jw-build-create-project.sh | 197 -- scripts/jw-build-ssh.sh | 4 - scripts/jw-pkg | 503 ---- scripts/linktree.sh | 30 - scripts/make-version-script.sh | 41 - scripts/mkspec-wrapper.sh | 130 - scripts/parse-valgrind-suppressions.sh | 57 - scripts/pgit.sh | 202 -- scripts/pkg-manager.sh | 121 - scripts/pkg.sh | 1237 ---------- scripts/purge-stale-projects.sh | 114 - scripts/python-tools.sh | 81 - scripts/qemu-boot.sh | 223 -- scripts/scm.sh | 174 -- scripts/streamline-project.sh | 102 - scripts/timed-make-shell.sh | 6 - scripts/upload.sh | 362 --- tmpl/Makefile | 4 - tmpl/doxygen/Makefile | 24 - tmpl/doxygen/doxygen.conf.tmpl | 24 - tmpl/doxygen/footer.html | 0 tmpl/doxygen/header.html | 6 - tmpl/doxygen/styles.css | 13 - tmpl/tagged/Makefile | 4 - tmpl/tagged/cortex-m/Makefile | 4 - tmpl/tagged/cortex-m/ld/30-mem.ld.tmpl | 59 - .../cortex-m/ld/50-cortex-m-sections.ld.tmpl | 473 ---- tmpl/tagged/cortex-m/ld/Makefile | 4 - tmpl/tex/Makefile | 4 - tmpl/tex/de_contract/Makefile | 8 - tmpl/tex/de_contract/frontpage.tex.tmpl | 78 - tmpl/tex/de_contract/header.tex.tmpl | 237 -- tmpl/tex/de_contract/index_head.html.tmpl | 54 - tmpl/tex/de_contract/index_tail.html.tmpl | 10 - tmpl/tex/de_presentation/Makefile | 8 - tmpl/tex/de_presentation/frontpage.tex.tmpl | 78 - tmpl/tex/de_presentation/header.tex.tmpl | 22 - tmpl/tex/de_presentation/index_head.html.tmpl | 54 - tmpl/tex/de_presentation/index_tail.html.tmpl | 10 - tmpl/tex/de_technical/Makefile | 8 - tmpl/tex/de_technical/frontpage.ger.tmpl | 80 - tmpl/tex/de_technical/frontpage.tex.tmpl | 86 - tmpl/tex/de_technical/header.ger.tmpl | 132 -- tmpl/tex/de_technical/header.tex.tmpl | 237 -- tmpl/tex/de_technical/index_head.html.tmpl | 54 - tmpl/tex/de_technical/index_tail.html.tmpl | 10 - tmpl/tex/en_technical/Makefile | 8 - tmpl/tex/en_technical/frontpage.ger.tmpl | 78 - tmpl/tex/en_technical/frontpage.tex.tmpl | 89 - tmpl/tex/en_technical/header.ger.tmpl | 127 - tmpl/tex/en_technical/header.tex.tmpl | 141 -- tmpl/tex/en_technical/index_head.html.tmpl | 53 - tmpl/tex/en_technical/index_tail.html.tmpl | 10 - tmpl/tex/technical/Makefile | 2 - 199 files changed, 18851 deletions(-) delete mode 100644 CHANGES delete mode 100644 README.md delete mode 100644 bin/Makefile delete mode 100644 conf/Makefile delete mode 100644 conf/etc/Makefile delete mode 100644 conf/etc/jw-rc.status delete mode 100644 conf/jcs/Makefile delete mode 100644 conf/jcs/jcs.conf delete mode 100644 conf/jcs/jcs.mk delete mode 100644 conf/jcs/templates/dir/module/Makefile delete mode 100644 conf/jcs/templates/dir/src/Makefile delete mode 100644 conf/profile/Makefile delete mode 100644 conf/profile/alias-cdc.sh delete mode 100644 conf/profile/cvsroot.sh delete mode 100644 conf/profile/path-jw-build.sh delete mode 100644 doc/Makefile delete mode 100644 doc/design-goals.txt delete mode 100644 doc/licenses/Makefile delete mode 100644 doc/licenses/lgpl-2.1.txt delete mode 100644 doc/packaging/Makefile delete mode 100644 doc/packaging/add-pkg-conflicts-support.patch delete mode 100644 htdocs/Makefile delete mode 100644 htdocs/images/Makefile delete mode 100644 htdocs/images/logo-janware/Makefile delete mode 100644 htdocs/images/logo-janware/logo-janware-minimal.svg delete mode 100644 htdocs/images/logo-janware/logo-janware.svg delete mode 100644 make/autoconf.mk delete mode 100644 make/backup.mk delete mode 100644 make/bin.mk delete mode 100644 make/cleandirs.mk delete mode 100644 make/conf.mk delete mode 100644 make/contrib.mk delete mode 100644 make/cpp-extra-targets.mk delete mode 100644 make/cpp.mk delete mode 100644 make/crontab.mk delete mode 100644 make/dav.mk delete mode 100644 make/debugger.mk delete mode 100644 make/decompress.mk delete mode 100644 make/defs-cpp.mk delete mode 100644 make/depend.mk delete mode 100644 make/disabled.mk delete mode 100644 make/dist.mk delete mode 100644 make/doxygen.mk delete mode 100644 make/dummy.mk delete mode 100644 make/exe.mk delete mode 100644 make/generic.mk delete mode 100644 make/gettext.mk delete mode 100644 make/git-submod.mk delete mode 100644 make/header.mk delete mode 100644 make/htdocs.mk delete mode 100644 make/images.mk delete mode 100644 make/include.mk delete mode 100644 make/install-files.mk delete mode 100644 make/isolinux.mk delete mode 100644 make/java.mk delete mode 100644 make/js.mk delete mode 100644 make/ldlibpath.mk delete mode 100644 make/lib.mk delete mode 100644 make/libsrc.mk delete mode 100644 make/lilypond.mk delete mode 100644 make/linux-rpm-build.mk delete mode 100644 make/linux-rpm.mk delete mode 100644 make/lo.mk delete mode 100644 make/main.mk delete mode 100644 make/mcu-defs.mk delete mode 100644 make/mcu-exe.mk delete mode 100644 make/mcu-flash.mk delete mode 100644 make/mcu-topdir.mk delete mode 100644 make/path-rules.mk delete mode 100644 make/plugin-defs.mk delete mode 100644 make/plugin-version.mk delete mode 100644 make/plugin.mk delete mode 100644 make/prereq-installed.mk delete mode 100644 make/profile.mk delete mode 100644 make/profiler-defs.mk delete mode 100644 make/profiler-rules-run.mk delete mode 100644 make/profiler.mk delete mode 100644 make/projdefs.mk delete mode 100644 make/projects-dir-include.mk delete mode 100644 make/projects-dir-minimal.mk delete mode 100644 make/projects-dir.mk delete mode 100644 make/py-defs.mk delete mode 100644 make/py-mod.mk delete mode 100644 make/py-mods.mk delete mode 100644 make/py-rules.mk delete mode 100644 make/py-run.mk delete mode 100644 make/python-cli.mk delete mode 100644 make/qt-defs.mk delete mode 100644 make/qt-pro.mk delete mode 100644 make/qt-rules.mk delete mode 100644 make/qt.mk delete mode 100644 make/qtexe.mk delete mode 100644 make/qtplugin.mk delete mode 100644 make/qtso.mk delete mode 100644 make/qttools.mk delete mode 100644 make/qtversion.mk delete mode 100644 make/run.mk delete mode 100644 make/smart-selection.mk delete mode 100644 make/so.mk delete mode 100644 make/song.mk delete mode 100644 make/standalone-exe.mk delete mode 100644 make/std-tools.mk delete mode 100644 make/subdirs.mk delete mode 100644 make/subtree.mk delete mode 100644 make/suse-selection.mk delete mode 100644 make/svg.mk delete mode 100644 make/swig.mk delete mode 100644 make/tag-defs.mk delete mode 100644 make/tag-rules.mk delete mode 100644 make/tagged-tmpl-repo.mk delete mode 100644 make/tagged-tmpl.mk delete mode 100644 make/targets-tools.mk delete mode 100644 make/test-exe.mk delete mode 100644 make/test-java.mk delete mode 100644 make/tex.mk delete mode 100644 make/text.mk delete mode 100644 make/textest.mk delete mode 100644 make/theme-images.mk delete mode 100644 make/tmpl.mk delete mode 100644 make/tools-matlab.mk delete mode 100644 make/tools.mk delete mode 100644 make/topdir-autoconf.mk delete mode 100644 make/upload-defs-rpm.mk delete mode 100644 make/upload-rules.mk delete mode 100644 make/upload.mk delete mode 100644 make/vim.mk delete mode 100644 make/winres.rc.tmpl delete mode 100644 make/wt-defs.mk delete mode 100644 make/yapp.mk delete mode 100644 make/zip-windows-files.mk delete mode 100644 scripts/build-release.sh delete mode 100644 scripts/collect-installed-pkg-changes.sh delete mode 100644 scripts/convert-doc-to-wiki.sh delete mode 100644 scripts/convert-to-greyed-out-image.sh delete mode 100644 scripts/create-mkdebian.sh delete mode 100644 scripts/create-mkspec.sh delete mode 100644 scripts/cvs-admin.sh delete mode 100644 scripts/dpm.sh delete mode 100644 scripts/generate-boot-medium.sh delete mode 100644 scripts/git-srv-admin.sh delete mode 100644 scripts/ini-section.sh delete mode 100644 scripts/ini-tools.sh delete mode 100644 scripts/integrate-distro.sh delete mode 100644 scripts/jannet delete mode 100644 scripts/jcs delete mode 100644 scripts/jw-build-create-project.sh delete mode 100644 scripts/jw-build-ssh.sh delete mode 100644 scripts/jw-pkg delete mode 100644 scripts/linktree.sh delete mode 100644 scripts/make-version-script.sh delete mode 100644 scripts/mkspec-wrapper.sh delete mode 100644 scripts/parse-valgrind-suppressions.sh delete mode 100644 scripts/pgit.sh delete mode 100644 scripts/pkg-manager.sh delete mode 100644 scripts/pkg.sh delete mode 100644 scripts/purge-stale-projects.sh delete mode 100644 scripts/python-tools.sh delete mode 100644 scripts/qemu-boot.sh delete mode 100644 scripts/scm.sh delete mode 100644 scripts/streamline-project.sh delete mode 100644 scripts/timed-make-shell.sh delete mode 100644 scripts/upload.sh delete mode 100644 tmpl/Makefile delete mode 100644 tmpl/doxygen/Makefile delete mode 100644 tmpl/doxygen/doxygen.conf.tmpl delete mode 100644 tmpl/doxygen/footer.html delete mode 100644 tmpl/doxygen/header.html delete mode 100644 tmpl/doxygen/styles.css delete mode 100644 tmpl/tagged/Makefile delete mode 100644 tmpl/tagged/cortex-m/Makefile delete mode 100644 tmpl/tagged/cortex-m/ld/30-mem.ld.tmpl delete mode 100644 tmpl/tagged/cortex-m/ld/50-cortex-m-sections.ld.tmpl delete mode 100644 tmpl/tagged/cortex-m/ld/Makefile delete mode 100644 tmpl/tex/Makefile delete mode 100644 tmpl/tex/de_contract/Makefile delete mode 100644 tmpl/tex/de_contract/frontpage.tex.tmpl delete mode 100644 tmpl/tex/de_contract/header.tex.tmpl delete mode 100644 tmpl/tex/de_contract/index_head.html.tmpl delete mode 100644 tmpl/tex/de_contract/index_tail.html.tmpl delete mode 100644 tmpl/tex/de_presentation/Makefile delete mode 100644 tmpl/tex/de_presentation/frontpage.tex.tmpl delete mode 100644 tmpl/tex/de_presentation/header.tex.tmpl delete mode 100644 tmpl/tex/de_presentation/index_head.html.tmpl delete mode 100644 tmpl/tex/de_presentation/index_tail.html.tmpl delete mode 100644 tmpl/tex/de_technical/Makefile delete mode 100644 tmpl/tex/de_technical/frontpage.ger.tmpl delete mode 100644 tmpl/tex/de_technical/frontpage.tex.tmpl delete mode 100644 tmpl/tex/de_technical/header.ger.tmpl delete mode 100644 tmpl/tex/de_technical/header.tex.tmpl delete mode 100644 tmpl/tex/de_technical/index_head.html.tmpl delete mode 100644 tmpl/tex/de_technical/index_tail.html.tmpl delete mode 100644 tmpl/tex/en_technical/Makefile delete mode 100644 tmpl/tex/en_technical/frontpage.ger.tmpl delete mode 100644 tmpl/tex/en_technical/frontpage.tex.tmpl delete mode 100644 tmpl/tex/en_technical/header.ger.tmpl delete mode 100644 tmpl/tex/en_technical/header.tex.tmpl delete mode 100644 tmpl/tex/en_technical/index_head.html.tmpl delete mode 100644 tmpl/tex/en_technical/index_tail.html.tmpl delete mode 100644 tmpl/tex/technical/Makefile diff --git a/CHANGES b/CHANGES deleted file mode 100644 index 96188700..00000000 --- a/CHANGES +++ /dev/null @@ -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. diff --git a/README.md b/README.md deleted file mode 100644 index bc0bd2d4..00000000 --- a/README.md +++ /dev/null @@ -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 diff --git a/bin/Makefile b/bin/Makefile deleted file mode 100644 index 7a30976e..00000000 --- a/bin/Makefile +++ /dev/null @@ -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 diff --git a/conf/Makefile b/conf/Makefile deleted file mode 100644 index a9018b59..00000000 --- a/conf/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -TOPDIR = .. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dirs.mk diff --git a/conf/etc/Makefile b/conf/etc/Makefile deleted file mode 100644 index 147bfca8..00000000 --- a/conf/etc/Makefile +++ /dev/null @@ -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 - diff --git a/conf/etc/jw-rc.status b/conf/etc/jw-rc.status deleted file mode 100644 index 8568682c..00000000 --- a/conf/etc/jw-rc.status +++ /dev/null @@ -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[G move to column (linux console, xterm, not vt100) -# \033[C move columns forward but only upto last column -# \033[D move columns backward but only upto first column -# \033[A move rows up -# \033[B move 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[] [-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[] [-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[] [-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 -} - diff --git a/conf/jcs/Makefile b/conf/jcs/Makefile deleted file mode 100644 index e4542470..00000000 --- a/conf/jcs/Makefile +++ /dev/null @@ -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 diff --git a/conf/jcs/jcs.conf b/conf/jcs/jcs.conf deleted file mode 100644 index ae1f5f5d..00000000 --- a/conf/jcs/jcs.conf +++ /dev/null @@ -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 diff --git a/conf/jcs/jcs.mk b/conf/jcs/jcs.mk deleted file mode 100644 index 696d42e3..00000000 --- a/conf/jcs/jcs.mk +++ /dev/null @@ -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 diff --git a/conf/jcs/templates/dir/module/Makefile b/conf/jcs/templates/dir/module/Makefile deleted file mode 100644 index 483f821a..00000000 --- a/conf/jcs/templates/dir/module/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# jannet configuration shadow -# (c) 2000 - 2001 jannet -# contact@jannet.de - -include /etc/jcs/jcs.mk diff --git a/conf/jcs/templates/dir/src/Makefile b/conf/jcs/templates/dir/src/Makefile deleted file mode 100644 index 26e5e73f..00000000 --- a/conf/jcs/templates/dir/src/Makefile +++ /dev/null @@ -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) diff --git a/conf/profile/Makefile b/conf/profile/Makefile deleted file mode 100644 index 638dfc90..00000000 --- a/conf/profile/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -TOPDIR = ../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/profile.mk diff --git a/conf/profile/alias-cdc.sh b/conf/profile/alias-cdc.sh deleted file mode 100644 index 0485a485..00000000 --- a/conf/profile/alias-cdc.sh +++ /dev/null @@ -1,2 +0,0 @@ -. /etc/jcs/jcs.conf -alias cdc="cd $jcs_dir" diff --git a/conf/profile/cvsroot.sh b/conf/profile/cvsroot.sh deleted file mode 100644 index 141aff3d..00000000 --- a/conf/profile/cvsroot.sh +++ /dev/null @@ -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 diff --git a/conf/profile/path-jw-build.sh b/conf/profile/path-jw-build.sh deleted file mode 100644 index affc014a..00000000 --- a/conf/profile/path-jw-build.sh +++ /dev/null @@ -1,7 +0,0 @@ -if [ -z "$PATH" ]; then - PATH=/opt/jw-build/bin -else - PATH=$PATH:/opt/jw-build/bin -fi -export PATH - diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 30afa2e2..00000000 --- a/doc/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -TOPDIR = .. - -SUBDIRS = licenses - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dirs.mk diff --git a/doc/design-goals.txt b/doc/design-goals.txt deleted file mode 100644 index fa04ee26..00000000 --- a/doc/design-goals.txt +++ /dev/null @@ -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 diff --git a/doc/licenses/Makefile b/doc/licenses/Makefile deleted file mode 100644 index 8e848735..00000000 --- a/doc/licenses/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -TOPDIR = ../.. - -INSTALL_DOCDIR = $(DOC_PREFIX)/licenses - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/doc.mk diff --git a/doc/licenses/lgpl-2.1.txt b/doc/licenses/lgpl-2.1.txt deleted file mode 100644 index 4362b491..00000000 --- a/doc/licenses/lgpl-2.1.txt +++ /dev/null @@ -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. - - - Copyright (C) - - 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. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/doc/packaging/Makefile b/doc/packaging/Makefile deleted file mode 100644 index ef50fd93..00000000 --- a/doc/packaging/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -TOPDIR = ../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dummy.mk diff --git a/doc/packaging/add-pkg-conflicts-support.patch b/doc/packaging/add-pkg-conflicts-support.patch deleted file mode 100644 index 61b0bf3f..00000000 --- a/doc/packaging/add-pkg-conflicts-support.patch +++ /dev/null @@ -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') diff --git a/htdocs/Makefile b/htdocs/Makefile deleted file mode 100644 index d4e51ad2..00000000 --- a/htdocs/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -TOPDIR = .. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dirs.mk -include $(JWBDIR)/make/htdocs.mk diff --git a/htdocs/images/Makefile b/htdocs/images/Makefile deleted file mode 100644 index e693a7da..00000000 --- a/htdocs/images/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -TOPDIR = ../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dirs.mk -include $(JWBDIR)/make/htdocs.mk diff --git a/htdocs/images/logo-janware/Makefile b/htdocs/images/logo-janware/Makefile deleted file mode 100644 index b83f7315..00000000 --- a/htdocs/images/logo-janware/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -TOPDIR = ../../.. - -SVG_GENERATE_FORMATS ?= svg - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/svg.mk -include $(JWBDIR)/make/htdocs.mk diff --git a/htdocs/images/logo-janware/logo-janware-minimal.svg b/htdocs/images/logo-janware/logo-janware-minimal.svg deleted file mode 100644 index b4adbf2f..00000000 --- a/htdocs/images/logo-janware/logo-janware-minimal.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/htdocs/images/logo-janware/logo-janware.svg b/htdocs/images/logo-janware/logo-janware.svg deleted file mode 100644 index e13a8493..00000000 --- a/htdocs/images/logo-janware/logo-janware.svg +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/make/autoconf.mk b/make/autoconf.mk deleted file mode 100644 index 1012de75..00000000 --- a/make/autoconf.mk +++ /dev/null @@ -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 diff --git a/make/backup.mk b/make/backup.mk deleted file mode 100644 index a5861230..00000000 --- a/make/backup.mk +++ /dev/null @@ -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 diff --git a/make/bin.mk b/make/bin.mk deleted file mode 100644 index 030cda6e..00000000 --- a/make/bin.mk +++ /dev/null @@ -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: diff --git a/make/cleandirs.mk b/make/cleandirs.mk deleted file mode 100644 index 0caa28c2..00000000 --- a/make/cleandirs.mk +++ /dev/null @@ -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 diff --git a/make/conf.mk b/make/conf.mk deleted file mode 100644 index 6e219a72..00000000 --- a/make/conf.mk +++ /dev/null @@ -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 diff --git a/make/contrib.mk b/make/contrib.mk deleted file mode 100644 index 850bbb53..00000000 --- a/make/contrib.mk +++ /dev/null @@ -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 diff --git a/make/cpp-extra-targets.mk b/make/cpp-extra-targets.mk deleted file mode 100644 index c28c43ce..00000000 --- a/make/cpp-extra-targets.mk +++ /dev/null @@ -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 diff --git a/make/cpp.mk b/make/cpp.mk deleted file mode 100644 index 4a7669a8..00000000 --- a/make/cpp.mk +++ /dev/null @@ -1 +0,0 @@ -include $(JWBDIR)/make/tools.mk diff --git a/make/crontab.mk b/make/crontab.mk deleted file mode 100644 index c272bc9b..00000000 --- a/make/crontab.mk +++ /dev/null @@ -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 diff --git a/make/dav.mk b/make/dav.mk deleted file mode 100644 index 834ae3bb..00000000 --- a/make/dav.mk +++ /dev/null @@ -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 diff --git a/make/debugger.mk b/make/debugger.mk deleted file mode 100644 index d7712317..00000000 --- a/make/debugger.mk +++ /dev/null @@ -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) diff --git a/make/decompress.mk b/make/decompress.mk deleted file mode 100644 index 68c0ca93..00000000 --- a/make/decompress.mk +++ /dev/null @@ -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 $< diff --git a/make/defs-cpp.mk b/make/defs-cpp.mk deleted file mode 100644 index bfb279f6..00000000 --- a/make/defs-cpp.mk +++ /dev/null @@ -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 diff --git a/make/depend.mk b/make/depend.mk deleted file mode 100644 index 23e1892d..00000000 --- a/make/depend.mk +++ /dev/null @@ -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 diff --git a/make/disabled.mk b/make/disabled.mk deleted file mode 100644 index 2b6558c8..00000000 --- a/make/disabled.mk +++ /dev/null @@ -1,7 +0,0 @@ -DISABLED = @echo Target \"$1\" in $(shell pwd)/Makefile has been disabled. - -all: - $(call DISABLED,$@) - -install clean distclean: - $(call DISABLED,$@) diff --git a/make/dist.mk b/make/dist.mk deleted file mode 100644 index 8c0ac38e..00000000 --- a/make/dist.mk +++ /dev/null @@ -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 diff --git a/make/doxygen.mk b/make/doxygen.mk deleted file mode 100644 index a1a11b71..00000000 --- a/make/doxygen.mk +++ /dev/null @@ -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 diff --git a/make/dummy.mk b/make/dummy.mk deleted file mode 100644 index b5e0306a..00000000 --- a/make/dummy.mk +++ /dev/null @@ -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 diff --git a/make/exe.mk b/make/exe.mk deleted file mode 100644 index 1062b086..00000000 --- a/make/exe.mk +++ /dev/null @@ -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: diff --git a/make/generic.mk b/make/generic.mk deleted file mode 100644 index 4ada6682..00000000 --- a/make/generic.mk +++ /dev/null @@ -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: diff --git a/make/gettext.mk b/make/gettext.mk deleted file mode 100644 index dac41d44..00000000 --- a/make/gettext.mk +++ /dev/null @@ -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)))) diff --git a/make/git-submod.mk b/make/git-submod.mk deleted file mode 100644 index 23f616c4..00000000 --- a/make/git-submod.mk +++ /dev/null @@ -1,44 +0,0 @@ -# - Clone remote repo into / -# - Add the following to /Makefile: -# - SUBMOD_SRC_DIR = ./ -# - include -# - 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 diff --git a/make/header.mk b/make/header.mk deleted file mode 100644 index 7e59596f..00000000 --- a/make/header.mk +++ /dev/null @@ -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 diff --git a/make/htdocs.mk b/make/htdocs.mk deleted file mode 100644 index caa47093..00000000 --- a/make/htdocs.mk +++ /dev/null @@ -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 ' $@.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 $@ diff --git a/make/images.mk b/make/images.mk deleted file mode 100644 index 51f3af31..00000000 --- a/make/images.mk +++ /dev/null @@ -1,7 +0,0 @@ -include $(JWBDIR)/make/defs.mk -include $(JWBDIR)/make/rules.mk - -all: -install: install_IMG -clean: -distclean: diff --git a/make/include.mk b/make/include.mk deleted file mode 100644 index ef5e244f..00000000 --- a/make/include.mk +++ /dev/null @@ -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 diff --git a/make/install-files.mk b/make/install-files.mk deleted file mode 100644 index 5d8f524a..00000000 --- a/make/install-files.mk +++ /dev/null @@ -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 $@ diff --git a/make/isolinux.mk b/make/isolinux.mk deleted file mode 100644 index 5fd832c4..00000000 --- a/make/isolinux.mk +++ /dev/null @@ -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) diff --git a/make/java.mk b/make/java.mk deleted file mode 100644 index 4bd2ef3e..00000000 --- a/make/java.mk +++ /dev/null @@ -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 $^ diff --git a/make/js.mk b/make/js.mk deleted file mode 100644 index b526d807..00000000 --- a/make/js.mk +++ /dev/null @@ -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 diff --git a/make/ldlibpath.mk b/make/ldlibpath.mk deleted file mode 100644 index 2c12aab7..00000000 --- a/make/ldlibpath.mk +++ /dev/null @@ -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) diff --git a/make/lib.mk b/make/lib.mk deleted file mode 100644 index 02c25961..00000000 --- a/make/lib.mk +++ /dev/null @@ -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 diff --git a/make/libsrc.mk b/make/libsrc.mk deleted file mode 100644 index 1af36ba1..00000000 --- a/make/libsrc.mk +++ /dev/null @@ -1,6 +0,0 @@ -# generic utility modules -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -include $(JWBDIR)/make/tools.mk diff --git a/make/lilypond.mk b/make/lilypond.mk deleted file mode 100644 index 5ecd2442..00000000 --- a/make/lilypond.mk +++ /dev/null @@ -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 $@ diff --git a/make/linux-rpm-build.mk b/make/linux-rpm-build.mk deleted file mode 100644 index ea4b501f..00000000 --- a/make/linux-rpm-build.mk +++ /dev/null @@ -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 diff --git a/make/linux-rpm.mk b/make/linux-rpm.mk deleted file mode 100644 index 3a502fda..00000000 --- a/make/linux-rpm.mk +++ /dev/null @@ -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 diff --git a/make/lo.mk b/make/lo.mk deleted file mode 100644 index 695f5dd1..00000000 --- a/make/lo.mk +++ /dev/null @@ -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 diff --git a/make/main.mk b/make/main.mk deleted file mode 100644 index 5d76180b..00000000 --- a/make/main.mk +++ /dev/null @@ -1,10 +0,0 @@ -EXE = $(PROJECT) - -ifneq ($(TARGET),mingw) -FINAL_LDFLAGS += -rdynamic -endif - -include $(JWBDIR)/make/exe.mk - -all: -clean: profclean diff --git a/make/mcu-defs.mk b/make/mcu-defs.mk deleted file mode 100644 index ace5d08c..00000000 --- a/make/mcu-defs.mk +++ /dev/null @@ -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 diff --git a/make/mcu-exe.mk b/make/mcu-exe.mk deleted file mode 100644 index 23398211..00000000 --- a/make/mcu-exe.mk +++ /dev/null @@ -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) diff --git a/make/mcu-flash.mk b/make/mcu-flash.mk deleted file mode 100644 index 5803ff83..00000000 --- a/make/mcu-flash.mk +++ /dev/null @@ -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) diff --git a/make/mcu-topdir.mk b/make/mcu-topdir.mk deleted file mode 100644 index 0f98197b..00000000 --- a/make/mcu-topdir.mk +++ /dev/null @@ -1,3 +0,0 @@ -include $(JWBDIR)/make/mcu-defs.mk -include $(JWBDIR)/make/topdir.mk -include $(JWBDIR)/make/mcu-flash.mk diff --git a/make/path-rules.mk b/make/path-rules.mk deleted file mode 100644 index 2f1315c8..00000000 --- a/make/path-rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -all: -libpath: - @echo "export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" - @echo "export PATH=.:$(PATH)" diff --git a/make/plugin-defs.mk b/make/plugin-defs.mk deleted file mode 100644 index da2e9907..00000000 --- a/make/plugin-defs.mk +++ /dev/null @@ -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 diff --git a/make/plugin-version.mk b/make/plugin-version.mk deleted file mode 100644 index 52bb5fe0..00000000 --- a/make/plugin-version.mk +++ /dev/null @@ -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 $@ $< diff --git a/make/plugin.mk b/make/plugin.mk deleted file mode 100644 index 5ecdb1ae..00000000 --- a/make/plugin.mk +++ /dev/null @@ -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 diff --git a/make/prereq-installed.mk b/make/prereq-installed.mk deleted file mode 100644 index 60435f6a..00000000 --- a/make/prereq-installed.mk +++ /dev/null @@ -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 diff --git a/make/profile.mk b/make/profile.mk deleted file mode 100644 index 1ac3c0d7..00000000 --- a/make/profile.mk +++ /dev/null @@ -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) diff --git a/make/profiler-defs.mk b/make/profiler-defs.mk deleted file mode 100644 index dcd5013b..00000000 --- a/make/profiler-defs.mk +++ /dev/null @@ -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 diff --git a/make/profiler-rules-run.mk b/make/profiler-rules-run.mk deleted file mode 100644 index ab84c63f..00000000 --- a/make/profiler-rules-run.mk +++ /dev/null @@ -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 diff --git a/make/profiler.mk b/make/profiler.mk deleted file mode 100644 index f431edca..00000000 --- a/make/profiler.mk +++ /dev/null @@ -1,2 +0,0 @@ -include $(JWBDIR)/make/profiler-defs.mk -include $(JWBDIR)/make/profiler-rules-run.mk diff --git a/make/projdefs.mk b/make/projdefs.mk deleted file mode 100644 index 0f400b3c..00000000 --- a/make/projdefs.mk +++ /dev/null @@ -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) diff --git a/make/projects-dir-include.mk b/make/projects-dir-include.mk deleted file mode 100644 index 4c3f3043..00000000 --- a/make/projects-dir-include.mk +++ /dev/null @@ -1,3 +0,0 @@ -all: - -include $(JWBDIR)/make/projects-dir.mk diff --git a/make/projects-dir-minimal.mk b/make/projects-dir-minimal.mk deleted file mode 100644 index df517fe9..00000000 --- a/make/projects-dir-minimal.mk +++ /dev/null @@ -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 -# -# 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 = 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) diff --git a/make/projects-dir.mk b/make/projects-dir.mk deleted file mode 100644 index ee889764..00000000 --- a/make/projects-dir.mk +++ /dev/null @@ -1,442 +0,0 @@ -# -# SPDX-License-Identifier: GPL-2.0+ -# -# Manage multiple software repositories in one tree -# -# (C) Copyright 2001-2019, Jan Lindemann -# -# 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 = 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- 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 $@ diff --git a/make/py-defs.mk b/make/py-defs.mk deleted file mode 100644 index c3a7a76d..00000000 --- a/make/py-defs.mk +++ /dev/null @@ -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 diff --git a/make/py-mod.mk b/make/py-mod.mk deleted file mode 100644 index 4e86506c..00000000 --- a/make/py-mod.mk +++ /dev/null @@ -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 $@ diff --git a/make/py-mods.mk b/make/py-mods.mk deleted file mode 100644 index 07579e3a..00000000 --- a/make/py-mods.mk +++ /dev/null @@ -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 diff --git a/make/py-rules.mk b/make/py-rules.mk deleted file mode 100644 index aaa8f3d0..00000000 --- a/make/py-rules.mk +++ /dev/null @@ -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$$') diff --git a/make/py-run.mk b/make/py-run.mk deleted file mode 100644 index d8c40ae4..00000000 --- a/make/py-run.mk +++ /dev/null @@ -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 diff --git a/make/python-cli.mk b/make/python-cli.mk deleted file mode 100644 index 51e4ec49..00000000 --- a/make/python-cli.mk +++ /dev/null @@ -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 diff --git a/make/qt-defs.mk b/make/qt-defs.mk deleted file mode 100644 index 9c2c190b..00000000 --- a/make/qt-defs.mk +++ /dev/null @@ -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 diff --git a/make/qt-pro.mk b/make/qt-pro.mk deleted file mode 100644 index 6baef2e5..00000000 --- a/make/qt-pro.mk +++ /dev/null @@ -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 diff --git a/make/qt-rules.mk b/make/qt-rules.mk deleted file mode 100644 index b761adbe..00000000 --- a/make/qt-rules.mk +++ /dev/null @@ -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 diff --git a/make/qt.mk b/make/qt.mk deleted file mode 100644 index b113e797..00000000 --- a/make/qt.mk +++ /dev/null @@ -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 diff --git a/make/qtexe.mk b/make/qtexe.mk deleted file mode 100644 index 9c2cf1a9..00000000 --- a/make/qtexe.mk +++ /dev/null @@ -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 diff --git a/make/qtplugin.mk b/make/qtplugin.mk deleted file mode 100644 index 8f339773..00000000 --- a/make/qtplugin.mk +++ /dev/null @@ -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 diff --git a/make/qtso.mk b/make/qtso.mk deleted file mode 100644 index 3ad13e0b..00000000 --- a/make/qtso.mk +++ /dev/null @@ -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 diff --git a/make/qttools.mk b/make/qttools.mk deleted file mode 100644 index 86f5ff20..00000000 --- a/make/qttools.mk +++ /dev/null @@ -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 diff --git a/make/qtversion.mk b/make/qtversion.mk deleted file mode 100644 index ab6966ac..00000000 --- a/make/qtversion.mk +++ /dev/null @@ -1,2 +0,0 @@ -USE_QT ?= true -QT_MAJOR_VERSION ?= 5 diff --git a/make/run.mk b/make/run.mk deleted file mode 100644 index 5efffd73..00000000 --- a/make/run.mk +++ /dev/null @@ -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.* diff --git a/make/smart-selection.mk b/make/smart-selection.mk deleted file mode 100644 index 0d5db757..00000000 --- a/make/smart-selection.mk +++ /dev/null @@ -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 $@ diff --git a/make/so.mk b/make/so.mk deleted file mode 100644 index 333b8dfa..00000000 --- a/make/so.mk +++ /dev/null @@ -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 $< $@ diff --git a/make/song.mk b/make/song.mk deleted file mode 100644 index 89b5acd1..00000000 --- a/make/song.mk +++ /dev/null @@ -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 $< diff --git a/make/standalone-exe.mk b/make/standalone-exe.mk deleted file mode 100644 index 918013a1..00000000 --- a/make/standalone-exe.mk +++ /dev/null @@ -1,33 +0,0 @@ -# generic utility modules -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -VERSION ?= 0.0.0.0-dev -DIST_VERSION ?= $(VERSION) -#USE_CFG_XXX_MK ?= false -USE_PROJECT_LIB ?= false -DEVELOPMENT ?= true -PROJECTS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))/../.. - -ifeq ($(PROJECT),) -PROJECT = $(notdir $(shell $(PWD))) -endif - -ifeq ($(PREFIX),) -PREFIX = $(HOME)/opt/$(PROJECT) -endif - -include $(JWBDIR)/make/run.mk -include $(JWBDIR)/make/depend.mk - -all: $(EXE) -install: $(INSTALLED_EXE) $(INSTALLED_EXE_BIN) -run: all.dirs $(EXE) $(EXE_BIN) -strace: $(EXE) $(EXE_BIN) - -#$(LIB_SO): $(LIB_A) -#$(EXE): $(LIB_SO) -all.dirs: -clean: execlean localclean clean.standalone-exe -clean.standalone-exe: diff --git a/make/std-tools.mk b/make/std-tools.mk deleted file mode 100644 index 14e9fe09..00000000 --- a/make/std-tools.mk +++ /dev/null @@ -1,34 +0,0 @@ -include $(JWBDIR)/make/defs.mk - -PROFILE_SH = profile-$(PROJECT).sh - -all: $(PROFILE_SH) -clean: clean.std-tools -install: $(PROFILE_SH) install.std-tools.done -distclean: clean - -$(PROFILE_SH): $(LOCAL_MKFILES) - echo '#!/bin/sh' > $@.tmp - echo "if [ \"\$$PATH\" ]; then" >> $@.tmp - echo " PATH=\$$PATH:$(INSTALL_EXEDIR)" >> $@.tmp - echo "else" >> $@.tmp - echo " PATH=$(INSTALL_EXEDIR)" >> $@.tmp - echo "fi" >> $@.tmp - echo "if [ \"\$$LD_LIBRARY_PATH\" ]; then" >> $@.tmp - echo " LD_LIBRARY_PATH=\$$LD_LIBRARY_PATH:$(INSTALL_LIBDIR)" >> $@.tmp - echo "else" >> $@.tmp - echo " LD_LIBRARY_PATH=$(INSTALL_LIBDIR)" >> $@.tmp - echo "fi" >> $@.tmp - echo "export PATH LD_LIBRARY_PATH" >> $@.tmp - mv $@.tmp $@ - -clean.std-tools: - $(RM) -f $(PROFILE_SH) *.done - -install.std-tools.done: install.std-dir.done - $(INSTALL) -p -o $(PROFILEOWNER) -g $(PROFILEGROUP) -m $(PROFILEMODE) $(PROFILE_SH) $(PROFILE_DIR) - touch $@ - -install.std-dir.done: - mkdir -p $(PROFILE_DIR) - touch $@ diff --git a/make/subdirs.mk b/make/subdirs.mk deleted file mode 100644 index a30c2654..00000000 --- a/make/subdirs.mk +++ /dev/null @@ -1,16 +0,0 @@ -include $(JWBDIR)/make/defs.mk -include $(JWBDIR)/make/defs-dirs.mk - -all: -clean: clean.var -distclean: clean.var distclean.var - -all install clean distclean test: -ifneq ($(SUBDIRS_TO_ITERATE),) - set -e; for dir in $(SUBDIRS_TO_ITERATE); do make -C $$dir $@; done -endif - -clean.var: - $(RM) -rf $(CLEAN) -distclean.var: - $(RM) -rf $(DISTCLEAN) diff --git a/make/subtree.mk b/make/subtree.mk deleted file mode 100644 index 0817b2d2..00000000 --- a/make/subtree.mk +++ /dev/null @@ -1,44 +0,0 @@ -ifneq ($(DEVELOPMENT),true) - SUBTREE_OWNER ?= root - SUBTREE_GROUP ?= root - SUBTREE_MODE ?= 0644 - SUBTREE_DIROWNER ?= root - SUBTREE_DIRGROUP ?= root - SUBTREE_DIRMODE ?= 0755 -else - SUBTREE_OWNER ?= $(shell id -un) - SUBTREE_GROUP ?= $(shell id -gn) - SUBTREE_MODE ?= 0644 - SUBTREE_DIROWNER ?= $(shell id -un) - SUBTREE_DIRGROUP ?= $(shell id -gn) - SUBTREE_DIRMODE ?= 0755 - SUBTREE_INSTALL_PREFIX ?= /srv/www/proj/$(PROJECT) -endif - -#ifeq ($(SUBTREE_SRC),) -# SUBTREE_SRC = $(shell find .) -#endif - -SUBTREE_DIRS += $(shell for f in `git ls-files . 2>/dev/null || find | sed 's%/[^/]\+$$%%' | sort -u | grep -v "Makefile\|GNUmakefile"`; do if [ -d "$$f" ]; then echo $$f; fi; done) -SUBTREE_FILES += $(shell for f in `git ls-files . 2>/dev/null || find | grep -v "Makefile\|GNUmakefile"`; do if [ -f "$$f" ]; then echo $$f; fi; done) - -INSTALLED_SUBTREE_DIRS = $(addprefix $(ENV_PREFIX)$(SUBTREE_INSTALL_PREFIX)/,$(SUBTREE_DIRS)) -INSTALLED_SUBTREE_FILES = $(addprefix $(ENV_PREFIX)$(SUBTREE_INSTALL_PREFIX)/,$(SUBTREE_FILES)) - -ifndef SUBTREE_MK_INCLUDED -SUBTREE_MK_INCLUDED = true - -include $(JWBDIR)/make/defs.mk - -all: -install: $(INSTALLED_SUBTREE_DIRS) $(INSTALLED_SUBTREE_FILES) -clean: -distclean: - -$(INSTALLED_SUBTREE_DIRS): - $(INSTALL) -d -o $(SUBTREE_DIROWNER) -g $(SUBTREE_DIRGROUP) -m $(SUBTREE_DIRMODE) $@ - -$(ENV_PREFIX)$(SUBTREE_INSTALL_PREFIX)/%: % | $(INSTALLED_SUBTREE_DIRS) - $(INSTALL) -p -o $(SUBTREE_OWNER) -g $(SUBTREE_GROUP) -m $(SUBTREE_MODE) $< $@ - -endif # SUBTREE_MK_INCLUDED diff --git a/make/suse-selection.mk b/make/suse-selection.mk deleted file mode 100644 index d17aa0fb..00000000 --- a/make/suse-selection.mk +++ /dev/null @@ -1,23 +0,0 @@ -JWBDIR = $(HOME)/local/src/cvs.main/proj/jw-build -include $(JWBDIR)/make/defs.mk - -GENERATE_SELECTION = $(JWB_SCRIPT_DIR)/generate_selection.sh -SUSE_RELEASE = 10.1 -UPLOAD_URL = root@pkg.janware.com:/srv/dav/pub/packages/linux/suse/$(SUSE_RELEASE)/setup/descr -UPLOAD_SH = $(JWB_SCRIPT_DIR)/upload.sh - -SELECTION = $(shell sh $(GENERATE_SELECTION) -s).sel - -all: $(SELECTION) -upload: upload.done - -$(SELECTION): $(GENERATE_SELECTION) - sh $(GENERATE_SELECTION) - -clean: - $(RM) -rf $(SELECTION) upload.done - -upload.done: $(SELECTION) - sh $(UPLOAD_SH) $(SELECTION) $(UPLOAD_URL) - $(CVS_RSH) -l root pkg.janware.com $(UPDATE_REPO_SH) - touch $@ diff --git a/make/svg.mk b/make/svg.mk deleted file mode 100644 index 16aa8124..00000000 --- a/make/svg.mk +++ /dev/null @@ -1,59 +0,0 @@ -SVG_GENERATE_FORMATS ?= png svg -SVG ?= $(filter-out copied-%,$(wildcard *.svg)) -COPIED_SVG = $(addprefix copied-,$(notdir $(SVG))) -INKSCAPE_VERSION = $(shell export -n DISPLAY; inkscape -V 2>&1 | sed '/Inkscape/ !d; s/Inkscape *\([0-9.]\+\) .*/\1/') -INKSCAPE_VERSION_MAJOR = $(word 1,$(subst ., ,$(INKSCAPE_VERSION))) -ifeq ($(INKSCAPE_VERSION_MAJOR),1) - INKSCAPE_EXPORT_PNG = --export-filename -else - INKSCAPE_EXPORT_PNG = --export-png -endif - -GENERATED_ICON_WIDTHS += 16 32 48 64 72 96 128 144 168 192 -GENERATED_WIDTHS ?= $(GENERATED_ICON_WIDTHS) $(GENERATED_EXTRA_WIDTHS) - -ifneq ($(filter png,$(SVG_GENERATE_FORMATS)),) - GENERATED_WIDTHS_PNG ?= $(GENERATED_WIDTHS) - GENERATED_PNG ?= \ - $(foreach w, $(GENERATED_WIDTHS_PNG),$(patsubst %.svg,%-$w.png,$(notdir $(SVG)))) - GENERATED_IMAGES += $(GENERATED_PNG) -endif - -ifneq ($(filter ico,$(SVG_GENERATE_FORMATS)),) - GENERATED_WIDTHS_ICO ?= 16 32 - GENERATED_ICO ?= \ - $(foreach w, $(GENERATED_WIDTHS_ICO),$(patsubst %.svg,%-$w.ico,$(notdir $(SVG)))) - GENERATED_IMAGES += $(GENERATED_ICO) -endif - -ifneq ($(filter pdf,$(SVG_GENERATE_FORMATS)),) - GENERATED_PDF ?= $(patsubst %.svg,%.pdf,$(notdir $(SVG))) - GENERATED_IMAGES += $(GENERATED_PDF) -endif - -ifneq ($(filter svg,$(SVG_GENERATE_FORMATS)),) - IMAGES += $(notdir $(SVG)) -endif - -all: $(GENERATED_IMAGES) -install: -clean: clean.images -distclean: - -clean.images: - $(RM) -f $(GENERATED_IMAGES) $(COPIED_SVG) - -%.png: $(COPIED_SVG) - export -n DISPLAY; inkscape -w $(shell echo $* | sed 's/.*-//') \ - $(INKSCAPE_EXPORT_PNG)=$@ copied-$(shell echo $* | sed 's/-[0-9]\+$$//').svg - -%.pdf: copied-%.svg - export -n DISPLAY; inkscape --export-filename="$@" $< - -copied-%.svg: $(SVG) - @echo $^ - cp $(filter %$*.svg, $^) $@.tmp - mv $@.tmp $@ - -%.ico: %.png - icotool -o $@ -c $< diff --git a/make/swig.mk b/make/swig.mk deleted file mode 100644 index 916d898b..00000000 --- a/make/swig.mk +++ /dev/null @@ -1,209 +0,0 @@ -include $(JWBDIR)/make/defs.mk -include $(JWBDIR)/make/defs-cpp.mk -include $(JWBDIR)/make/dev-utils.mk - -ifeq ($(SWIG_TARGET),php) - - SWIG_LANG ?= php - SWIG_TARGET_EXT ?= php - ifeq ($(OS_NAME),ubuntu) - PHP_MAJOR ?= 5 - else - PHP_MAJOR ?= $(shell php-config --version | cut -d. -f1) - endif - PHP ?= php$(PHP_MAJOR) - #PHP ?= $(firstword $(notdir $(wildcard /usr/share/php*))) - # Funny: swig --help states -php7 is for PHP8 and later - SWIG_OPTS ?= -php7 -DJW_PHP_MAJOR=$(PHP_MAJOR) - SWIG_MODULE_TARGET_DIR = $(ENV_PREFIX)/usr/share/$(PHP) - - #SWIG_PHP_INCLUDE_DIR = /usr/include/$(PHP) - #SWIG_PHP_INCLUDE_SUBDIRS = . main TSRM Zend - SWIG_PHP_MODULE_INI = $(SWIG_MODULE).ini - SWIG_PHP_MODULE_INI_DIR = $(ENV_PREFIX)/etc/$(PHP)/conf.d - #SWIG_PHP_NAMESPACE ?= $(SWIG_MODULE) - - SWIG_GENERATED_EXTRA += $(SWIG_PHP_MODULE_INI) - SWIG_INSTALLED_EXTRA = $(SWIG_PHP_MODULE_INI_DIR)/$(SWIG_PHP_MODULE_INI) - ifneq ($(SWIG_PHP_NAMESPECE),) - SWIG_POSTPROCESS += sed -i -e "s/^ $@.tmp - mv $@.tmp $@ - -else ifeq ($(SWIG_TARGET),android) - - SWIG_LANG ?= android - SWIG_TARGET_EXT ?= java - SWIG_OPTS ?= -android - -else ifeq ($(SWIG_TARGET),python) - - include $(JWBDIR)/make/py-defs.mk # for $(PYTHON), $(PY_SITE_PACKAGES_PATH) - - PYTHON_FULL_VERSION ?= $(basename $(lastword $(shell $(PYTHON) --version 2>&1))) - PYTHON_MAJOR_VERSION ?= $(basename $(PYTHON_FULL_VERSION)) - PYTHON_MINOR_VERSION ?= $(patsubst .%,%,$(suffix $(PYTHON_FULL_VERSION))) - - SWIG_LANG ?= python - SWIG_TARGET_EXT ?= py - SWIG_OPTS ?= -python - #SWIG_MODULE_TARGET_DIR = $(ENV_PREFIX)$(SYSTEM_LIBDIR)/python$(PYTHON_MAJOR_VERSION).$(PYTHON_MINOR_VERSION)/site-packages - SWIG_MODULE_TARGET_DIR = $(ENV_PREFIX)$(PY_SITE_PACKAGES_PATH) - SWIG_MODULE_SO ?= _$(SWIG_MODULE).so - - ifneq ($(PYTHON_MAJOR_VERSION),3) - SWIG_CLEAN += $(wildcard *.pyc) - SWIG_PY_MODULE_PYC ?= $(patsubst %.py,%.pyc,$(SWIG_MODULE_TARGET)) - else - SWIG_CLEAN += $(wildcard __pycache__) - SWIG_PY_MODULE_PYC ?= $(patsubst %.py,__pycache__/%.$(PY_CPYTHON_PREFIX).pyc,$(SWIG_MODULE_TARGET)) - endif - SWIG_GENERATED_EXTRA += $(SWIG_PY_MODULE_PYC) - SWIG_INSTALLED_EXTRA += $(SWIG_MODULE_TARGET_DIR)/$(SWIG_PY_MODULE_PYC) - - FINAL_INCLUDE += $(shell $(PKG_CONFIG_EXE) --cflags python-$(PYTHON_VERSION)) - FINAL_LDFLAGS += $(shell $(PKG_CONFIG_EXE) --libs python-$(PYTHON_VERSION)) - - INSTALL_LIBDIR = $(SWIG_MODULE_TARGET_DIR) - -all: - -ifneq ($(PYTHON_MAJOR_VERSION),3) -%.pyc: %.py -else -__pycache__/%.$(PY_CPYTHON_PREFIX).pyc: %.py -endif - $(PYTHON) -c "import py_compile; py_compile.compile(\"$<\", doraise=True)" - -ifeq ($(PYTHON_MAJOR_VERSION),3) -$(SWIG_MODULE_TARGET_DIR)/__pycache__/%.$(PY_CPYTHON_PREFIX).pyc: __pycache__/%.$(PY_CPYTHON_PREFIX).pyc - mkdir -p $(dir $@) -else -$(SWIG_MODULE_TARGET_DIR)/%.pyc: %.pyc -endif - $(INSTALL) -p -m $(SWIG_TARGETMODE) -o $(SWIG_TARGETOWNER) -g $(SWIG_TARGETGROUP) $< $@ - -else ifeq ($(SWIG_TARGET),java) - - JAVA_VERSION ?= $(basename $(lastword $(shell java -version 2>&1 | sed '/version/ !d'))) - JAVA_MAJOR_VERSION ?= $(basename $(JAVA_VERSION)) - JAVA_MINOR_VERSION ?= $(patsubst .%,%,$(suffix $(JAVA_VERSION))) - - SWIG_LANG ?= java - SWIG_TARGET_EXT ?= java - SWIG_OPTS ?= -java - SWIG_MODULE_TARGET_DIR = /usr/share/java - SWIG_MODULE_SO ?= $(SWIG_MODULE).so - SWIG_CLEAN += $(wildcard *.java) - - #SWIG_PY_MODULE_PYC ?= $(patsubst %.py,%.pyc,$(SWIG_MODULE_TARGET)) - #SWIG_GENERATED_EXTRA += $(SWIG_PY_MODULE_PYC) - #SWIG_INSTALLED_EXTRA += $(SWIG_MODULE_TARGET_DIR)/$(SWIG_PY_MODULE_PYC) - - FINAL_INCLUDE += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux - #FINAL_LDFLAGS += - - INSTALL_LIBDIR = $(SWIG_MODULE_TARGET_DIR) - -else ifeq ($(SWIG_TARGET),perl) - - PERL ?= perl - SWIG_LANG ?= perl - SWIG_TARGET_EXT ?= pm - SWIG_OPTS ?= -perl - PERL_VERSION ?= $(patsubst v%,%,$(shell $(PERL) -e 'print $$^V;')) - # /usr/lib/perl is a symlink to /usr/lib/perl5 for yocto, so give this a preference - PERL_BASE_DIR ?= $(firstword $(wildcard $(addprefix $(BUILD_LIBS_PREFIX),/usr/lib64/perl5 /usr/lib/perl /usr/lib/perl5 /usr/lib/perl-native/perl))) - PERL_CORE_DIR ?= $(firstword $(wildcard $(addprefix $(PERL_BASE_DIR)/,$(PERL_VERSION)/$(ARCH)-linux-thread-multi/CORE $(PERL_VERSION)/CORE CORE))) - PERL_VENDOR_DIR ?= $(PERL_BASE_DIR)/vendor_perl/$(PERL_VERSION)/$(ARCH)-linux-thread-multi - FINAL_INCLUDE += -I$(PERL_CORE_DIR) - SWIG_CLEAN += $(wildcard *.$(SWIG_TARGET_EXT)) - INSTALL_LIBDIR = $(ENV_PREFIX)$(PERL_VENDOR_DIR)/auto/$(SWIG_MODULE) - SWIG_MODULE_TARGET_DIR = $(ENV_PREFIX)$(PERL_VENDOR_DIR) - -else - - $(error SWIG_TARGET=$(SWIG_TARGET) undefined or unknown) - -endif - -SWIG_INCLUDE ?= $(filter-out -iquote .,$(FINAL_INCLUDE)) - -SWIG_USE_CPP ?= true -ifeq ($(SWIG_USE_CPP),true) - SWIG_SOURCE_EXT ?= cpp - SWIG_OPTS += -c++ -else - SWIG_SOURCE_EXT ?= c -endif -SWIG ?= swig -SWIG_INTERFACE_I ?= $(wildcard *.i) -#SWIG_MODULE ?= $(SWIG_TARGET_EXT)_$(firstword $(shell sed '/^%module/ !d; s/^ *%module *//' $(SWIG_INTERFACE_I))) -SWIG_MODULE ?= $(firstword $(shell sed '/^%module/ !d; s/^ *%module *//' $(SWIG_INTERFACE_I))) -SWIG_MODULE_SO ?= $(SWIG_MODULE).so -SWIG_MODULE_H ?= $(SWIG_MODULE).h -SWIG_MODULE_WRAP_C ?= $(SWIG_MODULE)_wrap.$(SWIG_SOURCE_EXT) -SWIG_MODULE_TARGET ?= $(SWIG_MODULE).$(SWIG_TARGET_EXT) -SWIG_SRC_C ?= $(sort $(SWIG_MODULE_WRAP_C) $(wildcard *.c *.cpp)) -SWIG_OBJ ?= $(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(sort $(SWIG_SRC_C)))) -SWIG_TARGETOWNER ?= root -SWIG_TARGETGROUP ?= root -SWIG_TARGETMODE ?= 0644 -SWIG_WRAPPER_DEP_MK = swig.dep.mk - -SWIG_INSTALLED_SO = $(addprefix $(INSTALL_LIBDIR)/,$(SWIG_MODULE_SO)) -ifneq ($(SWIG_TARGET),php) - SWIG_INSTALLED_MODULE_TARGET = $(addprefix $(SWIG_MODULE_TARGET_DIR)/,$(SWIG_MODULE_TARGET)) -endif - -SWIG_DEFINES += -DNON_C_BINDING -SWIG_OPTS += $(SWIG_DEFINES) -FINAL_CFLAGS += $(SWIG_DEFINES) -FINAL_CXXFLAGS += $(SWIG_DEFINES) - -# for depend.mk -BUILD_OBJ = $(SWIG_OBJ) -DEPEND_MK += $(SWIG_WRAPPER_DEP_MK) - -all: $(SWIG_MODULE_SO) $(SWIG_GENERATED_EXTRA) -install: $(SWIG_INSTALLED_SO) $(SWIG_INSTALLED_MODULE_TARGET) $(SWIG_INSTALLED_EXTRA) -clean: clean.generated -distclean: clean - -$(SWIG_WRAPPER_DEP_MK): $(SWIG_INTERFACE_I) - $(SWIG) -M -oh $(SWIG_MODULE_H) -module $(SWIG_MODULE) $(SWIG_INCLUDE) $(SWIG_OPTS) -MT $(SWIG_MODULE_WRAP_C) $< > $@.tmp - mv $@.tmp $@ - -$(SWIG_MODULE_WRAP_C): $(SWIG_INTERFACE_I) - $(SWIG) -oh $(SWIG_MODULE_H) -module $(SWIG_MODULE) $(SWIG_INCLUDE) $(SWIG_OPTS) -o $@ $< - $(SWIG_POSTPROCESS) - -$(SWIG_MODULE_SO): $(SWIG_OBJ) - $(CXX) $^ -shared $(FINAL_LDFLAGS) -o $@ - -$(SWIG_MODULE_TARGET_DIR): - mkdir -p $@ - -$(SWIG_MODULE_TARGET_DIR)/%: % | $(SWIG_MODULE_TARGET_DIR) - $(INSTALL) -p -o $(SWIG_TARGETOWNER) -g $(SWIG_TARGETGROUP) -m $(SWIG_TARGETMODE) $< $@ - -clean.generated: - $(RM) -rf $(SWIG_MODULE_WRAP_C) $(SWIG_OBJ) $(SWIG_MODULE_SO) $(SWIG_MODULE_TARGET) $(SWIG_CLEAN) $(SWIG_WRAPPER_DEP_MK) - -include $(JWBDIR)/make/rules.mk -include $(JWBDIR)/make/depend.mk diff --git a/make/tag-defs.mk b/make/tag-defs.mk deleted file mode 100644 index add2d1cb..00000000 --- a/make/tag-defs.mk +++ /dev/null @@ -1 +0,0 @@ -TAG_VERSION = V_$(shell echo $(VERSION) | $(SED) 's/[\.-]/_/g') diff --git a/make/tag-rules.mk b/make/tag-rules.mk deleted file mode 100644 index 2dd83517..00000000 --- a/make/tag-rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -ifeq ($(VCS),cvs) -tag.dist: - cvs tag $(TAG_VERSION) - -ftag.dist: - cvs tag -F $(TAG_VERSION) -endif diff --git a/make/tagged-tmpl-repo.mk b/make/tagged-tmpl-repo.mk deleted file mode 100644 index 36341bf2..00000000 --- a/make/tagged-tmpl-repo.mk +++ /dev/null @@ -1,5 +0,0 @@ -TAGGED_TMPL_TAG ?= $(notdir $(CWD)) -TAGGED_TMPL_EXTS ?= $(TAGGED_TMPL_TAG) -LOCAL_TMPL += $(foreach e,$(TAGGED_TMPL_EXTS),$(wildcard *.$(TAGGED_TMPL_EXTS))) - -include $(JWBDIR)/make/tmpl.mk diff --git a/make/tagged-tmpl.mk b/make/tagged-tmpl.mk deleted file mode 100644 index 69b1fd9a..00000000 --- a/make/tagged-tmpl.mk +++ /dev/null @@ -1,23 +0,0 @@ -#TAGGED_TMPL_TMPLS ?= $(wildcard $(addprefix $(TAGGED_TMPL_REPO_DIR)/ld/,$(TAGGED_TMPL_TAGS)/*.ld)) -TAGGED_TMPL_TYPE ?= $(notdir $(CWD)) -TAGGED_TMPL_EXTS ?= $(TAGGED_TMPL_TYPE) -TAGGED_TMPL_TAG_DIR ?= $(TAGGED_TMPL_REPO_DIR)/$(1)/$2 # call with repodir, tag and type arguments -TAGGED_TMPL_TAG_DIRS ?= $(foreach tag,$(TAGGED_TMPL_TAGS),$(wildcard $(call $(TAGGED_TMPL_TAG_DIR),$(tag),$(1)))) # call with repodir + type argument -TAGGED_TMPL_FIRST_DIR ?= $(firstword $(call $(TAGGED_TMPL_TAG_DIRS),$(1))) # call with repodir + type argument - -#TAGGED_TMPL_ORIGIN ?= $(foreach tag,$(TAGGED_TMPL_TAGS),$(foreach e,$(TAGGED_TMPL_EXTS),$(wildcard $(call $(TAGGED_TMPL_TAG_DIR),$(tag))/*.$(e)))) -#TAGGED_TMPL_LOCAL = $(notdir $(TAGGED_TMPL_ORIGIN)) -#TAGGED_TMPL_GENERATED = $(patsubst %.tmpl,%,$(TAGGED_TMPL_LOCAL)) - -#TAGGED_TMPL_UNTEMPLATE = cat - -include $(JWBDIR)/make/defs.mk - -#all: $(TAGGED_TMPL_GENERATED) -#clean: tmpl.clean -# -#tmpl.clean: -# /bin/bash $(JWB_SCRIPT_DIR)/scm.sh -f $(TAGGED_TMPL_GENERATED) -# -#%: %.tmpl -# cat %< | $(TAGGED_TMPL_UNTEMPLATE) > $@.tmp diff --git a/make/targets-tools.mk b/make/targets-tools.mk deleted file mode 100644 index 58d47183..00000000 --- a/make/targets-tools.mk +++ /dev/null @@ -1,105 +0,0 @@ -# generic utility modules -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -ifndef TARGETS_TOOLS_MK_INCLUDED -TARGETS_TOOLS_MK_INCLUDED = true - -include $(JWBDIR)/make/rules.mk - -ifneq ($(strip $(SRC_ALL_CPP)),) - -# mandatory targets -all: -# all.link -install: $(ALL) - -# convenience targets -#link: all.link -clean-link: clean.link - -#all.link: $(HDRDIR_SCOPE_SUFFIX) - -$(HDRDIR_SCOPE_SUFFIX): - mkdir -p $(dir $(HDRDIR_SCOPE_SUFFIX)) - ln -s $(shell realpath -m . --relative-to $(dir $(HDRDIR_SCOPE_SUFFIX))) $@ - -ifeq ($(SCOPE_PREFIX),) -#all.link: $(BUILD_HDRDIR)/$(HDRDIR_SCOPE_SUFFIX) - -#$(BUILD_HDRDIR)/$(HDRDIR_SCOPE_SUFFIX): -# cd $(BUILD_HDRDIR_BASE) && ln -s . $(HDRDIR_SCOPE_SUFFIX) -endif - -ifneq ($(TARGET),mingw) -$(LIB_SO): $(BUILD_OBJ) -endif - -all.done: $(PREREQ_DONE) $(BUILD_HDR) $(BUILD_EXE_SH) $(MEMBERS) $(LIB_A) | $(HDRDIR_SCOPE_SUFFIX) - -ifneq ($(TARGET),mingw) -all.done: $(LIB_SO) -endif - -endif - -clean: objclean textclean localclean profclean clean.link - -clean.link: - if [ -L "$(HDRDIR_SCOPE_SUFFIX)" -a "`realpath --relative-to . $(HDRDIR_SCOPE_SUFFIX) 2>/dev/null`" = . ]; then \ - rm $(HDRDIR_SCOPE_SUFFIX) ;\ - rmdir -p $(dir $(HDRDIR_SCOPE_SUFFIX)) 2>/dev/null || : ;\ - fi - -CLANG_TIDY_H_C_CPP := $(shell $(ECHO) $(LOCAL_H) | xargs -r $(GREP) -l 'extern *"C"') -CLANG_TIDY_H_C := $(wildcard [a-z]*.h) -CLANG_TIDY_H_CPP := $(wildcard [A-Z]*.h) -#CLANG_TIDY_H_CPP := $(filter-out $(CLANG_TIDY_H_C),$(LOCAL_H)) - -# false positives on assert(), see https://reviews.llvm.org/D31130 -CLANG_TIDY_EXTRA_ARGS += -cppcoreguidelines-pro-bounds-array-to-pointer-decay - -# keep va_args -CLANG_TIDY_EXTRA_ARGS += -cppcoreguidelines-pro-type-vararg - -# keep pointer arithmetic -CLANG_TIDY_EXTRA_ARGS += -cppcoreguidelines-pro-bounds-pointer-arithmetic - -# don't have GSL (for now) -CLANG_TIDY_EXTRA_ARGS += -cppcoreguidelines-pro-bounds-constant-array-index - -CLANG_TIDY_FILTER = $(SED) 's%\[\([a-z-]\+\)\]$$%[https://clang.llvm.org/extra/clang-tidy/checks/\1.html]%' -CLANG_TIDY_CHECKS ?= -$(subst $(space),,*,clang-analyzer-*,-clang-analyzer-cplusplus*,modernize-*,portability-*,cppcoreguidelines-*$(addprefix $(comma),$(CLANG_TIDY_EXTRA_ARGS))) -CLANG_TIDY ?= clang-tidy -checks=$(CLANG_TIDY_CHECKS) - -clean: clang-tidy-clean -clang-tidy-clean: - rm -f clang-tidy-cache*.tmp -CLANG_TIDY_CACHE_CPP = clang-tidy-cache-cpp.tmp -$(CLANG_TIDY_CACHE_CPP): $(LOCAL_CPP) - $(CLANG_TIDY) $(LOCAL_CPP) -- $(FINAL_INCLUDE) -x c++ | $(CLANG_TIDY_FILTER) | tee $@ - -clang-tidy-h-c-cpp: -ifneq ($(CLANG_TIDY_H_C_CPP),) - $(CLANG_TIDY) $(CLANG_TIDY_H_C_CPP) -- $(FINAL_INCLUDE) -endif -clang-tidy-h-c: -ifneq ($(CLANG_TIDY_H_C_C),) - $(CLANG_TIDY) $(CLANG_TIDY_H_C) -- $(FINAL_INCLUDE) -endif -clang-tidy-h-cpp: -ifneq ($(CLANG_TIDY_H_CPP),) - $(CLANG_TIDY) $(CLANG_TIDY_H_CPP) -- $(FINAL_INCLUDE) -x c++ -endif -clang-tidy-h: clang-tidy-h-c clang-tidy-h-cpp clang-tidy-h-c-cpp - -clang-tidy-c: -ifneq ($(LOCAL_C),) - $(CLANG_TIDY) $(LOCAL_C) -- $(FINAL_INCLUDE) -endif -clang-tidy-cpp: $(CLANG_TIDY_CACHE_CPP) - cat $< -clang-tidy: clang-tidy-h clang-tidy-c clang-tidy-cpp - -endif # ifndef TARGETS_TOOLS_MK_INCLUDED diff --git a/make/test-exe.mk b/make/test-exe.mk deleted file mode 100644 index c0394b72..00000000 --- a/make/test-exe.mk +++ /dev/null @@ -1,32 +0,0 @@ -# generic utility modules -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -EXE_BASENAME ?= test-$(notdir $(shell $(PWD))) - -include $(JWBDIR)/make/run.mk - -all: $(EXE) -install: -clean: execlean localclean profclean testclean -distclean: -run test: all.dirs $(EXE) $(EXE_BIN) -strace: $(EXE) $(EXE_BIN) -test: test.done - -test.done: - if ! 2>&1 make run > test.out 2>&1; then \ - $(CAT) test.out; \ - exit 1; \ - fi - touch $@ - -testclean: - $(RM) -rf test.done test.out - -ifeq ($(USE_PROJECT_LIB),true) -$(LIB_SO): $(LIB_A) -$(EXE): $(LIB_SO) -endif -all.dirs: diff --git a/make/test-java.mk b/make/test-java.mk deleted file mode 100644 index 56b33cde..00000000 --- a/make/test-java.mk +++ /dev/null @@ -1,13 +0,0 @@ -all: -install: -clean: -distclean: - -JAVA_TEST_MAIN_JAVA = $(JAVA_SRC_DIR)/$(JAVA_TEST_MAIN_CLASS).java -#JAVA_TEST_MAIN_CLASSFILE = $(JAVA_SRC_DIR)/$(JAVA_TEST_MAIN_CLASS).class -JAVA_SRC += $(JAVA_TEST_MAIN_JAVA) - -#include $(JWBDIR)/make/java.mk - -run test: $(JAVA_CLASSFILES) - CLASSPATH=$(shell echo $(CLASSPATH) | sed 's/ */:/g') time -p java $(JAVA_JVM_OPTS) $(JAVA_TEST_MAIN_CLASS) $(EXE_ARGS) diff --git a/make/tex.mk b/make/tex.mk deleted file mode 100644 index 4991cbf4..00000000 --- a/make/tex.mk +++ /dev/null @@ -1,433 +0,0 @@ -# generic utility modules -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -# -- project data -CUSTOMER ?= jannet -PROJECT ?= legal -TOPIC ?= $(notdir $(shell $(PWD))) -VERSION ?= $(shell sed "s/-dev$$//" VERSION) -AUTHORS ?= -#TITLE ?= Allgemeine Bedingungen für -#SUBTITLE ?= Dienstgüte-Vereinbarungen -DATE ?= $(shell date +'%Y/%m/%d') -#CONFIDENTIAL_REMARK ?= Vertraulich -BEAMER_HANDOUT ?= false -BEAMER_ASPECTRATIO ?= 169 - -# -- files -MAIN ?= main -HEADER ?= header -FRONTPAGE ?= frontpage -OUTPUT ?= $(patsubst %-dev,%,$(TOPIC)-$(VERSION)) -DISTDIR ?= dist - -# -- dependencies -LOCAL_PREREQ ?= Makefile cfg.mk main.tex.tmpl \ - $(wildcard *.tex) - -# -- formatting -#DOCUMENT_CLASS ?= book -ifneq ($(MAKECMDGOALS),html) -DOCUMENT_CLASS ?= article -else -DOCUMENT_CLASS ?= article -endif -TEX_TMPL_BASE_DIR ?= $(JWBDIR)/tmpl/tex -TEX_TMPL_STYLE ?= de_technical -TEX_TMPL_DIR ?= $(TEX_TMPL_BASE_DIR)/$(TEX_TMPL_STYLE) -IMPORTED_TEMPLATES ?= $(shell ls $(TEX_TMPL_DIR)/*.tmpl) -WWW_IMAGEDIR ?= $(PROJECTS_DIR)/jw-build/htdocs/images/logo-janware/ -FRONTLOGO_PDF ?= logo-janware.pdf -FRONTLOGO_EPS ?= janware-frontpage-top-right.png -FRONTLOGO_WEB ?= janware-frontpage-top-right.png -ICON_UP ?= up.png -ICON_PREV ?= prev.png -ICON_NEXT ?= next.png -ICON_INDEX ?= index.png -ICON_CONTENTS ?= contents.png - -# -- web publishing -HTMLDIR ?= $(TOPIC) -TARGET_HOST ?= cvs.janware.com -TARGET_DIR ?= /home/wwwrun/dat/htdocs/jannet.de_443/upload/$(CUSTOMER)/projects/$(PROJECT)/doc/$(TOPIC) -TARGET_DIR_MODE ?= 755 -TARGET_FILE_MODE ?= 644 -TARGET_USER ?= root - -UPLOAD_MODULE ?= doc/$(TOPIC) -UPLOAD_FILE_MODE ?= 644 -UPLOAD_DIR_MODE ?= 755 - -include $(JWBDIR)/make/tag-defs.mk -include $(JWBDIR)/make/tag-rules.mk - -ifeq ($(TEX_TMPL_DIR), "") - TEX_TMPL_DIR = thisisnotadirectory -endif -latex = latex -PDFLATEX ?= pdflatex -PDF_VIEWER ?= $(firstword $(shell which okular kpdf acroread)) -CAT ?= cat -SED ?= sed -COMPILATION_RUN_NAMES ?= 1 2 3 - -# this is what is there already -PRE_FIG_LOCAL = $(wildcard *.fig) -PRE_TEX_LOCAL = $(wildcard *.tex) -PRE_TMPL_LOCAL = $(wildcard *.tmpl *.ger) -PRE_HTML_LOCAL = $(wildcard *.html) -PRE_FIG_REMOTE = $(foreach dir,$(TEX_TMPL_DIR),$(wildcard $(dir)/*.fig)) -PRE_TEX_REMOTE = $(foreach dir,$(TEX_TMPL_DIR),$(wildcard $(dir)/*.tex)) -PRE_TMPL_REMOTE = $(foreach dir,$(TEX_TMPL_DIR),$(wildcard $(dir)/*.tmpl $(dir)/*.ger)) -PRE_HTML_REMOTE = $(foreach dir,$(TEX_TMPL_DIR),$(wildcard $(dir)/*.html)) - -# this is what should be there -FILES_FROM_TMPL = $(notdir $(patsubst %.ger,%.tex,$(patsubst %.tmpl,%,$(PRE_TMPL_REMOTE) $(PRE_TMPL_LOCAL)))) -EPS_FROM_FIG = $(notdir $(patsubst %.fig,%.png,$(PRE_FIG_REMOTE) $(PRE_FIG_LOCAL))) -FILES_COPIED = $(notdir $(wildcard $(TEX_TMPL_DIR)/*.html $(TEX_TMPL_DIR)/*.tex)) -GENERATED += $(FILES_FROM_TMPL) $(EPS_FROM_FIG) $(FILES_COPIED) $(FRONTLOGO_PDF) -GENERATED_TEX = $(filter %.tex,$(GENERATED)) -GENERATED_EPS = $(filter %.png,$(GENERATED)) -GENERATED_HTML = $(filter %.html,$(GENERATED)) - -CMD_PARSE_GRAPHICS = $(SED) '/includegraphics/ !d; s/[^{]*{\([^}]*\).*/\1/; /^\.\./ d; s/^.\///' *.tex *.tmpl | sort -u - -CONTACT_EMAIL ?= contact@janware.com -ifeq ($(DIST_VERSION),) -DIST_VERSION = $(VERSION) -endif - -# all -TEX = $(PRE_TEX_LOCAL) $(GENERATED_TEX) -EPS = $(GENERATED_EPS) -HTML = $(PRE_HTML_LOCAL) $(GENERATED_HTML) - -LATEX_INPUT = $(TEX) $(EPS) -HTML_INPUT = $(HTML) $(IMAGES) - -# this comes in handy -DATE_FORMAT ?= '%b, %d, %Y' -DATE := $(if $(DATE),$(shell date +$(DATE_FORMAT) --date $(DATE)),$(shell date +$(DATE_FORMAT))) -TEX_WARN_DONT_EDIT = "\ -%+---------------------------------------------------+\n\ -%| DO NOT EDIT THIS FILE! |\n\ -%| It was automatically created during the build |\n\ -%| process! |\n\ -%+---------------------------------------------------+\n" -HTML_WARN_DONT_EDIT = "\ -" -WD = $(shell $(PWD)) - -IMAGES = $(patsubst %,$(IMAGEDIR)/%,$(FRONTLOGO_EPS) $(FRONTLOGO_WEB) $(FRONTLOGO_PDF) \ - $(ICON_UP) $(ICON_PREV) $(ICON_NEXT) $(ICON_INDEX) $(ICON_CONTENTS)) \ - -#LOCAL_IMPORTED_TEMPLATES = $(notdir $(IMPORTED_TEMPLATES)) -#FMT_OFFLINE = tex dvi ps pdf txt -FMT_OFFLINE = tex pdf # txt -FMT = $(FMT_OFFLINE) html -OUT = $(DISTDIR)/$(OUTPUT) -FMT_OUT = $(patsubst %,$(OUT).%.zip,$(FMT)) -FMT_OFFLINE_OUT = $(patsubst %,$(OUT).%.zip,$(FMT_OFFLINE)) -ALL = $(FMT_OUT) html_install -#PRE_HTML = $(patsubst %.tmpl,%,$(wildcard *.html.tmpl)) -#LINETMPL = $(wildcard *.linetmpl) -#TEXFROMGER = $(patsubst %.ger,%.tex,$(wildcard *.ger)) -#TMPL = $(wildcard *.tmpl) -#FILEFROMTMPL = $(patsubst %.tmpl,%,$(TMPL)) -#GERFROMLINETMPL = $(patsubst %.linetmpl,%,$(wildcard *.linetmpl)) -#PRE_TEX = $(patsubst %.ger,%.tex,\ -# $(patsubst %.tmpl,%,$(wildcard *.tex.tmpl *.ger.tmpl) $(LOCAL_IMPORTED_TEMPLATES)) \ -# $(GERFROMLINETMPL)) $(TEXFROMGER) -NEWDIRS = $(DISTDIR) $(HTMLDIR) $(DVIDIR) - -ifeq ($(DOCUMENT_CLASS),) -DOCUMENT_CLASS = article -endif - -ifeq ($(BEAMER_HANDOUT),true) -DOCUMENT_CLASS_OPTIONS += ,handout -endif - -ifneq ($(BEAMER_ASPECTRATIO),) -DOCUMENT_CLASS_OPTIONS += ,aspectratio=$(BEAMER_ASPECTRATIO) -endif - -ifneq ($(BEAMER_HANDOUT),true) -BEAMER_ANIMATION_FRAMES ?= 36 -else -BEAMER_ANIMATION_FRAMES ?= 1 -endif - -define mangle_tmpl - @echo "+ generating $< -> $@" - @if [ $(suffix $@) = tex ]; then echo -e $(TEX_WARN_DONT_EDIT) > $@; fi - @if [ $(suffix $@) = html ]; then echo -e $(HTML_WARN_DONT_EDIT) > $@; fi - $(CAT) $< | $(SED) -e "\ - s%__DATE__%$(DATE)%g; \ - s%__AUTHORS__%$(AUTHORS)%g; \ - s%__CONTACT_EMAIL__%$(CONTACT_EMAIL)%g; \ - s%__TITLE__%$(TITLE)%g; \ - s%__VERSION__%$(DIST_VERSION)%g; \ - s%__CUSTOMER__%$(CUSTOMER)%g; \ - s%__TOPIC__%$(TOPIC)%g; \ - s%__SUBTITLE__%$(SUBTITLE)%g; \ - s%__CONFIDENTIAL_REMARK__%$(CONFIDENTIAL_REMARK)%g; \ - s%__HEADER__%$(HEADER)%g; \ - s%__FRONTPAGE__%$(FRONTPAGE)%g; \ - s%__FRONTLOGO_EPS__%$(IMAGEDIR)/$(FRONTLOGO_EPS)%g; \ - s%__FRONTLOGO_PDF__%$(FRONTLOGO_PDF)%g; \ - s%__FRONTLOGO_WEB__%$(FRONTLOGO_WEB)%g; \ - s%__ICON_UP__%$(ICON_UP)%g; \ - s%__ICON_INDEX__%$(ICON_INDEX)%g; \ - s%__ICON_CONTENTS__%$(ICON_CONTENTS)%g; \ - s%__ICON_PREV__%$(ICON_PREV)%g; \ - s%__ICON_NEXT__%$(ICON_NEXT)%g; \ - s%__DOCUMENT_CLASS__%$(DOCUMENT_CLASS)%g; \ - s%__UPLOAD_MODULE_PATH__%$(UPLOAD_MODULE_PATH)%g; \ - s%__UPLOAD_TEST_PREFIX__%$(UPLOAD_TEST_PREFIX)%g; \ - s%__DOCUMENT_CLASS_OPTIONS__%$(DOCUMENT_CLASS_OPTIONS)%g; \ - s%__ANIMATION_FRAMES__%$(BEAMER_ANIMATION_FRAMES)%g; \ - s%ä%\\\\\"a%g; \ - s%Ä%\\\\\"A%g; \ - s%ö%\\\\\"o%g; \ - s%Ö%\\\\\"O%g; \ - s%ü%\\\\\"u%g; \ - s%Ü%\\\\\"U%g; \ - s%ß%\\\"s%g; \ - s%\xc3\xa4%\\\\\"a%g; \ - s%\xc3\x84%\\\\\"A%g; \ - s%\xc3\xb6%\\\\\"o%g; \ - s%\xc3\x96%\\\\\"O%g; \ - s%\xc3\xbc%\\\\\"u%g; \ - s%\xc3\x9c%\\\\\"U%g; \ - s%\xc3\x9f%\\\"s%g; \ - " | awk ' \ - BEGIN { FS=":" } { \ - if ($$0 ~ /SUBST_LINE_NUM/) { \ - start=$$1; patt=$$2; file=$$3; \ - regex=$$4; offset=$$5; rest=$$6; \ - grepcmd="grep -n \042" regex "\042 " file; \ - grepcmd | getline; \ - linenum=$$1; \ - print start linenum rest \ - } else { print $$0 } } \ - ' >> $@.tmp - @mv $@.tmp $@ -endef - -first_target: dirs $(ALL) - -tex: dirs $(OUT).tex.zip -dvi: dirs $(OUT).dvi.zip -ps: dirs $(OUT).ps.zip -txt: dirs $(OUT).txt.zip -html: dirs $(OUT).html.zip -pdf: dirs $(OUT).pdf.zip -odt: dirs $(OUT).odt -texsrc: $(GENERATED) - -# generate from remote rules -%.png: $(TEX_TMPL_DIR)/%.fig - fig2dev -L png $< $@ - -%.html: $(TEX_TMPL_DIR)/%.html - cp $< $@ - -%.tex: $(TEX_TMPL_DIR)/%.tex - cp $< $@ - -%.tex: %.tex.tmpl - $(mangle_tmpl) - -%.tex: $(TEX_TMPL_DIR)/%.tex.tmpl - $(mangle_tmpl) - -%.html: $(TEX_TMPL_DIR)/%.html.tmpl - $(mangle_tmpl) - -# generate from local rules -%.png: %.fig - fig2dev -L png $< $@ - -%.tex: %.ger - $(mangle_tmpl) - -%: %.tmpl - $(mangle_tmpl) - -$(FRONTLOGO_PDF): $(WWW_IMAGEDIR)/$(patsubst %.pdf,%.svg,$(FRONTLOGO_PDF)) - inkscape --export-filename="$@" $< - -%.pdf: %.svg - inkscape --export-filename="$@" $< - -$(WWW_IMAGEDIR)/%.svg: %.svg - cp $< $@ - -$(CVS_IMAGEDIR)/%.svg: %.svg - cp $< $@ - -$(CVS_IMAGEDIR)/%.png: %.png - cp $< $@ - -cfgtest.done: - test -n "$(OUTPUT)" # OUTPUT - test -n "$(DISTDIR)" # DISTDIR - test -n "$(HTMLDIR)" # HTMLDIR - test -n "$(TARGET_HOST)" # TARGET_HOST - test -n "$(TARGET_DIR)" # TARGET_DIR - test -n "$(TARGET_DIR_MODE)" # TARGET_DIR_MODE - test -n "$(TARGET_FILE_MODE)" # TARGET_FILE_MODE - test -n "$(TARGET_USER)" # TARGET_USER - test -n "$(MAIN)" # MAIN - test -n "$(FRONTPAGE)" # FRONTPAGE - test -n "$(IMAGES)" # IMAGES - test -n "$(AUTHORS)" # AUTHORS - test -n "$(TITLE)" # TITLE - test -n "$(SUBTITLE)" # SUBTITLE - test -d $(WWW_IMAGEDIR) # IMAGEDIR - @for IMG in $(IMAGES); do if [ ! -f $$IMG ]; then echo "$$IMG is missing"; exit 1; fi; done - test -n "$(VERSION)" # VERSION - touch $@ - -test: - @echo TEX_TMPL_DIR = $(TEX_TMPL_DIR) - @echo GENERATED = $(GENERATED) - @echo FILES_FROM_TMPL = $(FILES_FROM_TMPL) - @echo EPS_FROM_FIG = $(EPS_FROM_FIG) - -cfgtest: cfgtest.done - -#%.clean: -# $(RM) -rf $(OUT).%.zip - -dirs.done: - mkdir -p $(NEWDIRS) - touch dirs.done - -dirs: dirs.done - -arch: - test $(shell uname -s) = Linux - -xdvi: $(LATEX_INPUT) - @echo "-- running latex just once ..." - $(latex) $(MAIN).tex - xdvi $(MAIN).dvi - -xpdf: $(LATEX_INPUT) - @echo "-- running latex just once ..." - $(PDFLATEX) $(MAIN).tex - $(PDF_VIEWER) $(MAIN).pdf - -$(OUT).tex.zip: cfgtest $(LATEX_INPUT) - @echo "-- creating zipfile with tex source files" - zip $@ $(LATEX_INPUT) 2>/dev/null - -#$(OUTPUT).dvi: $(LATEX_INPUT) -# @echo "-- creating dvi file" -# $(latex) $(MAIN).tex; $(latex) $(MAIN).tex; $(latex) $(MAIN).tex; -# cp $(MAIN).dvi $@ - -#$(OUT).dvi.zip: $(OUTPUT).dvi -# zip $@ $^ - -#$(OUTPUT).txt: $(OUTPUT).dvi -# @echo "-- creating plain ascii file" -# dvi2tty $< -w100 -o $@ - -#$(OUT).txt.zip: $(OUTPUT).txt -# zip $@ $< - -TEX4HT_FIRST_LATEX_LINE = \ - '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"\#\#1"{\Link\#\#1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link\#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[\#1,html,3,sections+]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{\#1,html,3}\def\HCode\#\#\#\#1{\documentstyle[tex4ht,3}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode .a.b.c.\input' - -$(HTMLDIR): $(LATEX_INPUT) $(HTML_INPUT) - test $(MAIN) != index - $(RM) -rf $@ - mkdir -p $@ - latex $(TEX4HT_FIRST_LATEX_LINE) $(MAIN) - latex $(TEX4HT_FIRST_LATEX_LINE) $(MAIN) - latex $(TEX4HT_FIRST_LATEX_LINE) $(MAIN) - tex4ht $(MAIN) - t4ht -d$(HTMLDIR) $(MAIN) - #$(CAT) index_head.html $(MAIN.html) index_tail.html > index.html - $(CAT) $(MAIN.html) > index.html - mv *.html *.css $(HTMLDIR) - mkdir -p $(addprefix $(HTMLDIR)/,$(sort $(dir $(shell $(CMD_PARSE_GRAPHICS))))) - for g in $(sort $(shell $(CMD_PARSE_GRAPHICS))); do cp $$g $(HTMLDIR)/$$g; done - #cp -p $(IMAGES) $(HTMLDIR) - touch $@ - -$(OUT).html.zip: $(HTMLDIR) - @echo "-- creating zipfile with html source files" - zip -r $@ $(HTMLDIR) - -#$(OUTPUT).ps: $(OUTPUT).dvi -# @echo "-- creating postscript file" -# dvips -f $< > $(OUTPUT).ps - -#$(OUT).ps.zip: $(OUTPUT).ps -# zip $@ $< - -$(OUTPUT).pdf: $(GENERATED) - @echo "-- creating pdf file" - @for i in $(COMPILATION_RUN_NAMES) ; do \ - if [ $$i != $(lastword $(COMPILATION_RUN_NAMES)) ]; then dm="-draftmode"; else dm=""; fi ;\ - echo ================================================================== pass $$i: running $(PDFLATEX) $$dm $(MAIN).tex ;\ - $(PDFLATEX) $$dm $(MAIN).tex || exit 1 ;\ - done - @mv $(MAIN).pdf $(OUTPUT).pdf - -$(OUT).pdf.zip: $(OUTPUT).pdf - zip $@ $< - -$(OUTPUT).odt: $(GENERATED) - @echo "-- creating odt file" - mk4ht oolatex $(MAIN).tex - mv $(MAIN).odt $(OUTPUT).odt - -html_install: $(HTMLDIR) - @echo "-- installing html 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 --delete -v --links -e $(CVS_RSH) $(HTMLDIR)/* $(TARGET_USER)@$(TARGET_HOST):$(TARGET_DIR) - $(CVS_RSH) -l $(TARGET_USER) $(TARGET_HOST) -C "\ - cd $(TARGET_DIR); find . -type d | xargs chmod $(TARGET_DIR_MODE); find . -type f | xargs chmod $(TARGET_FILE_MODE)" - -clean: - @echo "-- cleaning up ..." - $(RM) -rf *.maf *.mtc *.mtc0 *.ptc1 \ - *.aux *.toc *.dvi *.pdf *.ps *~ *.log *.done *.rep *.nav *.snm *.tdo \ - *.4ct *.4tc *.4of *.4oo *.4os *.4og */*.4og *.css *.html *.idv *.lg *.xref *.odt \ - *.lol *.bak *.idx *.ilg *.ind *.out *.brf .\#* \#* *.vrb \ - $(NEWDIRS) $(OUTPUT).txt \ - $(GENERATED) \ - $(CLEAN) - -priceclean: clean - for f in `grep -i euro *.tmpl | cut -d: -f1 | sort -u`; do \ - grep -vi euro $$f > $$f.new ;\ - mv $$f.new $$f ;\ - done - -view: pdf - $(PDF_VIEWER) $(OUTPUT).pdf - -unzip: - unzip *.zip - -%-handout: - BEAMER_HANDOUT=true make $* - -UPLOAD_FILES = $(OUTPUT).pdf - -include $(JWBDIR)/make/upload.mk diff --git a/make/text.mk b/make/text.mk deleted file mode 100644 index e4f6d9c1..00000000 --- a/make/text.mk +++ /dev/null @@ -1,13 +0,0 @@ -# generic utility modules -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -include $(JWBDIR)/make/defs.mk -include $(JWBDIR)/make/rules.mk - -all: -install: -distclean: textclean localclean -clean: textclean localclean -test: diff --git a/make/textest.mk b/make/textest.mk deleted file mode 100644 index 55f8abab..00000000 --- a/make/textest.mk +++ /dev/null @@ -1,34 +0,0 @@ -SOURCES = $(wildcard *.tex) -PDF_VIEWER ?= $(firstword $(shell which okular acroread)) -PNG_VIEWER ?= $(firstword $(shell which qiv gimp)) -MAIN_TEX ?= $(firstword $(wildcard main.tex *.tex)) -MAIN ?= $(patsubst %.tex,$(MAIN_TEX)) -OUT_PDF ?= $(notdir $(shell $(PWD))).pdf -OUT_PNG ?= $(patsubst %.pdf,%.png,$(OUT_PDF)) -PNG_WIDTH ?= 200 - -all: pdf -clean: clean.files -install: -distclean: - -pdf: $(OUT_PDF) -png: $(OUT_PNG) - -view: $(OUT_PDF) - $(PDF_VIEWER) $< - -view-png: $(OUT_PNG) - $(PNG_VIEWER) $< - -$(OUT_PDF): $(SOURCES) - pdflatex $(MAIN_TEX) - test -e $(basename $(MAIN_TEX)).pdf - if [ "$(basename $(MAIN_TEX)).pdf" != "$(OUT_PDF)" ]; then mv $(basename $(MAIN_TEX)).pdf $(OUT_PDF); fi - touch $@ - -$(OUT_PNG): $(OUT_PDF) - convert -density 400 -scale x$(PNG_WIDTH) $< $@ - -clean.files: - $(RM) -rf *.done *.aux *.log *.pdf *.nav *.out *.snm *.toc .*.swp $(OUT_PNG) *.vrb diff --git a/make/theme-images.mk b/make/theme-images.mk deleted file mode 100644 index 13f3899e..00000000 --- a/make/theme-images.mk +++ /dev/null @@ -1,34 +0,0 @@ -include $(JWBDIR)/make/defs.mk -include $(JWBDIR)/make/rules.mk - -BASEDIR = $(PROJECT_HTML_THEMES_DIR)/$(patsubst theme-%,%,$(PROJECT))/images - -GENERATED_IMAGES = $(shell find . -name generate.conf | xargs -r dirname | \ - while read d; do sed "s%^%$$d/%" $$d/generate.conf; done) - -all: -install: install-images.done -clean: doneclean -distclean: - -%-greyed-out.png: %.png - /bin/bash $(JWB_SCRIPT_DIR)/convert-to-greyed-out-image.sh $< $@.tmp - mv $@.tmp $@ - -basedir.done: - $(INSTALL) -d -m $(IMGDIRMODE) -o $(IMGDIROWNER) -g $(IMGDIRGROUP) $(BASEDIR) - touch $@ - -generate.done: $(GENERATED_IMAGES) - -install-images.done: basedir.done generate.done $(INSTALLED_IMG) - for d in `find . -type d -a ! -name . -a ! -name CVS`; do \ - $(INSTALL) -d -m $(IMGDIRMODE) -o $(IMGDIROWNER) -g $(IMGDIRGROUP) $(BASEDIR)/$$d ;\ - done - for f in `find . -name '*.png' -o -name '*.jpg' -o -name '*.gif'`; do \ - $(INSTALL) -p -m $(IMGMODE) -o $(IMGOWNER) -g $(IMGGROUP) $$f $(BASEDIR)/$$f ;\ - done - touch $@ - -blah: - @echo GENERATED_IMAGES = $(GENERATED_IMAGES) diff --git a/make/tmpl.mk b/make/tmpl.mk deleted file mode 100644 index 425e3da8..00000000 --- a/make/tmpl.mk +++ /dev/null @@ -1,22 +0,0 @@ -include $(JWBDIR)/make/defs.mk - -# -- TMPL -INSTALLATION_FILE_TYPES += TMPL -BUILD_TMPLDIR = $(TOPDIR)/tmpl -LOCAL_TMPL += $(filter-out $(DONT_INSTALL),$(wildcard *.tmpl)) -ifndef TMPL_SUBDIR - TMPL_SUBDIR := $(shell $(PWD) | $(SED) '/.*\/tmpl\(\/\|$$\)/!d; s%.*/tmpl\(/\|$$\)%%') -endif -ifeq ($(TMPL_SUBDIR),) - INSTALL_TMPLDIR = $(PROJECT_TMPLDIR) -else - INSTALL_TMPLDIR = $(PROJECT_TMPLDIR)/$(TMPL_SUBDIR) -endif -INSTALLED_TMPL += $(addprefix $(INSTALL_TMPLDIR)/,$(LOCAL_TMPL)) - -include $(JWBDIR)/make/rules.mk - -all: -install: install_TMPL -clean: textclean localclean doneclean -test: diff --git a/make/tools-matlab.mk b/make/tools-matlab.mk deleted file mode 100644 index ad14c8e0..00000000 --- a/make/tools-matlab.mk +++ /dev/null @@ -1 +0,0 @@ -include $(JWBDIR)/make/dummy.mk diff --git a/make/tools.mk b/make/tools.mk deleted file mode 100644 index 15fdb465..00000000 --- a/make/tools.mk +++ /dev/null @@ -1,20 +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/profiler-defs.mk -include $(JWBDIR)/make/targets-tools.mk -include $(JWBDIR)/make/cpp-extra-targets.mk -include $(JWBDIR)/make/depend.mk -include $(JWBDIR)/make/backup.mk -include $(JWBDIR)/make/dev-utils.mk - -FINAL_CFLAGS += -D_USRDLL -DALL_EXPORTS -FINAL_CXXFLAGS += -D_USRDLL -DALL_EXPORTS - -ifneq ($(SRC_ALL_CPP),) -all: all.done -endif diff --git a/make/topdir-autoconf.mk b/make/topdir-autoconf.mk deleted file mode 100644 index 45508927..00000000 --- a/make/topdir-autoconf.mk +++ /dev/null @@ -1,11 +0,0 @@ -AUTOCONF_IN := $(wildcard *.in */*.in */*/*.in) -# AUTOCONF_IN := $(shell find . -maxdepth 3 -name '*.in' | grep -v dist) -AUTOCONF_GENERATED := $(patsubst %.in,%,$(AUTOCONF_IN)) - -include $(JWBDIR)/make/topdir.mk - -ifneq ($(AUTOCONF_IN),) - ifneq ($(AUTOCONF_GENERATED),$(wildcard $(AUTCONF_GENERATED))) - include $(JWBDIR)/make/autoconf.mk - endif -endif diff --git a/make/upload-defs-rpm.mk b/make/upload-defs-rpm.mk deleted file mode 100644 index ccbb2596..00000000 --- a/make/upload-defs-rpm.mk +++ /dev/null @@ -1,45 +0,0 @@ -# this makefile needs -# PCKG_ROOT -# VERSION -# JWB_SCRIPT_DIR - -#UPLOAD_SH = $(JWB_SCRIPT_DIR)/upload.sh -#MKSPEC_SH = $(JWB_SCRIPT_DIR)/mkspec-wrapper.sh $(TOPDIR)/make/mkspec.sh - -#FTP_FILE_MODE ?= 640 -#FTP_DIR_MODE ?= 750 -#FTP_SRC_GROUP ?= spidsrc -#FTP_SRC_USER ?= $(shell whoami) -#FTP_RUN_GROUP ?= spidrun -#FTP_RUN_USER ?= $(shell whoami) -#FTP_DEV_GROUP ?= spiddev -#FTP_DEV_USER ?= $(shell whoami) -#FTP_HOST ?= pkg.janware.com -#FTP_HOST_LOGIN ?= root -# -#OS_NAME = $(shell echo $(OS_NAME_VERSION) | sed 's/-.*//') -#OS_VERSION = $(shell echo $(OS_NAME_VERSION) | sed 's/[^-]\+-//') -# -## $(FTP_PCKG_DIR)/linux/$(OS_NAME)/$(OS_VERSION)/rpm/src -#FTP_PCKG_DIR ?= /pub/packages -#PCKG_ROOT ?= $(FTP_PCKG_DIR)/linux/$(OS_NAME)/$(OS_VERSION) -##PCKG_ROOT = $(FTP_PCKG_DIR)/$(RPM_PROJECT) -#CURRENT_SRC = $(warning PCKG_ROOT=$(PCKG_ROOT))$(PCKG_ROOT)/tgz/$(PCKG_TAR) -#CURRENT_RPM_RUN_I386 = $(PCKG_ROOT)/$(RPM_ARCH)/$(PCKG_RPM_RUN_I386) -#CURRENT_RPM_DEVEL_I386 = $(PCKG_ROOT)/$(RPM_ARCH)/$(PCKG_RPM_DEVEL_I386) -#CURRENT_RPM_SRC = $(PCKG_ROOT)/src/$(PCKG_RPM_SRC) -#REMOTE_TARGET_PREFIX = rsync_ssh://$(FTP_HOST_LOGIN)@$(FTP_HOST):/srv/ftp -#REMOTE_TARGETS = \ -# $(REMOTE_TARGET_PREFIX)$(CURRENT_SRC):$(FTP_FILE_MODE):$(FTP_DIR_MODE):$(FTP_SRC_USER).$(FTP_SRC_GROUP) \ -# $(REMOTE_TARGET_PREFIX)$(CURRENT_RPM_RUN_I386):$(FTP_FILE_MODE):$(FTP_DIR_MODE):$(FTP_RUN_USER).$(FTP_RUN_GROUP)\ -# $(REMOTE_TARGET_PREFIX)$(CURRENT_RPM_SRC):$(FTP_FILE_MODE):$(FTP_DIR_MODE):$(FTP_SRC_USER).$(FTP_SRC_GROUP) -# -#ifeq ($(CREATE_DEVEL),true) -#REMOTE_TARGETS += \ -# $(REMOTE_TARGET_PREFIX)$(CURRENT_RPM_DEVEL_I386):$(FTP_FILE_MODE):$(FTP_DIR_MODE):$(FTP_DEV_USER).$(FTP_DEV_GROUP) -#endif - -# $(REMOTE_TARGET_PREFIX)$(PCKG_ROOT)/CURRENT_SRC:$(FTP_FILE_MODE):$(FTP_DIR_MODE):$(FTP_SRC_USER).$(FTP_SRC_GROUP) \ -# $(REMOTE_TARGET_PREFIX)$(PCKG_ROOT)/CURRENT_RPM_SRC:$(FTP_FILE_MODE):$(FTP_DIR_MODE):$(FTP_SRC_USER).$(FTP_SRC_GROUP) -# $(REMOTE_TARGET_PREFIX)$(PCKG_ROOT)/CURRENT_RPM_RUN_I386:$(FTP_FILE_MODE):$(FTP_DIR_MODE):$(FTP_RUN_USER).$(FTP_RUN_GROUP) \ -# $(REMOTE_TARGET_PREFIX)$(PCKG_ROOT)/CURRENT_RPM_DEVEL_I386:$(FTP_FILE_MODE):$(FTP_DIR_MODE):$(FTP_DEV_USER).$(FTP_DEV_GROUP) diff --git a/make/upload-rules.mk b/make/upload-rules.mk deleted file mode 100644 index 9b1c645b..00000000 --- a/make/upload-rules.mk +++ /dev/null @@ -1,17 +0,0 @@ -all: -upload.dist: - if [ -f configure -o -f configure.ac -o -f configure.ac.tmpl ]; then make config; fi - make $(REMOTE_TARGETS) - touch $@.done - -yupdate.%.dist: - sudo -u root $(HOME)/bin/yupdate.sh -f $(HOME)/.yupdaterc -s $* - touch $@ - -CURRENT_%: - echo $($(notdir $@)) > $@ - -clean: upload.clean - -upload.clean: - $(RM) -f upload.dist yupdate.*.dist diff --git a/make/upload.mk b/make/upload.mk deleted file mode 100644 index 37e5bc61..00000000 --- a/make/upload.mk +++ /dev/null @@ -1,31 +0,0 @@ -include $(JWBDIR)/make/upload-defs.mk - -UPLOAD_LAST_VERSION_FILE ?= LAST_UPLOADED_VERSION -UPLOAD_LAST_VERSION ?= $(shell $(CAT) $(UPLOAD_LAST_VERSION_FILE) 2>/dev/null) - -all: -upload: upload.dist - -upload.dist: $(UPLOAD_FILES) -ifneq ($(UPLOAD_LAST_VERSION),$(VERSION)) - make $(REMOTE_TARGETS) -ifeq ($(UPLOAD_TEST_PREFIX),) - echo $(VERSION) > $(UPLOAD_LAST_VERSION_FILE) - $(UPLOAD_SCM) add $(UPLOAD_LAST_VERSION_FILE) || exit 0 - $(UPLOAD_SCM) commit -m "$(VERSION)" $(UPLOAD_LAST_VERSION_FILE) -endif -endif - touch $@.done - -is-uploaded: -ifneq ($(UPLOAD_LAST_VERSION),$(VERSION)) - echo $(VERSION) > $(UPLOAD_LAST_VERSION_FILE) - $(UPLOAD_SCM) add $(UPLOAD_LAST_VERSION_FILE) - $(UPLOAD_SCM) commit -m "`cat $(UPLOAD_LAST_VERSION_FILE)`" $(UPLOAD_LAST_VERSION_FILE) -endif - touch upload.dist.done - -clean: upload.clean - -upload.clean: - $(RM) -f upload.dist diff --git a/make/vim.mk b/make/vim.mk deleted file mode 100644 index a2b862c0..00000000 --- a/make/vim.mk +++ /dev/null @@ -1,2 +0,0 @@ -INSTALL_VIM_SYSTEM_PATH = $(ENV_PREFIX)/usr/share/vim/site -INSTALL_VIM_SYSTEM_PLUGIN_PATH = $(INSTALL_VIM_SYSTEM_PATH)/plugin diff --git a/make/winres.rc.tmpl b/make/winres.rc.tmpl deleted file mode 100644 index f3318605..00000000 --- a/make/winres.rc.tmpl +++ /dev/null @@ -1,53 +0,0 @@ -#include - -#define VER_FILEVERSION __VER_FILEVERSION__ -#define VER_FILEVERSION_STR "__VER_FILEVERSION_STR__\0" - -#define VER_PRODUCTVERSION __VER_PRODUCTVERSION__ -#define VER_PRODUCTVERSION_STR "__VER_PRODUCTVERSION_STR__\0" - -#ifndef DEBUG -#define VER_DEBUG 0 -#else -#define VER_DEBUG VS_FF_DEBUG -#endif - -VS_VERSION_INFO VERSIONINFO -FILEVERSION VER_FILEVERSION -// PRODUCTVERSION VER_PRODUCTVERSION -PRODUCTVERSION VER_FILEVERSION -// FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -// FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG) -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "CompanyName", __VER_COMPANY_NAME__ - VALUE "FileDescription", __VER_DESCRIPTION__ - VALUE "FileVersion", VER_FILEVERSION_STR -// VALUE "InternalName", VER_INTERNALNAME_STR -// VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR -// VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR -// VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR -// VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR -// VALUE "ProductName", VER_PRODUCTNAME_STR -// VALUE "ProductVersion", VER_PRODUCTVERSION_STR - END - END - - BLOCK "VarFileInfo" - BEGIN - /* The following line should only be modified for localized versions. */ - /* It consists of any number of WORD,WORD pairs, with each pair */ - /* describing a language,codepage combination supported by the file. */ - /* */ - /* For example, a file might have values "0x409,1252" indicating that it */ - /* supports English language (0x409) in the Windows ANSI codepage (1252). */ - - VALUE "Translation", 0x409, 1252 - END -END diff --git a/make/wt-defs.mk b/make/wt-defs.mk deleted file mode 100644 index a2ad1e47..00000000 --- a/make/wt-defs.mk +++ /dev/null @@ -1,21 +0,0 @@ -ifeq ($(USE_WT),true) - - # WT_VERSION = $(shell $(RPM) -q wt-devel | sed 's/wt-devel-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/;') - - ifeq ($(USE_WT_FASTCGI),true) - FINAL_LDFLAGS += -lwtfcgi - endif - - ifeq ($(USE_WT_HTTPD),true) - FINAL_LDFLAGS += -lwthttp - FINAL_CFLAGS += -DCONNECTOR_HTTP=YES - FINAL_CXXFLAGS += -DCONNECTOR_HTTP=YES - endif - - ifeq ($(USE_WT_DBO),true) - FINAL_LDFLAGS += -lwtdbopostgres -lwtdbosqlite3 -lwtdbo - endif - - FINAL_LDFLAGS += -lwt - -endif diff --git a/make/yapp.mk b/make/yapp.mk deleted file mode 100644 index 42fd2fd0..00000000 --- a/make/yapp.mk +++ /dev/null @@ -1,28 +0,0 @@ -SRC_ALL_CPP += main.cpp -YAPP_INCLUDE_DIR ?= . -YAPP_CLASS ?= $(firstword $(basename $(notdir $(wildcard $(addprefix \ - $(YAPP_INCLUDE_DIR)/, YApp*.h App*.h Y*.h *.h))))) -YAPP_CLASS_H ?= $(firstword $(wildcard $(addsuffix /$(YAPP_CLASS).h,\ - $(YAPP_INCLUDE_DIR) $(subst -I,,$(FINAL_INCLUDE)))) $(YAPP_CLASS).h) -YAPP_NAMESPACE ?= - -ifneq ($(TARGET),mingw) -FINAL_LDFLAGS += -rdynamic -endif - -include $(JWBDIR)/make/exe.mk - -all: build_EXE -install: install_EXE -clean: clean.yapp -distclean: - -clean.yapp: - $(RM) -f main.cpp - -main.cpp: $(YAPP_CLASS_H) - echo "#include \"$<\"" > $@.tmp - if [ "$(YAPP_NAMESPACE)" ]; then echo "using namespace $(YAPP_NAMESPACE);" >> $@.tmp; fi - echo "#include " >> $@.tmp - echo "yapp_main($(YAPP_CLASS))" >> $@.tmp - mv $@.tmp $@ diff --git a/make/zip-windows-files.mk b/make/zip-windows-files.mk deleted file mode 100644 index 61529e13..00000000 --- a/make/zip-windows-files.mk +++ /dev/null @@ -1,60 +0,0 @@ -WINLIB = win32/dsprout/Debug/dsprout.lib - -$(WINLIB): $(REQUIRED_H) - @echo $@ "is out of date or not existing." >&2 - exit 1 - -%-win-bin.zip: $(WINLIB) - $(RM) -rf $(LIBPCKGTMPDIR) - mkdir -p $(LIBPCKGDIR) \ - $(LIBPCKGTMPDIR)/include \ - $(LIBPCKGTMPDIR)/lib \ - $(LIBPCKGTMPDIR)/test/console \ - $(LIBPCKGTMPDIR)/test/minicc/qt - cp $(REQUIRED_H) $(LIBPCKGTMPDIR)/include - cp tools/*.h $(LIBPCKGTMPDIR)/include - cp $(SHARED_INCLUDE)/*.h $(LIBPCKGTMPDIR)/include - cp $(WINLIB) $(LIBPCKGTMPDIR)/lib - $(CAT) test/dsprout/win32/dsprout.dsp | . scripts/distify_vcpp_dsp.sh ../.. > $(LIBPCKGTMPDIR)/test/console/dsprot.dsp - cp test/dsprout/*.cpp $(LIBPCKGTMPDIR)/test/console - cp test/minicc/qt/*.cpp test/minicc/qt/*.h $(LIBPCKGTMPDIR)/test/minicc/qt - $(CAT) test/minicc/qt/win32/miniccqt.dsp | . scripts/distify_vcpp_dsp.sh ../../.. > $(LIBPCKGTMPDIR)/test/minicc/qt/miniccqt.dsp - echo $(DIST_VERSION) > $(LIBPCKGTMPDIR)/version.txt - $(CAT) CHANGES > $(LIBPCKGTMPDIR)/changes.txt - $(CAT) COPYING > $(LIBPCKGTMPDIR)/copying.txt - $(CAT) LGPL > $(LIBPCKGTMPDIR)/lgpl.txt - cd $(LIBPCKGTMPDIR)/..; zip -r `basename $@` `basename $(LIBPCKGTMPDIR)` - mv $(LIBPCKGTMPDIR)/../`basename $@` $(LIBPCKGDIR) - -%-win-src.zip: - mkdir -p $(DISTDIR)/src/$(PROJECT) - mkdir -p $(PCKG_DIR) - $(RM) -rf $(DISTDIR)/src/$(PROJECT)/* - mkdir -p $(DISTDIR)/src/$(PROJECT)/mod - cd $(TOPDIR); find . -type f | \ - grep -ve 'include\|\.plg\|\.opt\|\.ncb\|Debug\|\.rep\|\.dsw\|\.dsp\|.*.\o' | \ - grep -ve 'Makefile\|CVS\|contrib/nomake\|\.tar.gz\|/dist/\|experimental\|old\|\.*.\.swp\|.*~' | \ - xargs tar -cf - | tar -C $(DISTDIR)/src/$(PROJECT) -xf - - echo $(DIST_VERSION) > $(DISTDIR)/src/$(PROJECT)/VERSION ;\ - set -e; for mod in $(REQUIRED) ; do \ - make -C $(JWBDIR)/$$mod clean ;\ - mkdir -p $(DISTDIR)/src/$(PROJECT)/mod/$$mod ;\ - echo `ls $(JWBDIR)/$$mod/*.h`; \ - modfiles="`find $(JWBDIR)/$$mod -maxdepth 1 -name *.h -o -name *.c -o -name *.cpp`"; \ - echo "++++ $$modfiles"; \ - if [ -n "$$modfiles" ]; then cp $$modfiles $(DISTDIR)/src/$(PROJECT)/mod/$$mod/; fi\ - done ;\ - set -e; for dir in $(SHARED_INCLUDE); do \ - mod=shared_`basename $$dir` ;\ - make -C $$dir clean ;\ - mkdir -p $(DISTDIR)/src/$(PROJECT)/mod/$$mod ;\ - modfiles="`find $$dir -maxdepth 1 -name '*.h' -o -name '*.c' -o -name '*.cpp' -o -name '*.sh'`"; \ - echo "++++ $$modfiles"; \ - if [ -n "$$modfiles" ]; then cp $$modfiles $(DISTDIR)/src/$(PROJECT)/mod/$$mod/; fi ;\ - if [ -f "$$dir/Makefile" ]; then \ - $(SED) $$dir/Makefile -e "s/^TOPDIR\ *=.*/TOPDIR = \.\.\/\.\./g" > $(DISTDIR)/src/$(PROJECT)/mod/$$mod/Makefile ;\ - fi; \ - done ;\ - cp $(JWBDIR)/Makefile $(DISTDIR)/src/$(PROJECT)/mod/ - cd $(DISTDIR)/src; zip -r $(notdir $@) $(PROJECT) - mv $(DISTDIR)/src/$(notdir $@) $@ diff --git a/scripts/build-release.sh b/scripts/build-release.sh deleted file mode 100644 index 1aac6cda..00000000 --- a/scripts/build-release.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -while true; do - make pkg-release-reinstall - [ $? = 0 ] && break - echo ================================================================================================================ - sleep 60 -done diff --git a/scripts/collect-installed-pkg-changes.sh b/scripts/collect-installed-pkg-changes.sh deleted file mode 100644 index 0b47ab1f..00000000 --- a/scripts/collect-installed-pkg-changes.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash - -log() -{ - echo "=== $@" -} - -err() -{ - log $@ -} - -fatal() -{ - err $@ - exit 1 -} - -lp() -{ - scm.sh ls-files | grep "/$1$" -} - -usage() -{ - echo "$myname [-h] [-t target-dir ] [ package-name ]" - [ "$1" ] && exit $1 -} - -collect_changes() -{ - local projs="$*" - local proj changed_path project_path p b lp - - [ "$projs" ] || { - if [ -f .git ]; then - projs=`pwd | xargs basename` - projs="$proj-run $proj-devel" - else - projs="$(jw-pkg list | sed 's/-[0-9].*//')" - fi - } - - for proj in $projs; do - ( - changed_paths=`rpm -qV $proj | sed ' - /^..5.*/ !d - s%^..5...... . /%/% - '` - [ "$changed_paths" ] || exit - project_path=$(echo $proj | sed 's/-run$\|-devel$//') - - cd $project_path || { - err "Failed to change to $project_path" - exit - } - - log "Handling project $proj" - - for p in $changed_paths; do - [ -r $p ] || { - err "can't read $p" - continue - } - b=`basename $p` - lp=`lp "$b"` - [ "$lp" ] || { - err "$p is not in repository" - continue - } - nl=`lp "$b" | wc -l` - [ $nl -gt 1 ] && { - log $p is more than once in repository: - lp $b - continue - } - diff -q $lp $p >/dev/null 2>&1 && { - continue - } - log copying $p $lp - cp $p $lp - done - ) - done -} - -# -- here we go - -set -- `getopt 'ht:' $*` -while [ "$1" != -- ]; do - case "$1" in - -h) - usage 0 - ;; - -t) - target="$2" - shift - ;; - *) - usage 1 - ;; - esac - shift -done -shift - -[ "$target" ] && { - cd $target || fatal "failed to change to target dir \"$target\"" -} - -collect_changes diff --git a/scripts/convert-doc-to-wiki.sh b/scripts/convert-doc-to-wiki.sh deleted file mode 100644 index 8693495f..00000000 --- a/scripts/convert-doc-to-wiki.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash - -cat_header() -{ - cat <<-EOT - ====== Dummy-Titel ====== - ---- - - ===== Links ===== - ---- - - * {{$namespace:$n, Stand `date +'%d.%m.%Y'`}} - - ===== Backlinks ===== - ---- - {{backlinks>.}} - - ===== Annotierte Version ===== - ---- - EOT -} - -strip() -{ - sed "s/^ *//; s/ *$//" | grep . -} - -field() -{ - grep "| *$2 *\(|\|$\)" $files | grep "pdfwiki\|binary" | cut -d\| -f$1 | strip -} - -cmd_name_extern_2_intern() -{ - field 3 "$1" -} - -cmd_name_intern_2_extern() -{ - field 2 "$1" -} - -cmd_uploads() -{ - cat $files | grep "pdfwiki\|binary" | cut -d\| -f3 | strip -} - -cmd_milk_dirs() -{ - local dirs="$@" - for d in $dirs; do - ls $d/* 2>/dev/null | while read f; do - l=`basename "$f"` - n=`cmd_name_extern_2_intern "$l"` - [ "$n" ] || { - echo "ignoring unknown file \"$l\"" - continue - } - [ -e "$n" ] && { - echo "ignoring existing file \"$l\"" - continue - } - type=$(field 1 "$l") - echo type=$type - case $type in - pdfwiki) - t=`echo $n | sed 's/\.[^.]*$//'` - txt="$t.txt" - [ -e "$txt" ] && { - echo "ignoring existing file \"$txt\"" - continue - } - cp "$f" "tmp-$n" - pdftotext "tmp-$n" - pdfimages -png -j tmp-$n $n - rm -f $n-*.pnm - cat_header "$l" "$n" > $txt.tmp - cat tmp-$txt >> $txt.tmp - mv $txt.tmp $txt - mv tmp-$n $n - rm -f tmp-$txt - ;; - binary) - cp "$f" "$n" - ;; - *) - echo "ignoring file with unknown extension: \"$f\"" - ;; - esac - done - done -} - -# ------------------------------------------------ here we go - -files=files.txt -namespace=files:doc:extern -eval set -- `getopt -o hn: -l namespace: -- "$@"` -while [ "$1" != -- ]; do -case $1 in - -n|--namespace) - namespace="$2" - shift - ;; - -h) - usage 0;; - *) - usage 1;; -esac -shift -done -shift - -cmd="${1/-/_}" -shift -eval cmd_$cmd "$@" - diff --git a/scripts/convert-to-greyed-out-image.sh b/scripts/convert-to-greyed-out-image.sh deleted file mode 100644 index 6f0f131e..00000000 --- a/scripts/convert-to-greyed-out-image.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -in=$1 -if [ "$2" ]; then - out="$2" -else - out=`echo $1 | sed 's/\.\([^.]\+$\)/-greyed-out.\1/'` -fi - -#convert -monochrome $in $out -#convert -monochrome -opaque \#e5e5e5 $in $out -#convert -modulate 100,40 $in $out -#convert +level 25% $in $out -#convert +level 30% $in $out -#convert -colorspace Gray $in $out -#convert +level 30% -colorspace Gray $in $out -convert -colorspace Gray +level 30% -brightness-contrast 35 $in $out - - -# TODO: overlay same image, 1px shifted down and right, with different gray level - -# ------------------------------------------------ -#convert small.miff -modulate 100,40 small-grey.miff -#montage -fill black -font $P/LucidaGrande.ttf -pointsize 10 -geometry +0+0 -label "${LABEL}" -background transparent small-grey.miff small-text.png -#composite -size 48x48 xc:$BGCOL -compose copy small-text.png mask.miff -#composite small-text.png -compose atop mask.miff apmask.miff - -# ------------------------------------------------ -#convert $in \( +clone -background black -shadow 75x0+0-5 \) \ -# \( -clone 0 -alpha off -virtual-pixel black -motion-blur 0x3-90 -alpha on \) \ -# -delete 0 -background none -layers merge +repage $out - - diff --git a/scripts/create-mkdebian.sh b/scripts/create-mkdebian.sh deleted file mode 100644 index 361e53aa..00000000 --- a/scripts/create-mkdebian.sh +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/bash - -cfg_section() -{ - ini_section "$inifile" $@ -} - -cfg_value() -{ - ini_value "$inifile" $@ -} - -# -- here we go - -echo "== running $0" "$@" >&2 - -export LANG=POSIX -dir=`dirname $0` -inifile="$1" -. $dir/ini-tools.sh - -cat << EOT -format_depends() -{ - echo "\$@" | sed 's/ */,/g; s/,\([><=]\+\),*/\1/g; s/, *,*/,/g; s/, *$//; s/^ *,//; s/\([><=]\+\)\([0-9.-]\+\)/ (\1\2) /g' -} - -#changelog() -#{ -# #dch -c /dev/stdout --create -v \$VERSION-\$RELEASE --package \$NAME -#cat << EOF -#\$NAME (\$VERSION-\$RELEASE) UNRELEASED; urgency=medium -# -# * Initial release. (Closes: #XXXXXX) -# -# -- Jan Lindemann `date -R` -# -#EOF -#} - -compat() -{ - echo -n 9 -} - -control() -{ -cat << EOF -Source: \$NAME -Maintainer: Jan Lindemann -Section: `cfg_value global.group` -Priority: optional -Standards-Version: 3.9.2 -Build-Depends: debhelper (>= 9) -EOT - -cfg_value global.subpackages | grep -q run && cat << EOT - -Package: \$NAME-run -Architecture: any -Depends: \`format_depends "\${shlibs:Depends}, \${misc:Depends}, \$REQUIRES_RUN"\` -# untested: -Conflicts: \`format_depends "\$CONFLICTS_RUN"\` -Description: `cfg_value summary` -`cfg_value description | sed 's/^/ /'` -EOT - -cfg_value global.subpackages | grep -q devel && cat << EOT - -Package: \$NAME-devel -Architecture: any -Depends: \`format_depends "\$NAME-run = \$VERSION-\$RELEASE, \$REQUIRES_DEVEL"\` -# untested: -Conflicts: \`format_depends "\$CONFLICTS_DEVEL"\` -Description: \$NAME Development Package - Development tools for \$NAME-run -EOT - -cat << EOT -EOF -} - -copyright() -{ - echo -n "Copyright (c) `date +'%Y'`, janware GmbH" -} - -format() -{ - echo "3.0 (quilt)" -} - -rules() -{ -cat << "EOF" -#!/usr/bin/make -f - -# tip from https://pkg-perl.alioth.debian.org/debhelper.html -# PACKAGE = \$(firstword \$(shell dh_listpackages)) -# TMP = \$(CURDIR)/debian/\$(PACKAGE) - -NAME = \$(shell pwd | xargs basename | sed 's/-[0-9.-]\+//') -DEB_DIR = \$\$(pwd)/debian -ENV_PREFIX = \$\$(pwd)/debian/tmp/inst-root -EOF - -echo INSTALL_LOG = \$INSTALL_LOG - -cat << "EOF" -%: -EOF -echo -e "\tdh \$""@" -cat << EOF - -override_dh_auto_test: - -override_dh_installdirs: - @echo "running override_dh_installdirs ($@)" - #dh_installdirs - -override_dh_auto_install: - @echo "running override_dh_auto_install ($@)" - mkdir -p \`dirname \$INSTALL_LOG\` - > \$INSTALL_LOG - \\\$(MAKE) ENV_PREFIX=\\\$(ENV_PREFIX) INSTALL_LOG=\\\$(INSTALL_LOG) install - PATH=$JWB_SCRIPT_DIR:\\\$(PATH) /bin/bash pkg.sh milk-install-log -p \\\$(ENV_PREFIX) -n \\\$(NAME) -t deb \$INSTALL_LOG \\\$(DEB_DIR) - dh_installdirs - -override_dh_install: - dh_install --sourcedir=./debian/tmp/inst-root - -override_dh_shlibdeps: - LD_LIBRARY_PATH=lib:\\\$(LD_LIBRARY_PATH) dh_shlibdeps - -override_dh_auto_clean: - -override_dh_compress: - -EOF -} - -mkdir -p debian -#dch --create --empty -cd debian - -for file in compat control copyright format rules; do - test -e \$file && continue - \$file > \$file -done - -chmod 755 rules - -cd .. - -dch --create --newversion \$VERSION-\$RELEASE --controlmaint --package \$NAME --force-distribution --distribution \$DISTRIBUTION "Release built by $0" - -echo "Produced by $0, the output should be in the \"debian\" sub-directory." -EOT - diff --git a/scripts/create-mkspec.sh b/scripts/create-mkspec.sh deleted file mode 100644 index ad18c092..00000000 --- a/scripts/create-mkspec.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/bin/bash - -_cat() -{ - sed 's/^ *|//' -} - -cfg_section() -{ - ini_section "$inifile" $@ -} - -cfg_value() -{ - ini_value "$inifile" $@ -} - -cfg_escape() -{ - sed 's/\\/\\\\/g; s/\$/\\$/g; s/`/\\`/g' -} - -# unneeded but kept, because it might come in handy in the future -have_pkg() -{ - echo "$subpackages" | grep -q "\(^[ ]*\|[ ]\+\)$1\([ ]\+\|$\)" - return $? -} - -subpackage_description() -{ - case $1 in - run) - echo "Runtime files" - ;; - devel) - echo "Development files" - ;; - esac -} - -os_cascade() -{ - # might want to run python3 path/to/projects.py --os=suse-tumbleweed os-cascade - # or turn this into a python script and use projects.py as a module. - - if [ "$DISTRIBUTION" ]; then - echo os linux $DISTRIBUTION | sed 's/\([^-]\+\)-\([^-]\+\)/\1 \1-\2/g' - else - echo os linux - fi -} - -# -- here we go - -echo "== running $0" "$@" >&2 - -export LANG=POSIX -dir=`dirname $0` -inifile="$1" -. $dir/ini-tools.sh - -subpackages=`cfg_value global.subpackages` -license=`cfg_value global.license` -[ "$license" ] || license="janware GmbH proprietary license" -vendor=`cfg_value global.vendor` -[ "$vendor" ] || vendor="janware GmbH" -url=`cfg_value global.url` -[ "$url" ] || url="https://janware.com" - -_cat <<- EOT - |echo "%define debug_package %{nil}" - |# --------------------------------------- - |echo "Name: \$NAME" - |echo "Summary: `cfg_value summary`" - |echo "Version: \$VERSION" - |echo "Release: \$RELEASE" - |echo "License: $license" - |echo "Group: System/Libraries" - |[ -n "\$SOURCE" ] && echo "Source: \$SOURCE" - |echo "Vendor: $vendor" - |echo "URL: $url" - |echo "BuildRoot: /var/tmp/%{name}-buildroot" - |echo "Distribution: jw / openSUSE Tumbleweed" - |echo "" - |echo "%description" - |echo "`cfg_value description`" - |echo "" - |# --------------------------------------- - |echo "%prep" - |echo "%setup -q -n \$NAME-\$V" - |echo "" - |echo "%build" - |echo 'pwd' - |echo 'make config' - |echo 'make' - |echo "" - |echo "%install" - |echo 'rm -rf \$RPM_BUILD_ROOT' - |echo "export ENV_PREFIX=\\\$RPM_BUILD_ROOT" - |echo "export INSTALL_LOG=\$INSTALL_LOG" - |echo "mkdir -p \`dirname \$INSTALL_LOG\`" - |echo "> \$INSTALL_LOG" - |echo "make install" - |echo "export PATH=$JWB_SCRIPT_DIR:\\\$PATH" - |echo "/bin/bash pkg.sh milk-install-log -p \\\$ENV_PREFIX -n \$NAME -t rpm -s \\"$subpackages\\" \$INSTALL_LOG \`dirname \$INSTALL_LOG\`" - |echo "exit 0" # <- Cut short CentOS magic appended to install scriptlet, which would generate .pyo files and other cruft. -EOT - -for p in $subpackages; do - - P=${p^^} - - _cat <<- EOT - |echo "" - |echo "# --------------------------------------- subpackage $p" - |echo "" - |echo "%package -n \$NAME-$p" - |echo "Summary: `cfg_value summary`" - |echo "Group: `cfg_value global.group`" - |[ "\$REQUIRES_$P" ] && echo "Requires: \$REQUIRES_$P" - |[ "\$CONFLICTS_$P" ] && echo "Conflicts: \$CONFLICTS_$P" - |[ "\$PROVIDES_$P" ] && echo "Provides: \$PROVIDES_$P" - |echo "" - EOT - - descr=`subpackage_description $p` - if [ "$descr" ]; then - _cat <<- EOT - |echo "" - |echo "%description -n \$NAME-$p" - |echo "$descr" - EOT - fi - - for stage in pre preun post postun; do - echo "== processing stage $stage: cfg_section pkg.$p.$stage" >&2 - out="" - #for os in '' `os_cascade | sed 's/\(^\| \)/ ./g'`; do - for os in '' `os_cascade`; do - sec=pkg.$p.$stage - if [ "$os" ]; then - sec="$sec.$os" - head="\n# --- $os\n" - else - head="" - fi - cfg_section $sec | grep -q . || continue - out="$out$head`cfg_section $sec`" - done - if [ "$out" ]; then - echo -e "$out" >&2 - _cat <<- EOT - |echo "" - |echo "%$stage -n \$NAME-$p" - EOT - echo "cat << EOT" - echo -e "$out" | cfg_escape - echo "EOT" - fi - done - - _cat <<- EOT - |echo "" - |echo "%files -n \$NAME-$p -f \$INSTALL_LOG.\$NAME-$p" - |echo '%defattr (-, root, root)' - EOT -done diff --git a/scripts/cvs-admin.sh b/scripts/cvs-admin.sh deleted file mode 100644 index a5a26c1f..00000000 --- a/scripts/cvs-admin.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -log() -{ - echo $@ -} - -err() -{ - echo $@ >&2 -} - -fatal() -{ - err $@ - exit 1 -} - -cmd_list_projects() -{ - local all_proj proj p - ( - cd $projroot || fatal Failed to change to $projroot - all_proj=`find . -maxdepth 1 -mindepth 1 -type d` - for p in $all_proj; do - test -x $p || continue - test -r $p || continue - p=${p##./} - test -f $HOME/cvs-list.txt && grep -q "^$p$" $HOME/cvs-list.txt || continue - proj="$proj $p" - done - [ "$proj" ] && echo $proj - ) -} - -# ---------- here we go -cvsroot=/srv/cvs -projroot=$cvsroot/proj -cmd=${1/-/_} -shift -eval cmd_$cmd $@ diff --git a/scripts/dpm.sh b/scripts/dpm.sh deleted file mode 100644 index ed25104c..00000000 --- a/scripts/dpm.sh +++ /dev/null @@ -1,189 +0,0 @@ -#!/bin/bash - -log_dpkg() -{ - echo dpkg $@ - /usr/bin/dpkg $@ -} - -run() -{ - echo $@ - eval $@ -} - -# to be used on debian prior to jessie -dpkg_verify() -{ - local exitcode file pkg hashfile rfile phash hash - exitcode=0 - for file in $*; do - pkg=`dpkg -S "$file" | cut -d: -f 1` - hashfile="/var/lib/dpkg/info/$pkg.md5sums" - if [ -s "$hashfile" ]; then - rfile=`echo "$file" | cut -d/ -f 2-` - phash=`grep -E "$rfile\$" "$hashfile" | cut -d\ -f 1` - hash=`md5sum "$file" | cut -d\ -f 1` - if [ "$hash" = "$phash" ]; then - echo "$file: ok" - else - echo "$file: CHANGED" - exitcode=1 - fi - else - echo "$file: UNKNOWN" - exitcode=1 - fi - done - return $exitcode -} - -cmd_install() -{ - local n=`basename $1` - n=`echo $n | sed "s/_[0-9.-]\+_amd64.deb//"` - /bin/bash $0 -q $n >/dev/null 2>&1 && { - fatal "$n is already installed (`/bin/bash $0 -q $n`)" - } - cmd_update $1 -} - -cmd_update() -{ - $dpkg --dry-run -i $1 || fatal "Test-installation failed." - $dpkg -i $1 || fatal "Installation failed." -} - -cmd_erase() -{ - #$dpkg -r $1 - $dpkg --purge $* -} - -cmd_query() -{ - [ "$query_cmds" ] && { - local cmd installed - local id=name - if echo $query_cmds | grep -q p; then - id=pkg - query_cmds=`echo $query_cmds | sed 's/p//'` - elif echo $query_cmds | grep -q f; then - id=file - query_cmds=`echo $query_cmds | sed 's/f//'` - fi - for cmd in $query_cmds; do - case $cmd in - V) - $dpkg --verify $1 - ;; - i) - case $id in - file) - $dpkg -I $1;; - name) - $dpkg -s $1;; - #run apt-cache show $1;; - pkg) - $dpkg -S $1;; - esac - ;; - l) - case $id in - file) - echo blah - #$dpkg -p $1;; - ;; - name) - $dpkg -L $1;; - pkg) - $dpkg -c $1;; - esac - ;; - a) - $dpkg -l $1 - ;; - esac - done - return $? - } - - local p=`echo $1 | sed 's/-[0-9.-]\+$//'` - local v=`echo $1 | sed "s/^$p-*//"` - local ip=`dpkg-query -W -f '${Package}' $p >/dev/null 2>&1` - [ $? != 0 -o -z "$ip" ] && exit 1 - local iv=`dpkg-query -W -f '${Version}' $p >/dev/null 2>&1` - [ "$v" ] && { - [ "$v" != "$iv" ] && { - echo "tried $1, installed version is $iv" >&2 - exit 1 - } - } - echo $ip-$iv - return 0 -} - -usage() -{ - echo "usage: $myname [-h] [... misc rpm options]" - [ "$1" ] && exit $1 - -} - -fatal() -{ - echo $@ >&2 - exit 1 -} - -# -- here we go -myname=`basename $0` -dpkg=log_dpkg -cmd="" - -set -- `getopt hqiUeVfapl "$@"` -while [ "$1" != -- ]; do -case $1 in - -h) - usage 0 - ;; - -q) - [ "$cmd" ] && usage 1 - cmd=query - ;; - -V|-f|-a|-p|-l) - [ "$cmd" ] && { - [ "$cmd" = query ] || usage 1 - query_cmds="$query_cmds ${1:1:1}" - } - ;; - -i) - [ "$cmd" ] && { - [ "$cmd" = query ] || usage 1 - query_cmds="$query_cmds ${1:1:1}" - shift - continue - } - cmd=install - ;; - -U) - [ "$cmd" ] && usage 1 - cmd=update - ;; - -e) - [ "$cmd" ] && usage 1 - cmd=erase - ;; - *) - usage 1 - ;; -esac -shift -done -shift - -# [ $# != 1 ] && usage 1 -[ "$cmd" ] || usage 1 - -eval cmd_\$cmd $* - diff --git a/scripts/generate-boot-medium.sh b/scripts/generate-boot-medium.sh deleted file mode 100644 index 385a1d55..00000000 --- a/scripts/generate-boot-medium.sh +++ /dev/null @@ -1,201 +0,0 @@ -#!/bin/sh - -myname=`basename $0` -cwd=`pwd` - -make_initrd_from_template() -{ - uname_r=$1 - target=$2 - modules_dir=$3 - template=$4 - shift 4 - mod_names="$*" - - # set up work space - dir=`mktemp -d "/tmp/$myname""_XXXXXX"` - mkdir $dir/source - - # unpack template and copy it - cat $template | (cd $dir/source; gunzip | cpio -i) - cp -rp $dir/source $dir/target - rm -rf $dir/target/lib/modules/* - - # copy all modules both in template and kernel - ( - cd $dir/source - find . -name '*.ko' - ) | while read tmpl_relpath; do - - mod_name=`basename $tmpl_relpath` - source_mod=`cd $modules_dir; find . -name $mod_name` - - if [ ! "$source_mod" ]; then - echo "warning: module $mod_name not found in $modules_dir" >&2 - # exit 1 - else - mod_relpath=`dirname $source_mod` - target_path=$dir/target/lib/modules/$uname_r/$mod_relpath - echo "copying $mod_name from $mod_relpath to $target_path" - mkdir -p $target_path - cp -p $modules_dir/$source_mod $target_path - - fi - done - - # copy all explicitly specified modules - for mod_name in $mod_names; do - echo "processing explicitly requested module $mod_name" - mod_source_path=`find $modules_dir -name $mod_name.ko` - if [ -z "$mod_source_path" ]; then - echo "warning: explicitly specified module $mod_name not found in $uname_r" >&2 - continue - fi - - mod_relpath=`echo $mod_source_path | sed "s%$modules_dir%%g; s/$mod_name.ko$//"` - target_path=$dir/target/lib/modules/$uname_r/$mod_relpath - echo "copying $mod_name from $mod_relpath to $target_path" - mkdir -p $target_path - cp -p $mod_source_path $target_path - done - - # linuxrc - if [ "$linux_rc" ]; then - echo "copying $linux_rc to linuxrc" - cp $linux_rc $dir/target/init - fi - - # depmod - /sbin/depmod -a -b $dir/target -v $uname_r > /dev/null - - # pack stuff up - (cd $dir/target; find . | cpio -co) | gzip -9 > $target - - rm -rf $dir -} - -unquote() -{ - cat | sed 's/^[ ]*|//' -} - -config_section() -{ - output_file= - add_boot_dir= - add_modules_basedir= - root_dev= - initrd_template= - sed -n "/\[$2\]/,/\[/ p" $1 | sed '/]/ d; s/#.*//; /./ !d; s/ *= */=/; s/=\(.*\)/="\1"/' -} - -boot_sections() -{ - sed '/\[boot\..*\]/ !d; s/\[boot\.//; s/\].*//' $1 -} - - -name_filter() -{ - echo $1 | \ - tr [A-Z] [a-z] | \ - sed 's/\.tar\.gz/.tgz/; s/-/_/g; s/\([^.]*\)\.\([^.]*\)$$/\1@\2/; s/\./_/g; s/@/./' -} - -#make_initrd $template $modules_dir - -set -- `getopt 'i:f:o:d:' $*` - -while [ "$1" != -- ]; do - case $1 in - -f) - opt_config_file="$2" - shift - ;; - -o) - opt_output_file="$2" - shift - ;; - -d) - opt_build_dir="$2" - boot_dir="$2" - shift - ;; - -i) - linux_rc="$2" - shift - ;; - *) - usage - ;; - esac - shift -done -shift - -if [ ! "$opt_build_dir" ]; then - boot_dir=`mktemp -d "/tmp/$myname""_XXXXXX"` -fi - -eval `config_section $opt_config_file global` - -echo DEFAULT menu.c32 > $boot_dir/isolinux.cfg -echo PROMPT 0 >> $boot_dir/isolinux.cfg - -for sec in `boot_sections $opt_config_file`; do - - echo "+ processing section boot.$sec" - config_section $opt_config_file boot.$sec - eval `config_section $opt_config_file boot.$sec` - - if [ "$add_boot_dir" ]; then - - echo "+ adding boot directory $add_boot_dir" - for f in $add_boot_dir/*; do - b=`basename $f` - n=`name_filter $b` - echo "+ copying $f -> $n" - cp -p $f $boot_dir/$n - done - - kernels=`file $add_boot_dir/* | grep -ie 'linux.*kernel' | sed 's/:.*//'` - for kernel in $kernels; do - - kernel_version=`basename $kernel | sed 's/vmlinuz-//'` - kernel_version_iso=`name_filter $kernel_version | cut -b1-21` - - echo "+ processing kernel $kernel (version $kernel_version)" - - # create initrd - if [ "$initrd_template" ]; then - echo "+ creating initial ram disk from template $initrd_template" - make_initrd_from_template \ - $kernel_version \ - $boot_dir/initrd_$kernel_version_iso \ - $add_modules_basedir/$kernel_version \ - $initrd_template \ - $included_modules - fi - - # create isolinux.cfg - cat << EOT | unquote >> $boot_dir/isolinux.cfg - | - |LABEL $kernel_version - |KERNEL vmlinuz_$kernel_version_iso - |APPEND initrd=initrd_$kernel_version_iso root=$root_dev -EOT - done - fi -done - -cp $* $boot_dir - -mkisofs -l --iso-level 2 -o $opt_output_file \ - -b isolinux.bin -c boot.cat \ - -no-emul-boot -boot-load-size 4 -boot-info-table \ - $boot_dir - -if [ ! "$opt_build_dir" ]; then - rm -rf $boot_dir -fi - diff --git a/scripts/git-srv-admin.sh b/scripts/git-srv-admin.sh deleted file mode 100644 index 2b4221c8..00000000 --- a/scripts/git-srv-admin.sh +++ /dev/null @@ -1,246 +0,0 @@ -#!/bin/sh - -myname=`basename $0` - -usage() -{ - cat << EOT | sed 's/^ |//' - | - | $myname [global options] cmd [cmd-arguments] ... - | - | global options are: - | - | -F flavour : flavour is one of: priv, jw, contrib - | - | commands are: - | - | create-repo name - | update-descriptions - | list-repos - | create-repo-dir - | list-maintainers - | -EOT - [ "$1" ] && exit $1 -} - -log() -{ - echo $@ - logger -t $myname "$@" -} - -err() -{ - echo $@ >&2 - logger -t $myname "error: $@" -} - -fatal() -{ - err "fatal: $@" - exit 1 -} - -md() -{ - local dir=$1 - local mode=$2 - local owner=$3 - local group=$4 - - [ -d $dir ] || { - - log "creating $dir as $owner.$group with mode $mode" - /usr/bin/install -m $mode -o $owner -g $group -d $dir || { - fatal "failed to create directory $dir" - } - } -} - -check_user_is_self() -{ - [ "$id" != "$user" ] && fatal "User $id is not allowed to do this to user $user's repositories." -} - -# ----------------- commands -md_p() -{ - [ -d "$1" ] && return - md_p `dirname "$1"` $2 $3 $4 - md $@ -} - -cmd_cmd_create_repo_dir() -{ - [ "$UID" != 0 ] && fatal "tried to create directory \"$dir\" as `whoami`, needs to be done as root" - local gid=`id -g $id` - md_p /srv/git 750 root git - md_p /srv/git/$id 750 root git - md_p `dirname $dir` 750 $id $gid - md_p $dir 02750 $id $gid -} - -cmd_create_repo() -{ - [ -e $dir ] && { - err "$dir already exists" - test $no_error_if_exists -eq 0 - exit $? - } - - /usr/bin/sudo `readlink -f $0` create-project-dir $dir || fatal "failed to create [$dir] as root" - cd $dir || fatal "failed to change to $dir" - git init --bare --shared=0640 || fatal "git init failed" -} - -read_project_metadata() -{ - local pd="$1" - local field="$2" - git -C $pd show HEAD:make/project.conf | sed -n "/^\[$field\]/,/^\[/ p" | grep -v '\[' | cat -s | sed '${/^$/d;}' -} - -cmd_update_descriptions() -{ - [ -d $pdir ] || return 0 - cd $pdir || return 1 - local projs="$*" - [ "$projs" = all ] && projs=`cmd_list_repos` - local proj - for proj in $projs; do - umask 0022 - [ -d "$proj" ] || fatal "Failed to find project $pdir/$proj" - local tmp=`mktemp /tmp/$myname-XXXXXXX` - local descr=$proj/description - read_project_metadata $proj summary > $tmp - [ -s "$tmp" ] || read_project_metadata $proj description > $tmp - if [ -s "$tmp" ] && ! diff -q "$tmp" "$descr" >/dev/null 2>&1; then - chown --reference=$proj $tmp - chmod 640 $tmp - echo "====== Changing description of $proj" - echo '-- old --' - cat $descr - echo '-- new --' - cat $tmp - mv $tmp $descr - fi - rm -f $tmp - done -} - -cmd_list_repos() -{ - [ -d $pdir ] || return 0 - cd $pdir || return 1 - ls */HEAD | sed 's%/HEAD%%' 2>/dev/null - return $? -} - -cmd_list_maintainers() -{ - local dev_chief=jan - local master_dir=/srv/git/$dev_chief/proj - local d pdir p val - - for d in $master_dir; do - for pdir in `find $d -maxdepth 1 -mindepth 1 -type d`; do - [ -x $pdir ] || continue - [ -r $pdir ] || continue - #echo "$d -> $pdir" - p=`basename $pdir` - val=`git -C $pdir show HEAD:make/project.conf 2>/dev/null | - sed -n '/^\[global\]/,/^\[/ p' | - sed ' - /^[[:space:]]*jw-maintainer/ !d; - s/.*= *// - '` - [ "$val" ] || val="unknown" - [ "$val" ] || continue - printf "%-30s %s\n" $p $val - done - done -} - -# ----------------- here we go -no_error_if_exists=0 -id=`whoami` -#user=$id -flavour=priv - -OPTIND=1 -while getopts jhu:F: flag; do - - case $flag in - h) - usage 0;; - u) - user=$OPTARG;; - j) # legacy support - flavour=jw;; - F) - flavour=$OPTARG;; - p) - no_error_if_exist=1;; - *) - usage 1;; - esac -done -shift $(($OPTIND - 1)) - -if [ "$user" ]; then - id=$user -else - if [ "$SUDO_UID" ]; then - id=`/usr/bin/getent passwd $SUDO_UID | cut -d: -f1` - [ "$id" ] || fatal "failed to find uid $SUDO_UID in user database" - fi - user=$id -fi - -git_home=/srv/git/$id -pdir=$git_home/priv - -case $flavour in -jw|proj) - pdir=$git_home/proj;; -priv) - pdir=$git_home/priv;; -test) - pdir=$git_home/test;; -contrib) - pdir=$git_home/contrib;; -*) - fatal "unknown repository flavour \"$flavour\"" -esac - -cmd=$1 -shift -p=$1 - -dir=$pdir/$p - -case $cmd in -create-personal-project|create-repo) - check_user_is_self - cmd_create_repo "$@" - ;; -update-descriptions|update-descr) - cmd_update_descriptions "$@" - ;; -list-personal-projects|list-repos) - cmd_list_repos "$@" - ;; -create-project-dir|create-repo-dir) - dir=$1 # this is all a horrible variable and usage mess - check_user_is_self - cmd_cmd_create_repo_dir "$@" - ;; -list-maintainers|maintainers) - cmd_list_maintainers - ;; -*) - usage 1 - ;; -esac - diff --git a/scripts/ini-section.sh b/scripts/ini-section.sh deleted file mode 100644 index c93ba00f..00000000 --- a/scripts/ini-section.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -get_conf_sec() -{ - sed -n "/\[$1\]/,/\[/ p" | sed '/]/ d; s/#.*//; /./ !d; s/ *= */=/; s/=\(.*\)/="\1"/' -} - -cat $2 | get_conf_sec $1 - diff --git a/scripts/ini-tools.sh b/scripts/ini-tools.sh deleted file mode 100644 index d84e2d0d..00000000 --- a/scripts/ini-tools.sh +++ /dev/null @@ -1,56 +0,0 @@ -ini_section() -{ - local inifile="$1" - local sec="$2" - cat "$inifile" | - cut -d\# -f1 | - tr -s '\n' '\n' | - sed -n "/^ *\[$sec\]/,/^ *\[/ p" | - grep -v '^ *\[' | - sed '/^ *$/ d' -} - -ini_value() -{ - local inifile="$1" - local path="$2" - local sec=`echo "$path" | sed 's/\.[^.]\+$//'` - local key=`echo "$path" | sed 's/.*\.//'` - -# echo "path=>$path<" -# echo "sec=>$sec<" -# echo "key=>$key<" - - if [ "$key" = "$path" ]; then - ini_section "$inifile" "$path" - return 0 - fi - - ini_section "$inifile" "$sec" | sed " - /^ *$key *=/ !d - s/^ *$key *= *// - s/ *$// - /^ *$/ d - " -} - -ini_has_section() -{ - local inifile="$1" - local sec="$2" - grep -q "^ *\[$sec\]" $inifile || return 1 -} - -ini_has_value() -{ - ini_value $@ | grep -q . -} - -ini_escape() -{ - cat | sed ' - s/\$/\\$/g - s/`/\\\`/g - ' -} - diff --git a/scripts/integrate-distro.sh b/scripts/integrate-distro.sh deleted file mode 100644 index 2261e0bb..00000000 --- a/scripts/integrate-distro.sh +++ /dev/null @@ -1,1595 +0,0 @@ -#!/bin/bash - -# -- defaults -# install_dev=/dev/sdb -arch=`uname -m` -suse_version=tumbleweed -o_name=suse-$suse_version -cmd=install -cwd=`pwd` -ssh_auth_sock=/tmp/agent-host.sock -env_ssh_auth_sock=$SSH_AUTH_SOCK -initrd_modules=" via-rhine r8169 e1000 e1000e b44 myri10ge forcedeth 8139too sata_nv nfs nfs_acl auth_rpcgss nfsv3 nfsv4 fscache lockd sunrpc sis edd sisfb evdev shpchp sis_agp hwmon ahci libahci usbhid hid uhci_hcd ohci_hcd ehci_hcd usbcore hid-generic" -initrd_modules_local="$initrd_modules" -initrd_modules_net="$initrd_modules" -config_script= - -#kernel_flavour=-desktop -kernel_flavour= - -case $suse_version in -11.4) - services=" - ldap - " - base_pkgs=" - sysvinit - " - payload_pkgs=" - suspend - java-1_6_0-sun.i586 - java-1_6_0-sun-plugin.i586 - - grep - insserv - cpio - sysconfig - device-mapper - sysvinit - lsof - dhcpcd - kbd - db-utils - insserv - - unscd - portmap - xorg-x11-Xnest - xorg-x11-fonts-scalable - xntp - xorg-x11-Xvfb - xorg-x11-fonts-100dpi - xorg-x11-fonts-75dpi - xorg-x11-libxcb - xorg-x11-sdk - xorg-x11-server-glx - xorg-x11-fonts-cyrillic - xorg-x11-fonts-syriac - xorg-x11-man - - jux-run - jux-client-run - feedfsd-run - feedfs-local-run - feedfs-net-run - netscan-run - snmp-manager-run - ftp-server-run - bprof-run - " - - special_pkgs=" - aufs - aufs-kmp$kernel_flavour - " - #kernel_version=3.7.8~jng11 - #rpm_kernel_version=3.7.8~jng11-1 - #kernel_version=3.2.0 - #rpm_kernel_version=3.2.0-1 - ;; -12.2) - services=" - ldap - " - base_pkgs=" - sysvinit - " - payload_pkgs=" - suspend - unscd - db-utils - insserv - " - special_pkgs=" - aufs - aufs-kmp$kernel_flavour - " - kernel_version=3.7.8-jng11$kernel_flavour - rpm_kernel_version=3.7.8~jng11-1 - ;; -12.3) - services=" - ldap - " - base_pkgs=" - module-init-tools - sysvinit - " - - payload_pkgs=" - suspend - nscd - usbutils - db-utils - insserv - " - - special_pkgs=" - jux-run - jux-client-run - feedfsd-run - feedfs-local-run - feedfs-net-run - netscan-run - snmp-manager-run - ftp-server-run - bprof-run - aufs - aufs-kmp$kernel_flavour - " - # currently unused variable - devel_pkgs=" - ant - alsa-devel - apache-commons-logging - boost-devel - createrepo - curl-devel - ffmpeg-devel - fuse-devel - glib2-devel - glu-devel - jakarta-commons-logging - java-1_7_0-openjdk-devel - libXv-devel - libXxf86vm-devel - libasound2 - libcap-devel - libffmpeg-devel - libsamplerate-devel - libsndfile-devel - log4j - nasm - net-snmp - openldap2-devel - rpmbuild - uuid-devel - " - - kernel_version=3.9.9-jng20-1.1$kernel_flavour - rpm_kernel_version=3.9.9~jng20-1.1 - - kernel_version=3.7.10-jng12$kernel_flavour - rpm_kernel_version=3.7.10~jng12-1 - - #kernel_version=3.9.9-jng20-1.2$kernel_flavour - kernel_version=3.9.9-jng20$kernel_flavour - rpm_kernel_version=3.9.9~jng20-1.2 - ;; -13.1) - services=" - ldap - " - base_pkgs=" - aaa_base - module-init-tools - sysvinit - " - - payload_pkgs=" - suspend - nscd - sssd - usbutils - aufs-util - db48-utils - psmisc - ntp - acpid - " - special_pkgs=" - jux-run-1.2.2-119p02 - jux-client-run - feedfsd-run - feedfs-local-run - feedfs-net-run - netscan-run - snmp-manager-run - ftp-server-run - bprof-run - " - - # currently unused variable - devel_pkgs=" - ant - alsa-devel - apache-commons-logging - boost-devel - createrepo - curl-devel - ffmpeg-devel - fuse-devel - glib2-devel - glu-devel - jakarta-commons-logging - java-1_7_0-openjdk-devel - libXv-devel - libXxf86vm-devel - libasound2 - libcap-devel - libffmpeg-devel - libsamplerate-devel - libsndfile-devel - log4j - nasm - net-snmp - openldap2-devel - rpmbuild - uuid-devel - " - - kernel_version=3.12.7-jux+ - rpm_kernel_version=3.12.7-jux+ - ;; -tumbleweed) - services=" - slapd - " - base_pkgs=" - aaa_base - module-init-tools - " - - payload_pkgs=" - nscd - sssd - usbutils - aufs-util - db48-utils - psmisc - ntp - acpid - " - special_pkgs=" - jux-run - jux-client-run - feedfsd-run - feedfs-local-run - feedfs-net-run - netscan-run - snmp-manager-run - ftp-server-run - bprof-run - " - - # currently unused variable - devel_pkgs=" - ant - alsa-devel - apache-commons-logging - boost-devel - createrepo - curl-devel - ffmpeg-devel - fuse-devel - glib2-devel - glu-devel - jakarta-commons-logging - java-1_7_0-openjdk-devel - libXv-devel - libXxf86vm-devel - libasound2 - libcap-devel - libffmpeg-devel - libsamplerate-devel - libsndfile-devel - log4j - nasm - net-snmp - openldap2-devel - rpmbuild - uuid-devel - " - - #kernel_version=4.8.0_rc6_jux+-1 - #rpm_kernel_version=4.8.0_rc6_jux+-1 - kernel_version=4.8.0-swm+ - #rpm_kernel_version=4.8.0_swm+-79 - ;; -esac - -umask 0022 - -kernel_files_version=${kernel_version/_/-} - -unused_pkgs=" - sysvinit-systemd - kernel - kernel-syms-$rpm_kernel_version - kernel-source-$rpm_kernel_version - aufs-kmp -" - -base_pkgs=" - $base_pkgs - coreutils -" - -update_pkgs=" - $update_pkgs - zypper -" -# -- pciutils -# used by jux, should be done by grepping /proc-files -special_pkgs=" - $special_pkgs - kernel$kernel_flavour-$rpm_kernel_version - rpm -" -# -- sysvinit -# systemd-sysvinit boots, but doesn't work cleanly as of now - -payload_pkgs=" - - $payload_pkgs - kernel - memtest86+ - grub - syslinux - splashy - mailx - ppp - - sensors - - pam_ldap - pam_apparmor - gnome-keyring-pam - - proftpd - proftpd-ldap - bind - dhcp-server - rsyslog - openldap2 - courier-authlib-ldap - xinetd - apache2 - apache2-mod_php5 - nfs-kernel-server - tftp - - nss_ldap - - fuse - mdadm - smartmontools - - nfs-client - openldap2-client - samba-client - sudo - glibc-locale - openvpn - - xorg-x11 - xorg-x11-driver-video - xorg-x11-libs - xorg-x11-server - xorg-x11-Xvnc - unclutter - - xterm - - man - findutils-locate - vim - - iputils strace - - wget lukemftp - openssh - parted - - tar zip unzip - rsync - - gcc-c++ libtool autoconf automake make - cvs - patch - - pciutils - - jw-build-run - jw-build-devel - ytools-run -" - -services=" - $services - boot.juxearly - boot.bprof - sshd - jux -" - - -# fetchmsttfonts -# -- functions -usage() -{ - echo " - - usage: $myname -h - $myname [options] [install|mount|mount-devices|unmount|mkinitrd|fs|default-config|root-dir] - - options: - -f - -d target-device - -n target-name - -p file with root password - -a architecture - -k hook=command - -r root directory - -u user (for source-code-management login) - - known hooks are: - - o fs-ready - o pkg-installed - - during hook execution the following variables are filled - - o \$hook : the name of the hook - o \$root : path to the root directory of the - distribution being integrated - -" >&2 - [ "$1" ] && exit $1 -} - -get_opts() -{ - local p - eval set -- `getopt -o 'hd:n:a:p:k:u:w:s:r:fc:P:xi:' -l config-file:,non-interactive -- "$@"` - while [ "$1" != -- ] ; do - case "$1" in - -h) - usage 0 - ;; - -c|--config-file) - config_file="$2" - shift - ;; - --non-interactive) - non_interactive=1 - ;; - -d) - install_dev=$2 - shift - ;; - -n) - o_name=$2 - shift - ;; - -r) - o_root=$2 - shift - ;; - -a) - arch=$2 - shift - ;; - -p) - root_password_file=$2 - shift - ;; - -k) - hooks[${2%%=*}]="${2#*=}" - shift - ;; - -u) - scm_user=$2 - shift - ;; - -w) - cwd="$2" - cd "$cwd" - shift - ;; - -s) - env_ssh_auth_sock=$2 - shift - ;; - -f) - o_force=1 - ;; - -P) - export PATH="$2" - for p in /sbin /usr/sbin; do - echo $PATH | grep -q "\(^\|:\)$p\(:\|$\)" || PATH=$PATH:$p - done - shift - ;; - -x) - trace=-x - ;; - -i) - ssh_identity="-i $2" - shift - ;; - *) - usage 1 - ;; - esac - shift - done - shift - - [ "$1" ] && cmd="$1" -} - -log() -{ - echo $@ >&2 -} - -fatal() -{ - log $@ - exit 1 -} - -run() -{ - local exit_on_error=0 - - while [[ "$1" =~ ^- ]]; do - case $1 in - -e) - exit_on_error=1 - esac - shift - done - log =========== running $@ - $@ - local r=$? - if [ "$exit_on_error" = 1 -a $r != 0 ]; then - die "exiting after error during command \"$@\"" - fi - return $r -} - -die() -{ - log "$@" - exit 1 -} - -_cat() -{ - cat | sed 's/^[ ]*|//' -} - -check_var_set() -{ - local var val - local r=0 - for var in $@; do - eval val=\$$var - [ "$val" ] || { - log "$var is not set" - r=1 - } - done - return $r -} - -have_cfg_file() -{ - [ "$config_file" ] || return 1 - [ -r "$config_file" ] || { - fatal "failed to read config file \"$config_file\"" - } -} - -cfg_default() -{ - cat <<-EOT | grep -v "^ *#" - [parted] - mklabel gpt - mkpart primary 1M 2M - name 1 grub - set 1 bios_grub - mkpart primary 2M 10G - name 2 boot - mkpart primary 10G 40G - name 3 swap - mkpart primary 40G $max - name 4 root - - [repos.base] - distro-oss 0 ftp://ftp/pub/mirror/suse/distribution/$suse_version/repo/oss - - [repos.update] - #distro-non-oss 0 ftp://ftp/pub/mirror/suse/distribution/$suse_version/repo/non-oss - #update 0 ftp://ftp/pub/mirror/suse/update/$suse_version - - [repos.payload] - jw-foss 10 https://pkg:we0rntj3p@janware.com/files/packages/jw-foss/suse/$suse_version?auth=basic&credentials=jannet.cat - ftp.priv.lcl 5 ftp://dspdev:123qweasd@ftp.priv.lcl/pub/local/packages/suse/$suse_version - - [repos.special] - #jengelh 0 ftp://ftp/pub/mirror/gwdg/pub/linux/misc/suser-jengelh/openSUSE_$suse_version - #videolan 0 ftp://ftp/pub/mirror/videolan/pub/videolan/vlc/SuSE/$suse_version - - [initrd.local.modules] - $initrd_modules_local - - [initrd.net.modules] - $initrd_modules_net - - [fstab] - proc /proc proc defaults 0 0 - sysfs /sys sysfs noauto 0 0 - debugfs /sys/kernel/debug debugfs noauto 0 0 - usbfs /proc/bus/usb usbfs noauto 0 0 - devpts /dev/pts devpts mode=0620,gid=5 0 0 - /usr/share/syslinux /srv/nfs/boot/pxe/bin auto bind 0 0 - - [jcs_conf] - jcs_dir=\$HOME/local/src/jw.dev/conf/jannet.de/minimalix/suse-$suse_version - 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 - EOT -} - -have_cfg_file_section() -{ - have_cfg_file || return 1 - ini_has_section "$config_file" "$@" || return 1 -} - -have_cfg_file_value() -{ - have_cfg_file || return 1 - ini_has_value "$config_file" "$@" || return 1 -} - -cfg_file_section() -{ - have_cfg_file || return 1 - ini_section "$config_file" "$@" -} - -cfg_file_value() -{ - have_cfg_file || return 1 - ini_value "$config_file" "$@" -} - -cfg_section() -{ - if have_cfg_file_section "$1"; then - cfg_file_section "$1" - return 0 - fi - if cfg_default | ini_has_section /dev/stdin "$1"; then - cfg_default | ini_section /dev/stdin "$1" - return 0 - fi - return 1 -} - -cfg_value() -{ - if have_cfg_file_value "$1"; then - cfg_file_value "$1" - return 0 - fi - if cfg_default | ini_has_value /dev/stdin "$1"; then - cfg_default | ini_value /dev/stdin "$1" - return 0 - fi - return 1 -} - -_run_chroot() -{ - local cmd - set +x - while read cmd; do - cmd=`echo $cmd | sed 's/[ ]*#.*//'` - [ "$cmd" ] || continue - echo == running LANG=POSIX chroot $root $cmd - LANG=POSIX chroot $root $cmd || { - die "failed to run >$cmd<" - } - done - set -x -} - -run_chroot() -{ - local cmd="LANG=POSIX SSH_AUTH_SOCK=$ssh_auth_sock chroot $root" - if [ "$1" = -q ]; then - shift - else - echo == running $cmd "$@" - fi - #eval $cmd "$@" || { - #LANG=POSIX SSH_AUTH_SOCK=$ssh_auth_sock chroot $root "$@" || { - LANG=POSIX SSH_AUTH_SOCK=$ssh_auth_sock chroot $root "$@" || { - die "failed to run >$@<, exiting" - } -} - -run_hook() -{ - hook="$1" - local cmd="${hooks[$hook]}" - [ "$cmd" ] || return 0 - ( - cd $cwd - echo "== running hook $hook ($cmd)" - . $cmd - ) -} - -run_parted() -{ - while read cmd; do - run parted --script $install_dev $cmd - done -} - -create_partition_table() -{ - assert_not_mounted - local max=$(LANG=POSIX parted -s $install_dev print | sed '/Disk/ !d; s/.*: *//') - - cfg_section parted | run_parted - grub_boot_partition_num=0 - grub_slash_boot_partition_num=1 -} - -create_file_systems() -{ - #run mkfs -t ext4 $install_dev_boot - run mkfs -t ext3 $install_dev_boot - run mkswap $install_dev_swap - run mkfs -t ext4 $install_dev_root -} - -canonicalize() -{ - readlink -f $1 2>/dev/null -} - -check_mount() -{ - local canonicalized=`realpath --canonicalize-missing $root/$1 2>/dev/null` - #echo root="$root" - #echo arg="$1" - #echo canonicalized="$canonicalized" - [ ! "$canonicalized" ] && return 1 - mount | grep -q " $canonicalized " && return 0 - canonicalized=`canonicalize $root/$1` - [ ! "$canonicalized" ] && return 1 - mount | grep -q " $canonicalized " && return 0 - return 1 -} - -assert_not_mounted() -{ - if grep $install_dev /proc/mounts; then - echo "$install_dev is mounted, exiting" - exit 1 - fi -} - -setup_bind_mounts() -{ - [ -d "$root" ] || { - [ "$o_force" ] || { - echo "directory \"$root\" does not exist" - exit 1 - } - } - local fs - for fs in /dev /sys /proc /srv/ftp; do - check_mount $fs || { - run -e mkdir -p -m 755 $root$fs - run -e mount -o bind $fs $root$fs - } - done - if [ "$env_ssh_auth_sock" ]; then - check_mount $ssh_auth_sock || { - run -e mkdir -p `dirname $root/$ssh_auth_sock` - run -e touch $root/$ssh_auth_sock - run -e mount --bind $env_ssh_auth_sock $root/$ssh_auth_sock - } - fi -} - -mount_devices() -{ - check_mount / || { - run -e install -d -m 755 $root - run -e mount $install_dev_root $root - } - - check_mount /boot || { - run -e mkdir -p -m 755 $root/boot - run -e mount $install_dev_boot $root/boot - } -} - -kill_chroot_processes() -{ - local pids=`ls -l /proc/*/root | grep $root | sed "s%.* /proc/\([0-9]\+\)/.*%\1%"` - local wait - local p - for p in $pids; do - echo "killing process $p (`strings /proc/$p/cmdline | sed ':a;N;$!ba;s/\n/ /g'`)" - kill $p || continue - wait=1 - done - if [ "$wait" = 1 ]; then sleep 1; fi -} - -unmount_devices() -{ - local devices="$ssh_auth_sock /srv/ftp /proc/fs/nfsd /proc /sys /dev /boot /" - [ "$1" ] && devices="$@" - local sync=/usr/bin/sync - [ -x $root/$sync ] || sync="" - kill_chroot_processes - local d - for d in $devices; do - check_mount $d && { - [ "$sync" -a -e $root$d -a $d != $ssh_auth_sock ] && run $sync -f $root$d - #[ "$d" = /dev ] && sleep 2 # need to do this, otherwise dev is busy, no idea why - run umount $root$d - } - done - rm -f $ssh_auth_sock -} - -zypper_repos() -{ - local repo - for repo in $*; do - cfg_section repos.$repo - done -} - -setup_zypper_repos() -{ - local name prio uri - zypper_repos $@ | while read name prio uri; do - if [ "${name:0:1}" = - ]; then - name=${name:1} - run_chroot zypper $zypper_global_opts ar -p $prio $uri $name - run_chroot zypper $zypper_global_opts mr -d $name - continue - fi - run_chroot zypper $zypper_global_opts ar -p $prio $uri $name - done -} - -host_zypper() -{ - local repos="$1" - shift - local distros=`zypper_repos $repos | awk '{print "--plus-repo " $3 }'` - run -e zypper $zypper_global_opts --root $root $distros $@ -} - -init_root_password_file() -{ - [ "$root_password_file" ] || - root_password_file=$HOME/.$myname/root-pass - - [ ! -f $root_password_file ] && { - local dir=`dirname $root_password_file` - mkdir -m 0755 $dir - dd if=/dev/random of=/dev/stdout bs=1 count=4 2>/dev/null | - hexdump | sed '/^0000000/ !d; s/0000000 //; s/ //g' > $root_password_file - chmod 600 $root_password_file - } -} - -pkgs() -{ - local flavour="$1" - # TODO: add remove, add and other package flavours - if have_cfg_file_section "pkgs.$flavour.all"; then - cfg_file_section "pkgs.$flavour.all" - return 0 - fi - local var="$flavour"_pkgs - eval echo \$$var -} - -services() -{ - if have_cfg_file_section "services.all"; then - cfg_file_section "services.all" - return 0 - fi - echo $services -} - -services_disable() -{ - if have_cfg_file_section "services.disable"; then - cfg_file_section "services.disable" - fi - return 0 -} - -targets_default() -{ - if have_cfg_file_section "targets.default"; then - cfg_file_section "targets.default" - fi - echo multi-user - return 0 -} - -make_etc_fstab() -{ - cfg_section fstab -} - -make_etc_hosts() -{ - _cat< $p - for e in $myname rpmnew; do - h="$root/$f.$e" - [ -e "$h" ] && { - echo "== resetting host file from $f.$e" - mv $h $root/$f - break - } - done - if [ -s $p ]; then - echo "+ $f and host file differ:" - cat $p - else - echo "+ no difference between $f and host file" - fi - rm -f $p - done - host_files="" - set -e - return 0 -} - -setup_boot_loader_local() -{ - check_var_set grub_boot_partition_num grub_slash_boot_partition_num || \ - die "not setting up boot loader, exiting" - - local drivename=hd$install_grub_dev_num - local boot="($drivename,$grub_boot_partition_num)" - local slash_boot="($drivename,$grub_slash_boot_partition_num)" - local map=/tmp/$myname-grub-device.map - local mkinitrd_sh=/root/bin/mkinitrd-local.sh - local modules=`cfg_section initrd.local.modules` - - echo "($drivename) $install_dev" > $map - #dd if=$root/boot/grub/stage1 of=$install_dev count=512 count=1 - _cat << EOT | sed 's/#.*//' | run grub --batch --device-map=$map - |root $slash_boot - |setup ($drivename) - |#setup --stage2=/boot/grub/stage2 --force-lba $boot $slash_boot - |quit -EOT - - make_sysconfig_bootloader > $root/etc/sysconfig/bootloader - make_boot_menu > $root/boot/grub/menu.lst - - _cat << EOT > $root$mkinitrd_sh - |#!/bin/sh - |umask 0022 - |/sbin/mkinitrd \\ - | -B \\ - | -k /boot/vmlinuz-$kernel_version \\ - | -i /boot/initrd-local-$kernel_version \\ - | -M /boot/System.map-$kernel_version \\ - | -m "$modules" \\ - | -d $install_dev_root - |ln -sf initrd-local-$kernel_version /boot/initrd-local - |chmod 644 /boot/initrd-local-$kernel_version -EOT - chmod 755 $root$mkinitrd_sh - - run_chroot $mkinitrd_sh -} - -setup_boot_loader_net() -{ - local mkinitrd_sh=/root/bin/mkinitrd-net.sh - local modules=`cfg_section initrd.net.modules` - - _cat << EOT > $root$mkinitrd_sh - |#!/bin/sh - |umask 0022 - |/sbin/mkinitrd \\ - | -B \\ - | -k /boot/vmlinuz-$kernel_version \\ - | -i /boot/initrd-netboot-$kernel_version \\ - | -M /boot/System.map-$kernel_version \\ - | -m "$modules" \\ - | -d jan://blub/dings - |ln -sf initrd-netboot-$kernel_version /boot/initrd-netboot - |ln -sf memtest.bin /boot/memtest - |chmod 644 /boot/initrd-netboot-$kernel_version -EOT - chmod 755 $root$mkinitrd_sh - - run_chroot $mkinitrd_sh -} - -undo_rpmnew() -{ - local n o - # reset config files to rpm versions - find $root -name '*.rpmnew' | while read n; do - o=`echo $n | sed 's/\.rpmnew//'` - log renaming $n to $o - mv $n $o - done -} - -setup_root_directory() -{ - if [ -w "$install_dev" ]; then - - if [ ! "$non_interactive" ]; then - - local answer - echo -n "Continuing will delete ALL data on $install_dev. Are you sure [y|n]? " - read answer - if [ "$answer" != y ]; then - exit 1 - fi - fi - - create_partition_table - create_file_systems - mount_devices - else - - if [ ! "$non_interactive" ]; then - - if [ -e $root ]; then - - local answer - echo -n "Continuing will delete ALL data below $root. Are you sure [y|n]? " - read answer - if [ "$answer" != y ]; then - exit 1 - fi - fi - fi - - if [ ! "$root" ]; then - echo "cowardly not removing empty root directory" - exit 1 - fi - - if [[ "$root" =~ home ]]; then - echo "cowardly not removing directory matching \"home\"" - exit 1 - fi - - set +e - unmount_devices - grep -q $root /proc/mounts && { - echo "====== there are filesystems mounted below $root: >" - grep $root /proc/mounts - echo "====== unmount them manually" - exit 1 - } - - run rm -rf $root - run install -d -m 755 $root $rw_root - fi -} - -insserv_all() -{ - local services=`services` - local services_disable=`services_disable` - local targets_default=`targets_default` - - case $suse_version in - 11.4) - run_chroot /sbin/insserv -de $services - [ "$services_disable" ] && run_chroot /sbin/insserv -r $services_disable - ;; - *) - local s - for s in $services; do - log enabling service $s - run_chroot systemctl enable $s - done - for s in $services_disable; do - log disabling service $s - run_chroot systemctl disable $s - done - log setting default target $targets_default - run_chroot set-default $targets_default - ;; - esac - return 0 -} - -set_sysconf_value() -{ - local file="$1" - local key="$2" - local value="`echo $3 | sed 's%/%\\\\/%g'`" - sed "s/^ *$key *=.*/$key=\"$value\"/" $root/$file > $root/$file.tmp - mv $root/$file.tmp $root/$file -} - -install_pkgs() -{ - local flavour="$1" - pkgs $flavour | grep . || return 0 - echo "=== installing $flavour packages >" - run_chroot zypper $zypper_global_opts install --auto-agree-with-licenses `pkgs $flavour` || return 1 - echo "=== installing $flavour packages <" -} - -cmd_install() -{ - local c - set -e - - [ -r "$root_password_file" ] || { - die "root password file doesn't exist, do echo -n my-secret > $root_password_file" - } - - if true; then - - setup_root_directory - setup_bind_mounts - - run_hook fs-ready - - host_zypper "base" install --auto-agree-with-licenses $base_pkgs - host_zypper "base update" install --auto-agree-with-licenses $update_pkgs - - #undo_rpmnew - - use_host_files /etc/hosts /etc/resolv.conf /etc/sysconfig/security /etc/nsswitch.conf \ - /etc/passwd /etc/group /etc/certs - - #/etc/opt/bprof/bprof.secret - - - run_chroot install -d -m 755 /etc/dhcpd.conf.d - - #make_etc_resolv_conf > $root/etc/resolv.conf - make_etc_fstab > $root/etc/fstab - - run setup_zypper_repos base update payload - - echo "=== refreshing >" - run_chroot zypper $zypper_global_opts refresh - echo "=== refreshing <" - - install_pkgs payload - - run setup_zypper_repos special - install_pkgs special - - # run_chroot zypper $zypper_global_opts -t srcpackage --download-only `pkgs payload` - #kernel_version=`readlink -f $root/boot/vmlinuz 2>/dev/null | xargs basename | sed 's/vmlinuz-//'` - kernel_version=`run_chroot -q rpm -q kernel | sort -V | sed 's/_/-/g; s/\.\(i386\|x86_64\)$//; s/-[^.-]\+$//; s/^kernel-//'` - - # TODO: should be done by package manager post install script - run_chroot /opt/jw-build/bin/jcs init - - make_etc_jcs_jcs_conf > $root/etc/jcs/jcs.conf - - run_chroot mkdir -p -m 700 /root/.ssh - make_home_ssh_conf > $root/root/.ssh/config - run_chroot chmod 600 /root/.ssh/config - - make_etc_sysconfig_network_ifcfg_eth0 > $root/etc/sysconfig/network/ifcfg-eth0 - run_chroot chmod 644 /etc/sysconfig/network/ifcfg-eth0 - - run_hook pkg-installed - - export CVSROOT=:ext:$scm_user@cvs.janware.com:/srv/cvs - echo "=== running jcs fetch" - run_chroot jcs fetch - reset_host_files - echo "=== running jcs setup" - run_chroot jcs setup - - # seed the ldap database - # FIXME: this does not work off a netboot distro - #slapcat | chroot $root /usr/sbin/slapadd -qw - - fi # test - - [ "$install_dev" ] && setup_boot_loader_local - setup_boot_loader_net - run_chroot ln -sf vmlinuz-$kernel_version /boot/vmlinuz - - insserv_all - - echo "=== using root password file $root_password_file" - echo -n root: | cat - $root_password_file | chroot $root /usr/sbin/chpasswd - - case $suse_version in - 11.4) - run_chroot /sbin/SuSEconfig - ;; - *) - ;; - esac - [ -x $root/opt/jux/bin/jux-init-namespace.sh ] && run_chroot /opt/jux/bin/jux-init-namespace.sh - run_chroot /sbin/ldconfig - run_chroot install -m 755 -d /srv/nfs/var - run_chroot install -m 777 -d /srv/nfs/var/cores - run_chroot install -m 777 -d /var/cores - - if have_cfg_file_section repos.after-install; then - run_chroot zypper mr --all --disable - run setup_zypper_repos after-install - fi - - unmount_devices - [ -w "$install_dev" ] || { - install -d -m 755 $root/../rw - /etc/init.d/nfsserver status >/dev/null 2>&1 && { - /etc/init.d/nfsserver restart - } - } -} - -# -- here we go - -exe="$0" -myname=`basename $exe` -mydir=`dirname $exe` - -zypper_global_opts="--non-interactive --gpg-auto-import-keys --no-gpg-checks" -date=`date` -host_files="" -declare -A hooks -get_opts "$@" - -[ "$trace" ] && set -x - -. $mydir/ini-tools.sh - -case $arch in -i386|i586|i686) - case `uname -m` in - i386|i586|i686);; - x86_64) - l32=linux32;; - esac - ;; -armv7hl) - ;; -x86_64|"") - ;; -*) - die "invalid architecture $arch specified";; -esac - -if [ "$o_root" ]; then - root=$o_root/ro - rw_root=$o_root/rw -else - root=/srv/nfs/boot/distros/$o_name-$arch/ro - rw_root=/srv/nfs/boot/distros/$o_name-$arch/rw -fi - -case $cmd in -default-config) - cfg_default - exit $? - ;; -root-dir) - echo $root - exit $? - ;; -install) - init_root_password_file - # fall throuth - ;; -*) - ;; -esac - -if [ `whoami` != root -o "$l32" ]; then - [ ! "$scm_user" ] && scm_user=`whoami` - exe=$0 - [ ${exe:0:1} = / ] || { - exe=`/bin/pwd`/$exe - exe=`readlink -f $exe` - } - - # preferring "ssh -l root localhost" over "sudo" to keep ssh-agent environment - #sudo -i $exe $@ -p $root_password_file - [ "$env_ssh_auth_sock" ] && opt_ssh_auth_sock="-s $env_ssh_auth_sock" - opts="" - [ "$config_file" ] && opts="$opts --config-file $config_file" - - ssh=ssh - [ "$CVS_RSH" ] && ssh="$CVS_RSH" - [ "$GIT_SSH" ] && ssh="$GIT_SSH" - ssh=`which $ssh` - [ -x "$ssh" ] || fatal "SSH executable \"$ssh\" not found" - ssh="$ssh $ssh_identity" - $ssh -l root localhost $l32 /bin/bash $trace $exe $@ $trace -p $root_password_file -u $scm_user -w $cwd $opt_ssh_auth_sock -P "$PATH" $opts - - exit $? -fi - -[ ! "$scm_user" ] && scm_user=`whoami` - -case $cmd in -unmount) - unmount_devices - exit $? - ;; -*) - ;; -esac - -# -- set up variables denoting devices - -if [ "$install_dev" ]; then - - tmp=`realpath "$install_dev"` - [ -b "$tmp" ] || fatal "device \"$install_dev\" is not a link to a block device" - install_dev="$tmp" - - case $install_dev in - /dev/sd*) part_sep="";; - /dev/nbd*|/dev/loop*) part_sep="p";; - esac - - install_dev_boot=$install_dev$part_sep""2 - install_dev_swap=$install_dev$part_sep""3 - install_dev_root=$install_dev$part_sep""4 - - case $install_dev in - /dev/sda) install_grub_dev_num=0;; - /dev/sdb) install_grub_dev_num=1;; - /dev/sdc) install_grub_dev_num=2;; - /dev/sdd) install_grub_dev_num=3;; - /dev/sde) install_grub_dev_num=4;; - /dev/nbd*) - install_grub_dev_num=${d/\/dev\/nbd/};; - /dev/loop*) - install_grub_dev_num=0;; - *) - fatal "device \"$install_dev\" can't be mapped onto a grub device number, edit $myname to add support" - ;; - esac - - run_dev=/dev/sda - run_dev_boot=$run_dev""2 - run_dev_swap=$run_dev""3 - run_dev_root=$run_dev""4 - - run_grub_dev_num=0 - - ## test > - #grub_boot_partition_num=0 - #grub_slash_boot_partition_num=1 - #mount_devices - ## test < -fi - -case $cmd in -install) - cmd_install - exit $? - ;; -fs) - setup_root_directory - setup_bind_mounts - ;; -mount) - [ "$install_dev" ] && mount_devices - setup_bind_mounts - exit $? - ;; -mount-devices) - [ "$install_dev" ] && mount_devices - exit $? - ;; -mkinitrd) - grub_boot_partition_num=0 - grub_slash_boot_partition_num=1 - [ "$install_dev" ] && { - mount_devices - setup_boot_loader_local - } - setup_boot_loader_net - exit $? - ;; -*) - log "unknown command \"$cmd\"" - usage 1 - ;; -esac -exit 0 - diff --git a/scripts/jannet b/scripts/jannet deleted file mode 100644 index 435a7f0b..00000000 --- a/scripts/jannet +++ /dev/null @@ -1,226 +0,0 @@ -#!/bin/sh - -myname=`basename $0` -longname=$0 -opts="v" - -channel_present() -{ - if smart channel --show $1 2>&1 | grep -q baseurl >/dev/null; then - return 0 - fi - return 1 -} - -usage() -{ -cat << EOT - - $myname command [arguments] - - command is one of - - help: show this help screen - init: initialize - uninit: undo initialization - install: install packages in [arguments] - update: update all jannet software on the system - restore: restore a previous jannet software version state - info: query information about installed software - checklog: update the installation log file if necessary - rpmnew: remove superfluous rpmnew files and show conflicts - for others - build-date: show installed jannet packages along with build date - built-today: show installed jannet packages that were built today - -EOT - if [ "$1" ]; then - exit $1 - fi -} - -get_opts() -{ - set -- `getopt $opts $*` - while [ "$1" != -- ] ; do - case "$1" in - -v) - opt_verbose=true - ;; - *) - eusage - ;; - esac - shift - done - shift -} - -create_ldconfig_state() -{ - echo "=== automatically created by $myname update script" - echo "--- files" - ls /etc/ld.so.conf.d - echo "--- directories" - find /etc/ld.so.conf.d -type f | xargs cat | sort -u -} - -check_ldconfig() -{ - local state=/var/log/jw-build-ldconf.state - [ -f $state ] && create_ldconfig_state | diff $state - >/dev/null 2>&1 && return - echo -n "running ldconfig ... " - /sbin/ldconfig - create_ldconfig_state > $state - echo "done." -} - -list_all_packages() -{ - rpm -qa --queryformat '%{NAME}: %{URL}\n' | \ - grep -i '^[^ ]\+:.*\(jannet\.de\|janware\.com\)' | \ - sed 's/\(^[^ ]\+\) *:.*/\1/; s/[ ]*$//' |\ - sort -u -} - -cmd_rpmnew() -{ - local file - - list_all_packages | - xargs rpm -ql | - while read file; do - if [ -e "$file.rpmnew" ]; then - if diff -q $file $file.rpmnew; then - if [ -L "$file" ]; then - echo ========== skipping link $file - diff $file.rpmnew $file - continue - fi - echo mv $file.rpmnew $file - sudo mv $file.rpmnew $file - else - echo =========== $file - diff $file.rpmnew $file - fi - fi - done -} - -cmd_diff() -{ - local file - - list_all_packages | - xargs rpm -qV | - sed '/^....L\|^..5/ !d; s%[^/]*/%/%' | - while read file; do - if diff -q $file $file.rpmnew; then - if [ -L "$file" ]; then - echo ========== skipping link $file - diff $file.rpmnew $file - continue - fi - echo mv $file.rpmnew $file - sudo mv $file.rpmnew $file - else - echo =========== $file - diff $file.rpmnew $file - fi - done -} - -cmd_build_date() -{ - list_all_packages | - xargs rpm -q --queryformat '%{BUILDTIME} %{NAME}\n' | - sort -n | - sed 's/-run\|-devel//' | - sort -u | - while read t p; do - echo `date --date=@$t --rfc-3339=seconds` $p - done -} - -cmd_built_today() -{ - local today=`date +'%Y-%m-%d'` - cmd_build_date | grep $today | cut -d' ' -f3 -} - -cmd="$1" -shift -get_opts $* - -case $cmd in - -init) - if ! channel_present jw-foss; then - echo -n "adding installation source ... " - sudo smart channel -y --add jw-foss \ - type=yast2 \ - baseurl=https://pkg:we0rntj3p@janware.com/files/packages/jw-foss/suse/tumbleweed?auth=basic&credentials=jannet.cat \ - >/dev/null 2>&1 - if channel_present; then echo done; else echo failed; fi - fi - ;; - -uninit) - if channel_present jw-foss; then - echo -n "removing installation source ... " - sudo smart channel -y --remove jw-foss >/dev/null 2>&1 - echo done - fi - ;; - -update) - sudo smart update jw-foss - sudo smart upgrade -y - check_ldconfig - ;; - -install) - sudo smart update jw-foss - if [ -f $1 ]; then - sudo smart install -y `cat $1` - else - sudo smart install -y $* - fi - check_ldconfig - ;; -restore) - echo "not yet implemented, sorry" >&2 - ;; -checklog) - line=`jannet info | tr -s " "` - echo $line - ;; -info) - if [ "$opt_verbose" = true ]; then - list_all_packages | xargs rpm -qi - else - list_all_packages | xargs rpm -q - fi - ;; -rpmnew) - cmd_rpmnew $@ - ;; -diff) - cmd_diff $@ - ;; -build-date) - cmd_build_date - ;; -built-today) - cmd_built_today - ;; -help) - usage 0 - ;; -*) - usage 1 - ;; - -esac - - diff --git a/scripts/jcs b/scripts/jcs deleted file mode 100644 index df0e8551..00000000 --- a/scripts/jcs +++ /dev/null @@ -1,2096 +0,0 @@ -#!/bin/sh -######################################################################## -# # -# jannet configuration shadow # -# (c) 2000 jannet # -# 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. # -# # -######################################################################## - - -JCS_CONF_FILES=" - /etc/jcs/jcs.conf - /etc/jcs/jcs.mk - /etc/jcs/templates/dir/module/Makefile - /etc/jcs/templates/dir/src/Makefile -" - -JCS_EXE_INSTALL_DIR=/usr/bin - -txtout() { - MARKER=$1 - MARKER="`echo $MARKER | sed -e 's/\//\\\\\//g'`" - DELIM_START="-->>>-- $MARKER --" - DELIM_END="--<<<-- $MARKER --" - cat $SCRIPTNAME | - sed -n "/$DELIM_START/,/$DELIM_END/ p" | - sed -n "1! p" | - sed -n "\$! p" -} - -usage() { - txtout "global usage" - txtout "commands" - txtout "global usage 2" -} - -eusage() { - usage >&2 - exit 1 -} - -version() { - txtout "jcs version" | sed -e s/Revision://g | - sed -e s/Date://g | - tr -d '$\047' | - tr -s ' ' -} - -checkroot() { - if [ `whoami` != root ] ; then - echo This function is only available to root. Exiting. >&2 - exit 1 - fi -} - -get_file_attrib() { - - if [ ! -e "$1" ] ; then - echo \"$1\" does not exist. Exiting. >&2 - exit 1 - fi - - case $2 in - mode) - PLACE=1;; - owner) - PLACE=3;; - group) - PLACE=4;; - *) - PLACE=-1;; - esac - - ls -ld $1 | tr -s ' ' ' ' | cut -d' ' -f$PLACE -} - -log() { - echo $* | tee -a $cfg_jcs_log_dir/jcs.log -} - -jcs_wipe() { - checkroot - echo "This will wipe the jcs executables and " - echo "configuration files from this machine." - - echo -n "Are you shure you want to continue (y|n)? " - - while read ANSWER ; do - test $ANSWER != y -a $ANSWER != n && continue; - test $ANSWER = n && return - for FILE in $JCS_CONF_FILES ; do # $SCRIPTNAME - test ! -f $FILE && continue - echo -n " + removing $FILE ... " - rm -rf $FILE - echo done - done - break - done -} - -jcs_init() { - -usage() { - txtout "usage init" -} - - echo "Since jcs is installed with jw-build, jcs init is disabled for now, ignoring" >&2 - return 0 - - TODO=0 - LOCAL_JCS_DIR="" - - checkroot - set -- `getopt hc: $*` - while [ $1 != -- ] ; do - case $1 in - -c) - LOCAL_JCS_DIR=$2; - test -d "$LOCAL_JCS_DIR" || { - echo "\"$LOCAL_JCS_DIR\" is not a directory. Exiting." >$2 - exit 1 - } - shift;; - -h) - usage; exit 0;; - *) - usage; exit 1;; - esac - shift - done - shift - # --- be downward compatible > - cat /etc/jcs/jcs.conf | cut -d\# -f1 | grep JNT_CONFDIR >/dev/null 2>&1 - if [ $? = 0 ] ; then - txtout "old config warning" - - while echo -n "Are you shure you want to continue (y|n)? "; read ANSWER ; do - test $ANSWER != y -a $ANSWER != n && continue; - test $ANSWER = y && break - echo "Coward!" - exit 1 - done - - get_config - - CFG=/etc/jcs/jcs.conf - echo "Saving old configuration to $CFG.oldstyle and creating new $CFG." - - mv $CFG $CFG.oldstyle - - txtout `basename $CFG` > $CFG - - echo "Changing configuration in $CFG:" - $SCRIPTNAME setval $CFG jcs_dir "$JNT_CONFDIR" - $SCRIPTNAME setval $CFG jcs_owner `get_file_attrib "$JNT_CONFDIR" owner` - $SCRIPTNAME setval $CFG jcs_group `get_file_attrib "$JNT_CONFDIR" group` - $SCRIPTNAME setval $CFG jcs_log_dir "/tmp/jcs/log" - $SCRIPTNAME setval $CFG use_checksum `echo "$JNT_USE_CHECKSUM" | tr -s '[A-Z]' '[a-z]'` - - echo "Moving old /etc/jcs/jcs.mk to /etc/jcs/jcs.mk.oldstyle." - mv /etc/jcs/jcs.mk /etc/jcs/jcs.mk.oldstyle - fi - if [ -f /usr/local/bin/jcs ]; then - if [ $JCS_EXE_INSTALL_DIR != /usr/local/bin ]; then - echo -n " + removing /usr/local/bin/jcs ... " - rm /usr/local/bin/jcs - echo done - fi - fi - if [ -f /etc/jcs/jcs.mk ]; then - echo -n " + removing /etc/jcs/jcs.mk ... " - rm /etc/jcs/jcs.mk - echo done - fi - # --- be downward compatible < - # --- be downward compatible > - if [ -f /etc/jcs/jcs.mk ] ; then - MINOR=`$SCRIPTNAME -V | grep Version | cut -d. -f2 | cut -d" " -f1` - test $MINOR -lt 50 && { - test -f /etc/jcs/jcs.mk.autoinit || cp /etc/jcs/jcs.mk /etc/jcs/jcs.mk.autoinit - rm -f /etc/jcs/jcs.mk - } - fi - # --- be downward compatible < - if [ $SCRIPTNAME -nt $JCS_EXE_INSTALL_DIR/jcs -o \ - ! -e $JCS_EXE_INSTALL_DIR/jcs ] ; then - echo -n " + copying $SCRIPTNAME to $JCS_EXE_INSTALL_DIR ... " - mkdir -p $JCS_EXE_INSTALL_DIR - cp $SCRIPTNAME $JCS_EXE_INSTALL_DIR - chmod 755 $JCS_EXE_INSTALL_DIR/jcs - echo done - else - echo Did not touch $JCS_EXE_INSTALL_DIR/jcs since it does not seem older than $SCRIPTNAME. - fi - for FILE in $JCS_CONF_FILES ; do - if [ ! -f $FILE ] ; then - echo -n "creating $FILE " - mkdir -p `dirname $FILE` - if [ -n "$LOCAL_JCS_DIR" ] ; then - LOCAL_FILE=$LOCAL_JCS_DIR"`echo $FILE | sed -e s/\\\/etc\\\/jcs//`" - if [ -f $LOCAL_FILE ] ; then - echo -n "from local ... " - cp $LOCAL_FILE `dirname $FILE` - fi - fi - if [ ! -f $FILE ] ; then - echo -n "from default ... " - txtout "`basename $FILE`" > $FILE - test -s $FILE || txtout $FILE > $FILE - fi - echo done. - TODO=1 - elif [ $FILE -ot "$SCRIPTNAME" ] ; then - echo $FILE is older than $SCRIPTNAME\! - TODO=1 - else - echo Did not touch $FILE since it seems newer than $SCRIPTNAME. - fi - done - if [ "$TODO" = 1 ] ; then - echo You might want to revise the newly created or out-of-date files. - fi -} - -get_config() { - - if [ ! -f /etc/jcs/jcs.conf ] ; then - echo /etc/jcs/jcs.conf not found. >&2 - echo Have you installed it or run "jcs init" yet? >&2 - echo Exiting now. >&2 - exit 1 - fi - - . /etc/jcs/jcs.conf - - VARS="`cat /etc/jcs/jcs.conf | - cut -d# -f1 | - grep = | - cut -d= -f1`" - for VAR in $VARS ; do - eval cfg_$VAR=\$$VAR - export cfg_$VAR - done -} - -# ==================== get.sh -jcs_get() { -usage() { - txtout "usage get" -} - -set -- `getopt ht: $*` -while [ ! "$1" = "--" ] ; do - case $1 in - -t) TEST=1 ; shift;; - -h|*) usage; exit 0;; - esac -done -shift - -for FILE in $* ; do - if [ ! -r $FILE ] ; then - echo $FILE does not exist or not ready for reading. Exiting. - test -z "$TEST" && exit 1 - fi - if [ -z "$TEST" ] ; then - cp $FILE . - MODE="`ls -l $FILE | tr -s ' ' ' ' | cut -d' ' -f1`" - OWNER="`ls -l $FILE | tr -s ' ' ' ' | cut -d' ' -f3`" - GROUP="`ls -l $FILE | tr -s ' ' ' ' | cut -d' ' -f4`" - echo $MODE $OWNER $GROUP > `basename $FILE`.prp - fi -done -} - -# ==================== install.sh -jcs_install() { - -LAST_LINE_MARKER="# THIS IS THE LAST LINE - readinf.sh stops here!" -TMP_INF_FILE=/tmp/readinf.tmp -TMP_SEC_FILE=/tmp/section.tmp -TMP_LIBS_FILE=/tmp/libs.tmp -DEFAULT_SEC_FILE=`dirname $0`/default_sec.inf - -errorout() { - echo $@ >&2 - exit 1 -} - -exec_scripts() { - test -e $DEFAULT_SEC_FILE && . $DEFAULT_SEC_FILE - . $TMP_SEC_FILE.$1 - test -n "$BCKPDIR" && BACKUP_DIR=$BCKPDIR -} - -usage() { - txtout "usage install" -} - -# ================================================ -# ============================ here we go! -# ================================================ - -set -- `getopt b:p:htf $*` -while [ ! "$1" = "--" ] ; do - case $1 in - -b) - BCKPDIR=$2 - shift;; - -f) - FORCE=1;; - -t) - TEST=1;; - -p) - PREFIX=$2 - shift;; - -h) - usage; exit 0;; - *) - usage; exit 1;; - esac -shift -done -shift - -INFFILE=$1 - -if [ ! "$INFFILE" ] ; then - usage -fi - -if [ ! `whoami` = root ] ; then - errorout "$0 can only be executed by root!" -fi - -WORKDIR="`pwd`" -if [ ! $# = 1 ] ; then - for FILE in $@ ; do - if [ ! `basename $FILE` = `basename $DEFAULT_SEC_FILE` ] ; then - cd `dirname $FILE` - jcs install `basename $FILE` || exit $? - cd $WORKDIR - fi - done -fi -echo '====' processing file $1. - -# ------------ determine relative and absolute paths -REL_INF_DIR=`dirname $INFFILE` -cd $REL_INF_DIR -INF_DIR="`pwd`" -# cd $WORKDIR -INFFILE="`basename $INFFILE`" - -# ------------ delete comments -cat $INFFILE | cut -d\# -f1 > $TMP_INF_FILE #delete comments -# ------------ set end mark -echo "$LAST_LINE_MARKER" >> $TMP_INF_FILE -# ------------ get section names -SECTIONS="`cat $TMP_INF_FILE | grep '\[' | cut -d\[ -f2 | cut -d\] -f1`" -FIRST_SECTION="`echo $SECTIONS | cut -d' ' -f1`" -# ------------ cut the 1st off -if [ "`echo $SECTIONS | wc -w`" -le 1 ] ; then - SECTIONS="" -else - SECTIONS="`echo $SECTIONS | cut -d' ' -f2-`" -fi - -# ------------ first loop over all the sections (check the installation) -SECTION=$FIRST_SECTION -for NEXT_SECTION in $SECTIONS "$LAST_LINE_MARKER"; do - - TODO=0 - - # ------------ produce and execute shell script -# COMMAND=x\\x"$SECTION"x,\\x"$NEXT_SECTION"x" "p - COMMAND=/\\\[$SECTION\\\]/,/\\\[$NEXT_SECTION\\\]/" "p -# echo \"$COMMAND\" - cat $TMP_INF_FILE | sed -n "$COMMAND" | grep -v "\[" | grep -v "$LAST_LINE_MARKER" > $TMP_SEC_FILE.$SECTION - exec_scripts $SECTION - - # ------------ check installation variables - if [ ! -d "$SOURCE_DIR" ] ; then - errorout "The source directory \"$SOURCE_DIR\" doesn't exist!"; exit 1 - fi - if [ "$BACKUP_DIR" ] ; then - # if [ ! -d $BACKUP_DIR ] ; then - # errorout "The backup directory \"$BACKUP_DIR\" doesn't exist!"; exit 1 - # fi - if [ ! "$BACKUP_OWNER" ] ; then - BACKUP_OWNER=$cfg_jcs_owner - fi - if [ ! "$BACKUP_GROUP" ] ; then - BACKUP_GROUP=$cfg_jcs_group - fi - fi - if [ -n "$PREFIX" ]; then - TARGET_DIR=$PREFIX/$TARGET_DIR - fi - if [ ! -d "$TARGET_DIR" ] ; then - if [ -z "$TARGET_DIR_MODE" ] ; then - echo "Don't know how to create target directory \"$TARGET_DIR\". TARGET_DIR_MODE not specified." - exit 1 - fi - if [ -z "$TARGET_DIR_OWNER" ] ; then - echo "Don't know how to create target directory \"$TARGET_DIR\". TARGET_DIR_OWNER not specified." - exit 1 - fi - fi - # if [ "$LIB_DIR" ] ; then - #if [ ! -d "$LIB_DIR" ] ; then - # errorout "The library directory \"$LIB_DIR\" doesn't exist!" ; exit 1 - #fi - # fi - - rm $TMP_LIBS_FILE.$SECTION 2>/dev/null - - for FILE in $FILES ; do - TARGETFILE="`echo $FILE | awk 'BEGIN {FS="->"}{print $2}'`" - if [ -n "$TARGETFILE" ] ; then - SOURCEFILE="`echo $FILE | awk 'BEGIN {FS="->"}{print $1}'`" - else - TARGETFILE=$FILE - SOURCEFILE=$FILE - fi - # echo TARGETFILE=$TARGETFILE,SOURCEFILE=$SOURCEFILE - if [ ! -e $SOURCE_DIR/$SOURCEFILE ] ; then - echo "The file $SOURCE_DIR/$SOURCEFILE doesn't exist!"; exit 1 - exit 1 - fi - if [ $SOURCE_DIR/$SOURCEFILE -nt $TARGET_DIR/$TARGETFILE -o ! -e $TARGET_DIR/$TARGETFILE -o -n "$FORCE" ] ; then - TODO=1 - fi - - if [ -n "$LIB_DIR" ] ; then - LIBS="`ldd $SOURCE_DIR/$SOURCEFILE 2>/dev/null | grep -v 'not a dynamic executable' | awk '{print $3}' | grep -v $SOURCEFILE `" - # the "dynamic exe" - stuff is a feature-workaround for linux ldd: doesn't output all error mess. to stderr - for LIB_LONG in $LIBS ; do - if [ ! -e $LIB_LONG ] ; then - echo $SOURCEFILE - $LIBS - echo "The library file $LIB_LONG doesn't exist!"; exit 1 - fi - - LIB_SHORT=`echo $LIB_LONG | rev | cut -d/ -f1 | rev` - if [ $LIB_LONG -nt $LIB_DIR/$LIB_SHORT -o -n "$FORCE" ] ; then - TODO=1 - echo $LIB_LONG >> $TMP_LIBS_FILE.$SECTION - fi - done - fi - done - - # ------------ end check installation - - if [ $TODO = 0 ] ; then - rm $TMP_SEC_FILE.$SECTION 2>/dev/null - rm $TMP_LIBS_FILE.$SECTION 2>/dev/null - fi - - SECTION="$NEXT_SECTION" -done - -# ------------ second loop over all the sections (installation) -SECTION=$FIRST_SECTION -for NEXT_SECTION in $SECTIONS "$LAST_LINE_MARKER"; do - - if [ ! -e $TMP_SEC_FILE.$SECTION ] ; then - - echo "---- Section [$SECTION] -- nothing to do! ----" - - else - - # ------------ execute shell scripts - exec_scripts $SECTION - - if [ -n "$PREFIX" ]; then - TARGET_DIR=$PREFIX/$TARGET_DIR - fi - - echo "---- Section [$SECTION] -- installing $INSTALLATION_SUBJECT ----" - echo " ($SOURCE_DIR -> $TARGET_DIR)" - - # ------------ create target directory if not yet existing - if [ ! -d "$TARGET_DIR" ] ; then - cd / - DIR="`echo $TARGET_DIR | rev`" - while [ ! $DIR = "." -a ! $DIR = "/" ] ; do - CUR_DIR="`basename $DIR | rev`" - if [ ! -d "$CUR_DIR" ] ; then - if [ -z "$TEST" ] ; then - mkdir -m $TARGET_DIR_MODE $CUR_DIR - chown $TARGET_DIR_OWNER.$TARGET_DIR_GROUP $CUR_DIR 2>/dev/null - echo created the subdirectory \"$CUR_DIR\" - else - echo would create the subdirectory \"$CUR_DIR\" - fi - fi - cd $CUR_DIR - DIR=`dirname $DIR` - done - cd $INF_DIR - if [ -n "$TEST" ] ; then - echo created the target directory \"$TARGET_DIR\" - else - echo would have created the target directory \"$TARGET_DIR\" - fi - fi - - # ------------ copy the files - for FILE in $FILES ; do - TARGETFILE="`echo $FILE | awk 'BEGIN {FS="->"}{print $2}'`" - if [ -n "$TARGETFILE" ] ; then - SOURCEFILE="`echo $FILE | awk 'BEGIN {FS="->"}{print $1}'`" - else - TARGETFILE=$FILE - SOURCEFILE=$FILE - fi - if [ $SOURCE_DIR/$SOURCEFILE -nt $TARGET_DIR/$TARGETFILE -o ! -e $TARGET_DIR/$TARGETFILE -o -n "$FORCE" ] ; then - if [ $BACKUP_DIR ] ; then - if [ ! -d $BACKUP_DIR ] ; then - test -z "$TEST" && mkdir -p $BACKUP_DIR - chown $BACKUP_OWNER.$BACKUP_GROUP $BACKUP_DIR 2>/dev/null - fi - if [ -e $TARGET_DIR/$TARGETFILE ] ; then - if [ -z $TEST ] ; then - echo " + saving old file $TARGETFILE to $BACKUP_DIR/$SOURCEFILE" - mv -f $TARGET_DIR/$TARGETFILE $BACKUP_DIR/$SOURCEFILE - chown $BACKUP_OWNER.$BACKUP_GROUP $BACKUP_DIR/$SOURCEFILE 2>/dev/null - if [ -d $BACKUP_DIR/$SOURCEFILE ]; then - tar -cjf $BACKUP_DIR/$SOURCEFILE.tar.bz2 $BACKUP_DIR/$SOURCEFILE - # FIXME: make sure this doesn't delete root - rm -rf $BACKUP_DIR/$SOURCEFILE - chmod $BACKUP_MODE $BACKUP_DIR/$SOURCEFILE.tar.bz2 2>/dev/null - else - gzip -f $BACKUP_DIR/$SOURCEFILE - chmod $BACKUP_MODE $BACKUP_DIR/$SOURCEFILE.gz 2>/dev/null - fi - else - echo " + would save old file $TARGETFILE to $BACKUP_DIR/$SOURCEFILE" - fi - fi - fi - if [ -z "$TEST" ] ; then - echo " + copying file $SOURCEFILE to $TARGET_DIR/$TARGETFILE" - test -L $TARGET_DIR/$TARGETFILE && rm -f $TARGET_DIR/$TARGETFILE # better kill links - cp -rf $SOURCE_DIR/$SOURCEFILE $TARGET_DIR/$TARGETFILE - mkdir -p $cfg_jcs_log_dir - echo $TARGET_DIR/$TARGETFILE >> $cfg_jcs_log_dir/changed_files.log - chown $TARGET_OWNER.$TARGET_GROUP $TARGET_DIR/$TARGETFILE - chmod $TARGET_MODE $TARGET_DIR/$TARGETFILE - else - echo " + would copy file $SOURCEFILE to $TARGET_DIR/$TARGETFILE" - fi - fi - - if [ -s "$TMP_LIBS_FILE.$SECTION" ] ; then - if [ "$LIB_DIR" ] ; then - if [ ! -d "$LIB_DIR" ] ; then - if [ -z "$TEST" ] ; then - mkdir -p -m $LIB_DIR_MODE $LIB_DIR - echo "created the lib directory \"$LIB_DIR\"" - else - echo "would create the lib directory \"$LIB_DIR\"" - fi - fi - fi - sort -u "$TMP_LIBS_FILE.$SECTION" | - while read -r LIB_LONG ; do - LIB_SHORT=`echo $LIB_LONG | rev | cut -d/ -f1 | rev` - if [ -z "$TEST" ] ; then - echo " - copying library $LIB_LONG to $LIB_DIR" - cp -f $LIB_LONG $LIB_DIR - chown $LIB_OWNER.$LIB_GROUP $LIB_DIR/$LIB_SHORT - chmod $LIB_MODE $LIB_DIR/$LIB_SHORT - else - echo " - would copy library $LIB_LONG to $LIB_DIR" - fi - done - rm $TMP_LIBS_FILE.$SECTION - fi - done - rm $TMP_SEC_FILE.$SECTION - fi - SECTION="$NEXT_SECTION" - -done -echo "---- Installation completed. ----" - -#TODO -rm -f $TMP_SEC_FILE. $TMP_INF_FILE 2>/dev/null -} # end function jcs_install - -# ==================== install_source.sh -jcs_sinstall() { -INSTALLDIR=$cfg_jcs_dir/src -OWNER=$cfg_jcs_owner -GROUP=$cfg_jcs_group - -usage() { - txtout "usage sinstall" # TODO: never used -} - -MYNAME=`basename $0` -ARCHIVE=$1 - -if [ ! -f "$ARCHIVE" ] ; then - echo \"$ARCHIVE\" is not a regular file. Exiting. - exit 1 -fi - -WD=`pwd` -PKGDIRNAME=`basename $WD` -echo creating $INSTALLDIR/$PKGDIRNAME -mkdir -p $INSTALLDIR/$PKGDIRNAME -tar -zxf $ARCHIVE -C$INSTALLDIR/$PKGDIRNAME \ - --owner=$OWNER --group=$GROUP -cd $INSTALLDIR/$PKGDIRNAME -rm -f cur -ln -s `find . -maxdepth 1 -cmin -2 | grep -v Makefile | sed -e 's/\.\/\|\.$//g'` cur -# test -e Makefile || cp ../Makefile.template Makefile -#$JNT_JCSDIR/bin/prepare_directory.sh -t src . -jcs_newdir -t src . -make setup -chown -R $OWNER $INSTALLDIR -chgrp -R $GROUP $INSTALLDIR -} # end function jcs_sinstall - -# ==================== make_srcpkg.sh -jcs_smake() { -#set -e - -WD="`pwd`" -TARGET=$1 -shift -SUBDIRS="$*" -test -z "$CONFIGURE" && CONFIGURE=configure - -usage() { - txtout "usage smake" -} - -case $TARGET in - setup) - for DIR in $SUBDIRS ; do - set -e - cd $DIR - echo changing to directory $DIR - ./$CONFIGURE || { - echo "$CONFIGURE does not exist. Exiting." >&2 - exit 1 - } - if [ -f Makefile ] ; then make clean; fi - make - make install - echo changing to directory $WD - cd $WD - set +e - done - ;; - install) - for DIR in $SUBDIRS ; do - make -C $DIR - make -C $DIR install - done - ;; - clean) - for DIR in $SUBDIRS ; do - make -C$DIR clean - done - ;; - *) - usage - ;; -esac -} # end function jcs_make_srcpkg - -# ==================== prepare_directory.sh -jcs_newdir() { -# ------------- constants -TEMPLATE_BASEDIR=/etc/jcs/templates/dir -MYNAME=`basename $0` - -# ------------- default values -TEMPLATE=module - -# ------------- functions -usage() { - txtout "usage newdir" -} - -# ------------- here we go -set -- `getopt t:h $*` -while [ ! "$1" = "--" ] ; do -case "$1" in - -h) - usage; exit 0;; - -t) - TEMPLATE="$2"; shift 2;; - *) - echo Unknown option $1. Exiting. >&2 - exit 1 -esac -done -shift # get past -- - -if [ -z "$1" ] ; then - usage - exit 1 -fi - -TEMPLATE_DIR=$TEMPLATE_BASEDIR/$TEMPLATE -if [ ! -d "$TEMPLATE_DIR" ] ; then - echo \"$TEMPLATE_DIR\" is not a directory. Exiting. >&2 - exit 1 -fi - -TARGETDIR="$1" - -if [ ! -d "$TARGETDIR" ] ; then - echo + creating directory \"$TARGETDIR\" - mkdir -p "$TARGETDIR" - if [ ! -d "$TARGETDIR" ] ; then - echo could not create directory \"$TARGETDIR\". Exiting >&2 - exit 1 - else - OWNR="`ls -ld "$TEMPLATE_BASEDIR" | tr -s ' ' | cut -d' ' -f3`" - GRUP="`ls -ld "$TEMPLATE_BASEDIR" | tr -s ' ' | cut -d' ' -f4`" - chown $OWNR $TARGETDIR - chgrp $GRUP $TARGETDIR - fi -fi - -for FILE in `ls -d $TEMPLATE_DIR/* | grep -v CVS` ; do - - if [ ! -e $TARGETDIR/`basename $FILE` ] - then echo + copying $FILE to $TARGETDIR - cp $FILE $TARGETDIR - fi - -done -} # end function jcs_newdir - -# ==================== config_add.sh -jcs_add() { - -# ------------- constants -MYNAME=`basename $0` -WD="`/bin/pwd`" - -# ------------- default values -MODE=GET_CONFIG - -# ------------- functions -usage() { - txtout "usage add" -} -#' reset vi fontification ... :-> - -ssh_wrapper() { - - ssh -n $TARGET_HOST "$@" - if [ $? != 0 ] ; then - echo "The secure shell connection could not be established. Exiting." >&2 - exit 1 - fi -} - -cp_wrapper() { - if [ "$1" = localhost ] ; then - if [ "" ] ; then - su - "$4" -c "cp -p $2 $3" - else - cp -p $2 $3 - fi - else - scp $1:$2 $3 - fi - -} -# ------------- get options -set -- `getopt b:hvl $*` -if [ "$?" != 0 ] ; then - eusage -fi -while [ ! "$1" = "--" ] ; do -case "$1" in - -b) - CONFIG_BASEDIR="$2" - shift 2;; - -h) - usage; exit 0;; - -v) - VERBOSE=1 - shift;; - -l) - MOVE_AND_LINK=1 - shift 1;; - *) - echo Unknown option $1. Exiting. >&2 - exit 1 -esac -done -shift # get past -- - -# ---------- check for being root -#if [ "`whoami`" != root ] ; then -# echo This program has to be executed by root. Exiting. >&2 -# exit 1 -#fi - -# ---------- rename input -test $# -ne 2 && eusage - -FILE_LOCATION="$1" -MODULE="$2" -echo $FILE_LOCATION | grep ":" >/dev/null 2>&1 -if [ $? = 0 ] ; then - FILENAME="`echo $1 | cut -d: -f2`" - TARGET_HOST="`echo $1 | cut -d: -f1`" -else - FILENAME="$1" - TARGET_HOST=localhost - test `echo $FILENAME | cut -c1` != / && FILENAME=$WD/$FILENAME -fi - -# ---------- check input - -if [ -z "$CONFIG_BASEDIR" ] ; then - if [ "$TARGET_HOST" != localhost ] ; then - echo jcs_confdir has to be specified with remote files. Exiting. >&2 - exit 1 - fi - if [ -z "$cfg_jcs_dir" ] ; then - echo cfg_jcs_dir is not set and jcs_confdir has not been specified. Exiting. >&2 - exit 1 - fi - CONFIG_BASEDIR="$cfg_jcs_dir" -fi -if [ "$TARGET_HOST" != localhost ] ; then - ssh_wrapper "echo The ssh connection can be established. >/dev/null" -fi -if [ "`echo $CONFIG_BASEDIR | cut -c 1`" != / ] ; then - usage - echo CONFIG_BASEDIR has to be an absolute path name. Exiting. >&2 - exit 1 -fi -if [ "`echo $FILENAME | cut -c 1`" != / ] ; then - usage - echo \"filename\" has to be an absolute path name. Exiting. >&2 - exit 1 -fi - -# ---------- here we go -CONFDIR=$CONFIG_BASEDIR/$MODULE -FILEBASE=`basename $FILENAME` -#cd `dirname $FILEBASE` -#SOURCEDIR=`pwd` -SOURCEDIR="`dirname $FILENAME`" - -mkdir -p $CONFIG_BASEDIR - -if [ -e "$CONFDIR" -a ! -d "$CONFDIR" ] ; then - echo \"$CONFDIR\" exists, but is not a directory. Exiting. - exit 1 -fi - -TARGETDIR=`dirname $FILENAME` -#if [ ! -d $TARGETDIR ] ; then -# echo $TARGETDIR is not a directory. Exiting. -# exit 1 -#fi - - -LINKFILEENTRY="link $FILEBASE $SOURCEDIR" -if test -r "$CONFDIR/new_link.sh" -a -n "`grep \"$LINKFILEENTRY\" $CONFDIR/new_link.sh 2>/dev/null`"; then - echo Entry \"$LINKFILEENTRY\" already exists in $CONFDIR/new_link.sh. Exiting. - exit 1 -fi - -#$JNT_LOCAL_SBINDIR/prepare_directory.sh $CONFDIR -t module || exit 1 -jcs_newdir $CONFDIR -t module || exit 1 -if [ -e $CONFDIR/$FILEBASE ] ; then - echo $CONFDIR/$FILEBASE exists! Exiting. - exit 1 -fi - -# ------------------------ makeinf part > -if [ "$TARGET_HOST" = localhost ] ; then - LSML="`ls -l $FILENAME`" -else - LSML="`ssh_wrapper ls -l $FILENAME`" -fi -cd $CONFDIR -rm *.sec *.fil 2>/dev/null - -UMOD="`echo $LSML | cut -d' ' -f1 | cut -c2-4 | sed -e s/-//g;`" -GMOD="`echo $LSML | cut -d' ' -f1 | cut -c5-7 | sed -e s/-//g;`" -OMOD="`echo $LSML | cut -d' ' -f1 | cut -c8-10| sed -e s/-//g;`" -MOD="u=$UMOD,g=$GMOD,o=$OMOD" -test -n "$DEF_NO_TARGET_WRITE_PERM" && \ - MOD="`echo $MOD | sed -e s/w//g;`" - -OWNR="`echo $LSML | tr -s ' ' | cut -d' ' -f3`" -GRUP="`echo $LSML | tr -s ' ' | cut -d' ' -f4`" - -# echo d=$TDIR f=$FILEBASE o=$OWNR g=$GRUP um=$UMOD gm=$GMOD om=$OMOD -# ------------------------ makeinf part < -if [ "$MOVE_AND_LINK" = 1 ] ; then - mv $FILEBASE $CONFDIR - echo + linking $CONFDIR/$FILEBASE -\> $SOURCEDIR/$FILEBASE - cd $WD - cd `dirname $FILENAME` - ln -sf $CONFDIR/$FILEBASE - if [ $? -gt 0 ] ; then - echo mv failed! Exiting - exit 1 - fi -else - cp_wrapper $TARGET_HOST $FILENAME $CONFDIR $cfg_jcs_owner -fi - -echo "$LINKFILEENTRY # properties: $OWNR $GRUP $MOD" >> $CONFDIR/new_link.sh - -OWNR=$cfg_jcs_owner -GRUP=$cfg_jcs_group -#chown -R $OWNR $CONFDIR -#chgrp -R $GRUP $CONFDIR -#chmod -R ug+rw $CONFDIR - -} # end function jcs_add - -# ==================== config_snapshot.sh -jcs_snapshot() { -# #/bin/bash - -# ------------- constants -MYNAME=`basename $0` -WD="`/bin/pwd`" - -# ------------- default values -MODE=GET_CONFIG - -# ------------- functions -usage() { - txtout "usage snapshot" -} -#' reset vi fontification ... :-> - -eusage() { - usage - exit 1 -} - -dump_conf_template() { -cat << EOF -# -# this is a sample configuration file for $MYNAME -# - -[options] -HOSTNAME=$HOSTNAME -CONFIG_BASEDIR=$JNT_HOMEDIR/conf/$HOSTNAME.$DOMAINNAME/$OSVERSION - -#[named] -#/etc/named.conf -#/var/named -#exclude slave -#exclude root.hint -EOF -} - -get_conf_sec() { - SECTION="$1" - cat "$2" | - cut -d\# -f1 | - tr -s '\n' '\n' | - sed -n "/\[$SECTION\]/,/\[/ p" | - grep -v '\[' -} - -ssh_wrapper() { - - ssh -n $HOSTNAME "$@" - if [ $? != 0 ] ; then - echo "The secure shell connection could not be established. Exiting." >&2 - exit 1 - fi -} -# ------------- get options -set -- `getopt dhvt: $*` -if [ "$?" != 0 ] ; then - eusage -fi -while [ ! "$1" = "--" ] ; do -case "$1" in - -h) - usage; exit 0;; - -d) - VERBOSE=1 - DEBUG=1 - shift;; - -v) - VERBOSE=1 - shift;; - -t) - HOSTNAME="$2" - MODE=DUMP_TEMPLATE - shift 2;; - *) - echo Unknown option $1. Exiting. >&2 - exit 1 -esac -done -shift # get past -- - -# ---------- check for being root -if [ "`whoami`" != root ] ; then - echo This program has to be executed by root. Exiting. >&2 - exit 1 -fi - -# ---------- handle dump template mode -if [ "$MODE" = DUMP_TEMPLATE ] ; then - - ssh_wrapper "echo The ssh connection can be established. >/dev/null" - HOSTNAME="`ssh_wrapper 'hostname' | cut -d. -f1`" - DOMAINNAME="`ssh_wrapper 'dnsdomainname'`" - OSVERSION="`ssh_wrapper 'uname -s'`-`ssh_wrapper 'uname -r'`" - OSVERSION="`echo $OSVERSION | tr -t '[A-Z]' '[a-z]'`" - dump_conf_template - exit 0 -fi - -# ---------- read config file -if [ ! -r "$1" ] ; then - echo \"$1\" is not a readable configuration file. Exiting >&2 - exit 1 -fi - -CONFFILE="$1" -eval "`get_conf_sec options $CONFFILE`" - -# ---------- check configuration -ssh_wrapper "echo The ssh connection can be established. >/dev/null" -if [ `echo $CONFIG_BASEDIR | cut -c1` != / ] ; then - echo CONFIG_BASEDIR has to be an absolute path name. Exiting. >&2 - exit 1 -fi - -# ---------- here we go -cd "`dirname $CONFFILE`" -CONFFILE="`/bin/pwd`/$CONFFILE" -mkdir -p $CONFIG_BASEDIR -cd $CONFIG_BASEDIR - -MODULES="`cat $CONFFILE | - cut -d\# -f1 | - grep '\[' | - cut -d\[ -f2 | - cut -d\] -f1 | - grep -v options`" - -[ "$DEBUG" ] && echo The modules are \>$MODULES\< - -# ----- main loop -for MOD in $MODULES ; do - - [ "$DEBUG" ] && echo processing module \"$MOD\": - # [ "$DEBUG" ] && get_conf_sec $MOD $CONFFILE - - TDIR=$CONFIG_BASEDIR/$MOD - mkdir -p $TDIR - - EXCLUDE="`get_conf_sec $MOD $CONFFILE | - grep exclude | - cut -d' ' -f2 | - tr -s ' '`" - EXCLUDE="`echo $EXCLUDE | sed -e 's/ /\\\|/g'`" - test -z "$EXCLUDE" && EXCLUDE='*' - - get_conf_sec $MOD $CONFFILE | - while read LINE ; do - if [ -z "`echo $LINE | grep exclude`" ] ; then - PATHNAME=`echo $LINE | cut -d' ' -f1` - for FILE in `ssh_wrapper "find $PATHNAME -type f" | grep -ve "$EXCLUDE"` ; do - [ "$VERBOSE" ] && echo processing $FILE ... - # scp $HOSTNAME:$FILE $TDIR -# $JNT_JCSDIR/bin/config_add.sh $HOSTNAME:$FILE $MOD -b $CONFIG_BASEDIR - config_add $HOSTNAME:$FILE $MOD -b $CONFIG_BASEDIR - done - else - [ "$DEBUG" ] && echo found exclude statement $LINE - fi - done -done - -# ---------- save the snapshot definition file -SNAPLINKNAME=last-snapshot -mkdir -p $CONFIG_BASEDIR/snapshot -rm -f $CONFIG_BASEDIR/snapshot/$SNAPLINKNAME -NEW_SNAPSHOT=`basename $CONFFILE`-`date +'%Y%m%d-%H%M%S'` -cp -p $CONFFILE $CONFIG_BASEDIR/snapshot/$NEW_SNAPSHOT -cd $CONFIG_BASEDIR/snapshot -ln -s $NEW_SNAPSHOT $SNAPLINKNAME -} # end function snapshot - -# ==================== makeinf.sh -jcs_makeinf() { - -DEF_NO_TARGET_WRITE_PERM=1 -DEF_BACKUP_GROUP=$cfg_jcs_group -DEF_BACKUP_MODE=660 -DEF_LOCAL_GROUP=$cfg_jcs_group -DEF_LOCAL_OWNER=$cfg_jcs_owner - -if [ "$1" ] ; then - if [ ! -d "$1" ] ; then - echo \"$1\" is not a directory. Exiting. >&2 - exit 1 - fi - CONFIG_BASEDIR="$1" -elif [ ! -d "$cfg_jcs_dir" ] ; then - echo \"cfg_jcs_dir\" not set to a valid directory. Exiting. - exit 1 -else - CONFIG_BASEDIR=$cfg_jcs_dir -fi - -cd $CONFIG_BASEDIR - - -LINKFILES="`find . -name new_link.sh`" -test -z "$LINKFILES" && exit 0 -echo creating .inf-files... -for LINKFILE in $LINKFILES ; do - DIR="`dirname $LINKFILE`" - cd $DIR - rm *.sec *.fil 2>/dev/null - echo +++ in $DIR... - cat new_link.sh | - while read -r LINE ; do - - TDIR="`echo $LINE | cut -d' ' -f3`" - FILE="`echo $LINE | cut -d' ' -f2`" - - if [ -n "`echo $LINE | grep properties:`" ] ; then - - PROPS="`echo $LINE | awk 'BEGIN {FS="properties:"} {print $2}'`" - OWNR="`echo $PROPS | tr -s ' ' | cut -d' ' -f1`" - GRUP="`echo $PROPS | tr -s ' ' | cut -d' ' -f2`" - MOD="`echo $PROPS | tr -s ' ' | cut -d' ' -f3`" - - else - - OWNR="`ls -l $FILE | tr -s ' ' | cut -d' ' -f3`" - GRUP="`ls -l $FILE | tr -s ' ' | cut -d' ' -f3`" - UMOD="`ls -l $FILE | cut -d' ' -f1 | cut -c2-4 | sed -e s/-//g;`" - GMOD="`ls -l $FILE | cut -d' ' -f1 | cut -c5-7 | sed -e s/-//g;`" - OMOD="`ls -l $FILE | cut -d' ' -f1 | cut -c8-10| sed -e s/-//g;`" - MOD="u=$UMOD,g=$GMOD,o=$OMOD" - - fi - - - test -n "$DEF_NO_TARGET_WRITE_PERM" && \ - MOD="`echo $MOD | sed -e s/w//g;`" - - - SUBJ="`echo $TDIR | sed -e 's/\//_/g;'`" - echo $SUBJ - echo -n "$FILE " >> $SUBJ.fil - - echo \[$SUBJ\] > $SUBJ.sec - echo INSTALLATION_SUBJECT=\"$SUBJ\" >> $SUBJ.sec - echo SOURCE_DIR=\$INF_DIR >> $SUBJ.sec - echo TARGET_DIR=$TDIR >> $SUBJ.sec - echo TARGET_OWNER=$OWNR >> $SUBJ.sec - echo TARGET_GROUP=$GRUP >> $SUBJ.sec - echo TARGET_MODE=$MOD >> $SUBJ.sec - echo BACKUP_GROUP=$DEF_BACKUP_GROUP >> $SUBJ.sec - echo BACKUP_MODE=$DEF_BACKUP_MODE >> $SUBJ.sec - echo BACKUP_DIR=\$INF_DIR/trash >> $SUBJ.sec - - echo $TDIR/$FILE >> old_links.txt - - #chown $DEF_LOCAL_OWNER $FILE - #chgrp $DEF_LOCAL_GROUP $FILE - - # echo d=$TDIR f=$FILE o=$OWNR g=$GRUP um=$UMOD gm=$GMOD om=$OMOD - - done - - for SUBJ_SEC in `ls *.sec` ; do - - INF=new_`basename $DIR`.inf - SUBJ="`echo $SUBJ_SEC | rev | cut -d. -f2- | rev`" - FILES="`cat $SUBJ.fil`" - cat $SUBJ_SEC >> $INF - echo FILES=\"$FILES\" >> $INF - echo >> $INF - done - - rm *.sec *.fil 2>/dev/null - rm new_link.sh - - #echo The following links are obsolete now: - #cat old_links.txt | awk '{print " + " $0}' - #echo -n 'Do you want them removed (yes|no)? ' - #while read -r ANSW && test ! "$ANSW" = yes -a ! "$ANSW" = no ; do - # echo -n "" - #done - ANSW=yes - if [ "$ANSW" = yes ] ; then - - for FILE in `cat old_links.txt` ; do - if [ -L $FILE ] ; then - echo + removing $FILE - rm $FILE - else - echo + $FILE is not a link. Did not remove it. >&2 - fi - done - echo It is recommended that you check $INF. - - #echo -n "Do you want \"make install\" to be issued " - #echo -n "now to reinstall the files? " - # - #while read -r ANSW && test ! "$ANSW" = yes -a ! "$ANSW" = no ; do - # echo -n "" - #done - #test "$ANSW" = yes && make install - - else - echo It is recommended that you do this yourself. - fi - - rm -f old_links.txt - - cd $CONFIG_BASEDIR - -done -} # end function makeinf - -# ==================== setval.sh -jcs_setval() { - -usage() { - txtout "usage setval" -} - -NO_QUOTES=0 -set -- `getopt hn $*` -while [ $1 != -- ] ; do - case $1 in - -n) - NO_QUOTES=1;; - -h) - usage; exit 0;; - *) - usage; exit 1;; - esac - shift -done -shift - -if [ $# -lt 3 ] ; then - usage - exit 0 -fi -if [ ! -e "$1" ] ; then - echo $1 not found. Exiting. - exit 1 -fi -if [ ! -w "$1" ] ; then - echo $1 is not a writable file. Exiting. - exit 1 -fi - - -MYNAME=`basename $0` -WD=`/bin/pwd` -DATE=`date` -FILE=$1 -KEY=$2 -shift 2 -VALUES="$*" -test -e "$FILE".$MYNAME && rm "$FILE".$MYNAME -grep "$KEY" "$FILE" >/dev/null 2>&1 || cat << EOF >> "$FILE" -# -# added by $MYNAME on $DATE -# called from within $WD -# -$KEY="dummy" - -EOF - -if [ -n "` echo "$VALUES" | grep -e ' \|\t'`" -a "$NO_QUOTES" != 1 ] ; then - # put multi-word value in quotes - # but delete all quotes before so we don't end up - # with a ""quotation"". - VAL=\"`echo $VALUES | tr -d "\""`\" -else - VAL="$VALUES" -fi - -echo -n " + $FILE: set $KEY to $VAL ... " - - -awk ' -BEGIN { - FS = "=" -} -{ - left=$1 - sub(/^ */,"",left) - sub(/ *$/,"",left) - if (left == key) { - if ($2$3$4$5$6$7$8$9$10$11$12$13$14$15$16 != val) { - print key"="val >> outfile - changed = changed $2 "-->" val" " - ++occ - next - } - } - { - print >> outfile - } -} -END { - print "changed " (occ ? occ " occurence: " changed : "nothing."); - exit occ -} ' \ - key="$KEY" val="$VAL" outfile="$FILE.$MYNAME" "$FILE" - -if [ ! $? = 0 ] ; then - mv "$FILE".$MYNAME "$FILE" - mkdir -p $cfg_jcs_log_dir - echo "$FILE" >> $cfg_jcs_log_dir/changed_files.log -else - rm "$FILE".$MYNAME -fi -} # end function jcs_setval - -# ==================== setvals -jcs_setvals() { - -MYNAME=`basename $0` -TMPFILE=/tmp/missing_keys.$MYNAME -DATE=`date` -WD=`/bin/pwd` - -# ------------- functions -usage() { - txtout "usage setvals" -} - -eusage() { - usage - exit 1 -} - -if [ $# != 2 ] ; then - eusage -fi -if [ ! -e "$1" ] ; then - echo $1 not found. Exiting. - exit 1 -fi -if [ ! -f "$2" ] ; then - echo $2 is not a regular file. Exiting. - exit 1 -fi -if [ ! -w "$1" ] ; then - echo $1 is not a writable file. Exiting. - exit 1 -fi - -rm -f $TMPFILE -cat $2 | cut -d\# -f1 | sed -e 's/=/ /' | -while read KEY VAL; do - test -n "$KEY" && (grep "$KEY" $1 >/dev/null 2>&1 ||\ - echo $KEY=\"dummy\" >> $TMPFILE) -done - -if [ -f $TMPFILE ] ; then -cat << EOF >> $1 - -# -# missing keys inserted by $MYNAME -# on $DATE -# from $WD -# -EOF - -cat $TMPFILE >> $1 -fi - -cat $2 | cut -d\# -f1 | sed -e 's/=/ /' | -while read KEY VAL; do - if test -n "$KEY" ; then - jcs_setval $1 $KEY "$VAL" - fi -done -} - -# ==================== mkdirs -jcs_mkdirs() { - -PREFIX="" -WD=`pwd` - -usage() { - txtout "usage mkdirs" -} - -eusage() { - usage - exit 1 -} - -# ------------- get options -set -- `getopt p:h $*` -if [ "$?" != 0 ] ; then - eusage -fi -while [ ! "$1" = "--" ] ; do -case "$1" in - -h) - usage; exit 0;; - -p) - PREFIX="$2"; shift 2;; - *) - echo Unknown option $1. Exiting. >&2 - exit 1 -esac -done -shift # get past -- - -if [ $# != 1 ] ; then - eusage -fi -if [ ! -f "$1" ] ; then - echo $1 is not a regular file. Exiting. - exit 1 -fi -if [ -n "$PREFIX" -a ! -d "$PREFIX" ] ; then - echo \"$PREFIX\" is not a directory. Exiting. >&2 - exit 1 -else - echo changing to directory \"$PREFIX\" - cd $PREFIX -fi - -cat $WD/$1 | cut -d\# -f1 | -while read DIR USER GROUP MODE ; do - if [ -n "$MODE" ] ; then - echo -n Creating directory $DIR ..." " - mkdir -p $DIR - chown $USER $DIR - chgrp $GROUP $DIR - chmod $MODE $DIR - echo done. - fi -done - -} - -# ==================== useradd -jcs_useradd() { - -usage() { - txtout "usage useradd" -} - -eusage() { - usage - exit 1 -} - -test "`whoami`" = root || { - echo "This program has to be executed by root. Exiting." >&2 - exit 1 -} - -set -- `getopt hu:g: $*` -while [ $1 != -- ] ; do - case $1 in - -u) - USERFILE=$2 - test -r "$USERFILE" || { - echo "\"$USERFILE\" is not a readable file. Exiting." >$2 - exit 1 - } - shift;; - -g) - GROUPFILE=$2 - test -r "$GROUPFILE" || { - echo "\"$GROUPFILE\" is not a readable file. Exiting." >$2 - exit 1 - } - shift;; - -h) - usage; exit 0;; - *) - usage; exit 1;; - esac - shift -done -shift - -for CMD in which useradd groupadd ; do - test -z "`which $CMD 2>/dev/null`" && { - echo $CMD not found. Exiting. >&2 - exit 1 - } -done - -if [ $# != 1 ] ; then - eusage -fi -if [ ! -f "$1" ] ; then - echo $1 is not a regular file. Exiting. - exit 1 -fi - -cat $1 | - -while read CMD ARG1 ARG2 ARG3 ARG4 ARG5 ARGN ; do - NEWGRPS="" - case "$CMD" in - USER) - test -n "$USERFILE" && grep -e "^ *$ARG1 *$" $USERFILE >/dev/null || continue - if ! grep -e "^$ARG1:" /etc/passwd >/dev/null 2>&1 ; then - echo -n adding user $ARG1, uid $ARG2, dir $ARG3, \ - groups $ARG4 $ARG5 $REST ..." " - #GRPS=`echo "$ARG4 $ARG5 $ARGN $REST" | tr "\t" " " | tr -s ' ' | - # sed -e 's/ $//' | sed -e 's/ /,/g' | tr -d " \n\r\t"` - for NEWGRP in $ARG4 $ARG5 $ARGN $REST; do - NEWGRP=$NEWGRP - if [ -n "$GROUPFILE" ]; then - grep -e "^ *$NEWGRP *$" $GROUPFILE >/dev/null || continue - fi - NEWGRPS="$NEWGRPS,$NEWGRP" - done - NEWGRPS=`echo $NEWGRPS | sed -e 's/^ *,//'` - useradd -u $ARG2 -d $ARG3 -g $ARG4 -G $NEWGRPS $ARG1 - [ -d $ARG3 ] || { - mkdir -p $ARG3/dat $ARG3/local - chown $ARG1 $ARG3 $ARG3/dat $ARG3/local - chgrp $ARG4 $ARG3 $ARG3/dat $ARG3/local - } - echo done - else - echo -n user $ARG1 already exists on this system - NEWGRPS="" - OLDGRPS=`groups $ARG1 | cut -d: -f2` - for NEWGRP in $ARG4 $ARG5 $ARGN $REST ; do - test -n "$GROUPFILE" && grep -e "^ *$NEWGRP *$" $GROUPFILE >/dev/null || continue - if ! echo $OLDGRPS | tr " " "\n" | - grep -e "^$NEWGRP$" >/dev/null 2>&1 ; then - NEWGRPS="$NEWGRPS $NEWGRP" - fi - done - if [ -n "$NEWGRPS" ] ; then - echo - echo " but adding him to group(s) $NEWGRPS" - usermod -G "`echo $OLDGRPS $NEWGRPS | tr -s ' ' | - sed -e 's/^ \| $//' | - tr ' ' ','`" $ARG1 - else - echo " - skipping" - fi - fi - ;; - GROUP) - test -n "$GROUPFILE" && grep -e "^ *$ARG1 *$" $GROUPFILE >/dev/null || continue - if ! grep -e "^$ARG1:" /etc/group >/dev/null 2>&1 ; then - echo adding group $ARG1, gid $ARG2 - groupadd $ARG1 -g $ARG2 - - else - echo group $ARG1 already exists on this system - skipping - fi - ;; - *) - ;; - esac -done - -} - -jcs_touch() { - touch $1 - chown $cfg_jcs_owner $1 - chgrp $cfg_jcs_group $1 -} - -jcs_fetch() { - local cvs_dir=`echo $cfg_jcs_dir | sed 's%/conf/.*%%'` - local cvs_mod=`echo $cfg_jcs_dir | sed 's%.*/conf/%conf/%'` - if [ "$cvs_dir" -a "$cvs_mod" ]; then - ( - mkdir -p $cvs_dir || return 1 - cd $cvs_dir - cvs checkout -P $cvs_mod || return 1 - cd $cvs_mod - ) - fi -} - -jcs_setup() { - test -d "$cfg_jcs_dir" && { - ( - cd $cfg_jcs_dir - make setup - ) - } -} - -# ===================== This is jcs - -SCRIPTNAME=$0 - -test -z "$1" && eusage - -while test -n "$1" ; do - if test "`echo $1 | cut -c1`" != - ; then - break - fi - case $1 in - -h) - usage - exit 0;; - -V) - version - exit 0;; - -q) - GLOB_OPT_QUIET=1 - exit 0;; - -v) - GLOB_OPT_VERBOSE=1 - exit 0;; - *) - echo unknown option $1. Exiting. >&2 - eusage 1;; - esac - shift -done - -txtout commands | grep $1 >/dev/null -if test $? != 0 ; then - echo \"$1\" is not a known command. >&2 - eusage -fi - -if [ "`echo $@ | cut -d' ' -f1`" != init ] ; then - get_config -fi - -CMD=$1 -shift - -jcs_$CMD "$@" || exit 1 - -exit 0 - --->>>-- commands -- - init - wipe - add - get - install - sinstall - smake - makeinf - newdir - setval - setvals - mkdirs - useradd - touch - setup - fetch ---<<<-- commands -- - --->>>-- global usage -- - -usage: jcs [global_opts] command [command_opts] - -where global_opts is out of - - -h : display this help screen - -v : be verbose about what is done - -q : work in silence - -V : display version number and exit - -command is one of - ---<<<-- global usage -- - --->>>-- global usage 2 -- - -Most of the commands understand the option -h and -display a usage message explaining its meaning. - ---<<<-- global usage 2 -- - --->>>-- jcs version -- -Jannet Configuration Shadow -Version '$Revision$' - '$Date$' -(c) 2000, 2001 jannet it services ---<<<-- jcs version -- - --->>>-- usage init -- -usage: jcs init [-h] [-c jcs_config_source_dir] - -jcs init is used to create the directory tree under /etc/jcs -which is necessary for jcs to work correctly. In this -directory structure the files jcs.conf, where some variables -are set and jcs.mk, the standard makefile that is included -in most makefiles in the jcs, can be found. Also, in the -subdirectory "templates", there are template directories that -are used by "jcs newdir" and "jcs add" upon creation of a new -module directory. "jcs add" searches for a template directory -"module" by default. - -if -c jcs_config_source_dir is specified, the relevant files under -jcs_config_source_dir are copied to /etc/jcs. For relevant files -that are not present under jcs_config_source_dir, a default version -is created. ---<<<-- usage init -- - --->>>-- usage add -- - - jcs add is used to add a file from either the local or a remote - machine to the jannet configuration shadow (jcs). - - usage: - jcs add [-lv] [-b jcs_basedir] [hostname:]filename module - jcs add -h - - -b jcs_basedir: - use jcs_basedir/module rather than cfg_jcs_dir/module - (as specified in /etc/jcs/jcs.conf) for storing the file. - This option is mandatory if hostname is specified. - -h: show this usage message - -v: run in verbose mode - -l: move the file to the jcs rather than just copy it. - Substitute the original file with a symbolic link to - its new location (only available if hostname is not - specified). - - see also: - - jcs makeinf for automatically creating .inf information files - ---<<<-- usage add -- - --->>>-- usage snapshot -- - - jcs snapshot is used to store the configuration - of a given machine into a jannet configuration - shadow (jcs) directory tree. The connection - to the given machine is set up via ssh. Thus, - if you don't want to enter passwords many times - it is recomendable that you set up a passwordless - login from this host to the target machine. - - usage: - jcs snapshot [-v] configfile - jcs snapshot -h - jcs snapshot [-v] -t hostname - - -h: shows this usage message - -v: verbose - -t: writes a template for a configuration - file to standard output. It is attempted - to establish a connection to hostname as - root via ssh. - ---<<<-- usage snapshot -- - --->>>-- usage install -- - -jcs install installs files according to an installation -description in a .inf file - - usage: - jcs install .inf-file [-h] [-f] [-t] [-b backup-dir] - - -b dir: make a backup into directory dir - - -f: force an installation, irrespective of the - files' modification dates. If this option - is not present, jcs overwrites destination files - only when the source file is newer than the - destination - - -p prefix: prepend target directories with prefix - - -t: test mode (don't actually install anything, but log - what would be installed) - ---<<<-- usage install -- - --->>>-- usage smake -- -usage: jcs smake: {install|setup|clean} subdirs... ---<<<-- usage smake -- - --->>>-- usage sinstall -- -usage: jcs sinstall tar.gz-archive ---<<<-- usage sinstall -- - --->>>-- usage makeinf -- - jcs makeinf looks for files named new_link.sh under - the directory specified by JCS_CONFDIR in /etc/jcs/jcs.conf. - it then transforms the contents of these files into - .inf - files. ---<<<-- usage makeinf -- - --->>>-- usage newdir -- -usage: jcs newdir [-h] [-t template_directory] target_directory ---<<<-- usage newdir -- - --->>>-- usage setval -- -usage : jcs setval [-n] config-file key value -options: -n: don't put quotation marks around a multiword value ---<<<-- usage setval -- - --->>>-- usage setvals -- -usage : jcs setvals config-file template-file ---<<<-- usage setvals -- - --->>>-- usage mkdirs -- - -usage : jcs mkdirs [-p prefix] config-file - -jcs mkdirs is used to create some directories, as specified in -config-file. Each line in config-file describes one directory -to be created. It consists of 4 words, in the order: - - NAME USER GROUP MODE - -which have the obvious meanings. -Everything on the right hand side of a # sign is ignored. - -If a prefix is specified with -p, all directories that don't -start with a "/" character, will be created relative to the -directory specified by prefix. The directory specified by -prefix will not be created, it has to exist beforehand, other- -wise jcs will display an error message and quit. ---<<<-- usage mkdirs -- - --->>>-- usage useradd -- - -usage : jcs useradd [-u user-file] [-g group-file] config-file - -jcs useradd is used to add users and groups to the system. -Each line in config-file describes either a user to be added -or a group to be added. If a user or a group already exists on -the system neither is their id changed nor are users removed -from groups. They are added, however if this is specified by -an entry in config-file. - -Lines in config file start either with the word "USER" or with -the word "GROUP" and have the following formats: - - USER username uid homedir group [group ...] - GROUP groupname gid - -Everything on the right hand side of a # sign is ignored. - -If user-file is specified, only users listed in user-file will be -added. If group-file is specified, only groups listed in -group-file will be added. The lines in these files must contain -one entry each. - ---<<<-- usage useradd -- - --->>>-- usage get -- -usage: jcs get [-t] files ... - jcs get [-h] ---<<<-- usage get -- - --->>>-- jcs.mk -- -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 ---<<<-- jcs.mk -- - --->>>-- jcs.conf.oldstyle -- -JNT_CONFDIR=/tmp -JNT_USE_CHECKSUM=FALSE -JNT_JCSDIR=/tmp ---<<<-- jcs.conf.oldstyle -- - --->>>-- jcs.conf -- -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 ---<<<-- jcs.conf -- - --->>>-- /etc/jcs/templates/dir/module/Makefile -- -# jannet configuration shadow -# (c) 2000 - 2001 jannet -# contact@jannet.de - -include /etc/jcs/jcs.mk ---<<<-- /etc/jcs/templates/dir/module/Makefile -- - --->>>-- /etc/jcs/templates/dir/src/Makefile -- -# jannet configuration shadow -# (c) 2000 jannet -# contact@jannet.de -MAKE_SH := /opt/jw-build/bin/jcs smake - -SUBDIRS = cur - -setup: - $(MAKE_SH) setup $(SUBDIRS) - -install: - $(MAKE_SH) install $(SUBDIRS) - -clean: - $(MAKE_SH) clean $(SUBDIRS) ---<<<-- /etc/jcs/templates/dir/src/Makefile -- - --->>>-- old config warning -- -+--------------------------------------------+ -| | -| C A U T I O N | -| | -| It looks like you are using an old style | -| jcs configuration file /etc/jcs/jcs.conf. | -| Use of this format is deprecated. JCS will | -| now translate it into the new style format.| -| Also the file /etc/jcs/jcs.mk will be re- | -| placed, since it's default version also | -| makes use of /etc/jcs/jcs.conf. If you have| -| edited it yourself, you will have to adapt | -| it to meet your needs, otherwise JCS will | -| cease to function properly. | -| | -| Both files will be backed up with an | -| ".oldstyle" appended to their names. | -| | -+--------------------------------------------+ ---<<<-- old config warning -- diff --git a/scripts/jw-build-create-project.sh b/scripts/jw-build-create-project.sh deleted file mode 100644 index d160096b..00000000 --- a/scripts/jw-build-create-project.sh +++ /dev/null @@ -1,197 +0,0 @@ -#!/bin/bash - -log() -{ - echo $@ -} - -err() -{ - log $@ -} - -fatal() -{ - err $@ - exit 1 -} - -usage() -{ - echo "$myname [-h] [-s summary] [-d description] [-g pkg-group] name" - [ "$1" ] && exit $1 -} - -cat_Makefile() -{ - cat <<-EOT - TOPDIR = . - - include \$(TOPDIR)/make/proj.mk - include \$(JWBDIR)/make/topdir.mk - EOT -} - -cat_VERSION() -{ - cat <<-EOT - 1.0.0-0-dev - EOT -} - -cat_make_Makefile() -{ - cat <<-EOT - TOPDIR = .. - - include \$(TOPDIR)/make/proj.mk - include \$(JWBDIR)/make/make.mk - EOT -} - -cat_make_proj_mk() -{ - cat <<-EOT - # to be included from inside the project directory - - DEV_PROJECTS_DIR ?= \$(TOPDIR)/.. - ifeq (\$(TARGET),mingw) - FLAVOUR_PATH_PREFIX = win32/ - endif - JWBDIR ?= \$(firstword \$(wildcard \$(DEV_PROJECTS_DIR)/jw-build \$(BUILD_TOOLS_PREFIX)/opt/\$(FLAVOUR_PATH_PREFIX)jw-build)) - - USE_PROJECT_LIB = false - HDRDIR_SCOPE_SUFFIX = \$(PROJECT) - EOT -} - -cat_make_project_conf() -{ - local login=$JANWARE_USER - [ "$login" ] || login=`whoami` - - local fullname=`getent passwd $login | cut -d: -f5` - [ "$fullname" ] || fullname=$JANWARE_USER - [ "$fullname" ] || fullname=`whoami | xargs getent passwd | cut -d: -f5` - [ "$fullname" ] || fullname=`whoami` - - cat <<-EOT - [summary] - $summary - - [description] - $description - - [global] - group = "$pkg_group" - subpackages = $subpackages - license = Copyright (c) $fullname, all rights reserved - jw-maintainer = $JANWARE_USER - - [build] - libname = none - - [pkg.requires.jw] - devel = $name-run = VERSION-REVISION, jw-build-devel = VERSION - build = jw-build-devel - EOT -} - -cat_gitignore() -{ - cat <<-EOT - *.done - *.dist - *.dep.mk - .cache.mk - *.o - *.so.* - *.so - *.a - *.rep - ld-*.conf - *.ldscript - *.pc - $name - *_generated_* - *.secret - local.mk - .gdb_history - dist - mkspec.sh - *.out - *.orig - *.old - .feedfs_history - .exrc - *.swp - *tmp* - __init__.py - __pycache__ - EOT -} - -# ---------------------- here we go - -myname=`basename $0` -projdir=. - -summary= -description= -subpackages="run" - -eval set -- `getopt -- hd:s:p:g: "$@"` - -while [ "$1" != -- ]; do -case $1 in - -d) - eval description=\"$2\" - shift;; - -s) - eval summary=\"$2\" - shift;; - -p) - eval subpackages=\"$2\" - shift;; - -g) - eval pkg_group=\"$2\" - shift;; - -h) - usage 0;; - *) - usage 1;; -esac -shift -done -shift - -[ -z "$description" ] && description="$summary" -[ -z "$summary" ] && summary="$description" -[ -z "$pkg_group" ] && pkg_group="Amusements/Teaching/Other" - -[ -f $projdir/Makefile ] || { - fatal "$projdir doesn't contain a Makefile" -} - -name="$1" - -[ -d $projdir/$name ] && { - fatal "$projdir/$name already exists" -} - -set -e - -mkdir -p $projdir -mkdir $name -cd $projdir/$name - -mkdir make -cat_Makefile > Makefile -cat_make_Makefile > make/Makefile -cat_VERSION > VERSION -cat_make_proj_mk > make/proj.mk -cat_make_project_conf > make/project.conf -cat_gitignore > .gitignore - -log Successfully created project template \"$name\". - diff --git a/scripts/jw-build-ssh.sh b/scripts/jw-build-ssh.sh deleted file mode 100644 index df55ff39..00000000 --- a/scripts/jw-build-ssh.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -/usr/bin/ssh $JW_BUILD_SSH_EXTRA_OPTS "$@" - diff --git a/scripts/jw-pkg b/scripts/jw-pkg deleted file mode 100644 index 6afb0759..00000000 --- a/scripts/jw-pkg +++ /dev/null @@ -1,503 +0,0 @@ -#!/bin/bash - -log() -{ - if [ "$1" = -n ]; then - shift - echo -n "$myname: $*" - return - fi - - if [ "$1" = -c ]; then - shift - echo "$*" - return - fi - - if [ "$1" = -C ]; then - shift - echo -n "$*" - return - fi - - echo "$myname: $*" -} - -channel_present() -{ - if smart channel --show $1 2>&1 | grep -q baseurl >/dev/null; then - return 0 - fi - return 1 -} - -usage() -{ -cat << EOT - - $myname [global options] command [options] [package ...] - - command is one of - - help: show this help screen - init: initialize - uninit: undo initialization - install: install packages in [arguments] - update: update all jannet software on the system - restore: restore a previous jannet software version state - list: query information about installed software packages - list-projects: query information about installed software projects - checklog: update the installation log file if necessary - rpmnew: remove superfluous rpmnew files and show conflicts - for others - build-date: show installed janware packages along with build date - built-today: show installed janware packages built today - - list-changed-files: list files changed since installation - - list-templates: list templates - list-template-tables: list templates tables - list-template-output: list template output files - rm-template-output: remove template output files - compile-templates: compile templates - - global options are - - -v be verbose - - package - - optional whitespace-separated list of package names, generally limiting the - scope of the command to the specified packages, defaults to all installed - janware packages - -EOT - [ "$1" ] && exit $1 -} - -create_ldconfig_state() -{ - echo "=== automatically created by $myname update script" - echo "--- files" - ls /etc/ld.so.conf.d - echo "--- directories" - find /etc/ld.so.conf.d -type f | xargs cat | sort -u -} - -check_ldconfig() -{ - local state=/var/log/jw-build-ldconf.state - [ -f $state ] && create_ldconfig_state | diff $state - >/dev/null 2>&1 && return - echo -n "running ldconfig ... " - /sbin/ldconfig - create_ldconfig_state > $state - echo "done." -} - -list_packages() -{ - local query_tags="" - - eval set -- `getopt -- VPNUD "$@"` - while [ "$1" != -- ]; do - case $1 in - -V) - query_tags="$query_tags %{Vendor}" - ;; - -P) - query_tags="$query_tags %{Packager}" - ;; - -U) - query_tags="$query_tags %{URL}" - ;; - -D) - query_tags="$query_tags %{Distribution}" - ;; - *) - echo -e "Unexpected argument >$1<\n" >&2 - usage 1 - ;; - esac - shift - done - shift - - [ "$query_tags" ] || query_tags="%{URL}" - - local names="$1" - local rpm_args - if [ -n "$names" ]; then - rpm_args="$rpm_args $names" - else - rpm_args="$rpm_args -a" - fi - rpm -q --queryformat "%{Name}: $query_tags\n" $rpm_args | \ - grep -i '^[^ ]\+:.*\(jannet\|janware\)' | \ - sed 's/\(^[^ ]\+\) *:.*/\1/; s/[ ]*$//' |\ - sort -u -} - -list_projects() -{ - list_packages "$@" | xargs -r rpm -q --queryformat '%{SOURCERPM}\n' | \ - sed 's/[ ]*//; s/-[0-9]\+.*//' |\ - sort -u -} - -list_files() -{ - # Need to sort -u, because apparently, during installation, rpm -ql - # returns every file in the package _twice_. Funny. - list_packages "$@" | sort -u | xargs -r rpm -ql -} - -cmd_rpmnew() -{ - local file - - list_files "$@" | - while read file; do - if [ -e "$file.rpmnew" ]; then - if diff -q $file $file.rpmnew; then - if [ -L "$file" ]; then - echo ========== skipping link $file - diff $file.rpmnew $file - continue - fi - echo mv $file.rpmnew $file - sudo mv $file.rpmnew $file - else - echo =========== $file - diff $file.rpmnew $file - fi - fi - done -} - -cmd_diff() -{ - local file - - list_packages "$@" | - xargs -r rpm -qV | - sed '/^....L\|^..5/ !d; s%[^/]*/%/%' | - while read file; do - if diff -q $file $file.rpmnew; then - if [ -L "$file" ]; then - echo ========== skipping link $file - diff $file.rpmnew $file - continue - fi - echo mv $file.rpmnew $file - sudo mv $file.rpmnew $file - else - echo =========== $file - diff $file.rpmnew $file - fi - done -} - -cmd_build_date() -{ - list_packages "$@" | - xargs -r rpm -q --queryformat '%{BUILDTIME} %{NAME}\n' | - sort -n | - sed 's/-run\|-devel//' | - sort -u | - while read t p; do - echo `date --date=@$t --rfc-3339=seconds` $p - done -} - -cmd_list_templates() -{ - local ext_from="$template_exts" # TODO: support more than one - local ext_from_re=`echo $ext_from | sed 's/\./\\./g'` - local f - - list_files "$@" | while read f; do - [ -f "$f" -o -L "$f" ] || continue - echo $f | grep -q "$ext_from_re$" || continue - echo $f - done -} - -cmd_list_template_tables() -{ - local ext_from="$table_exts" - local e f t - list_files "$@" | while read f; do - [ -f "$f" -o -L "$f" ] || continue - for e in $ext_from; do - t="${f%.*}$e" - [ -f "$t" ] || continue - echo $t - done - done -} - -cmd_list_template_output() -{ - local re=`echo $template_exts | sed 's/\./\\\\./g; s/^ *//; s/ *$//; s/ */$\\\\|/g; s/\(.*\)/\\\\(\1$\\\\)/'` - local f - list_files "$@" | sed "/$re/ !d; s/$re//" | while read f; do - [ -f "$f" -o -L "$f" ] || continue - echo $f - done -} - -cmd_rm_template_output() -{ - local restore=0 - while [ "${1:0:1}" = '-' ]; do - case "$1" in - -r) - restore=1 - ;; - *) - usage 1 - ;; - esac - shift - done - - local f - cmd_list_template_output $@ | while read f; do - log "removing $f" - rm $f - bak=$f$template_bak_ext - if [ "$restore" = 1 -a -f "$bak" ]; then - log "restoring $f from $bak" - mv $bak $f - fi - done -} - -cmd_compile_templates() -{ - __md() { - stat --format '%U:%G %a' "$1" 2>/dev/null - } - - local ext_from="$template_exts" # TODO: support more than one - local ext_from_re=`echo $template_exts | sed 's/\./\\./g'` - local ext_to="" - local ext_tables="$table_exts" - local default_group=root - local default_owner=root - local default_mode=600 - local conf_patt="^[ ]*# *conf:" - local missing_table=0 - local backup=0 - - umask 0077 - - while [ "${1:0:1}" = '-' ]; do - case "$1" in - -o) - default_owner="$2" - shift - ;; - -m) - default_mode="$2" - shift - ;; - -g) - default_group="$2" - shift - ;; - -b) - backup=1 - ;; - -c) - conf_patt="$2" - shift - ;; - *) - usage 1 - ;; - esac - shift - done - - local f - while read f; do - local base=`echo $f | sed "s/$ext_from_re$//"` - [ "$base" ] || continue - local to=$base$ext_to - local table="" - local ext - for ext in $ext_tables; do - table=$base$ext - [ -f "$table" ] && break - done - [ -f $table ] || { - log "WARNING: No key-value table found for template $f, not compiling." >&2 - ((missing_table++)) - continue - } - # TODO: use mktemp -d and keep temporary files in read-only dir - local tmp=$to.tmp - log -n "Applying macros in $table to $f" - local mode=$default_mode - local owner=$default_owner - local group=$default_group - local diff="" - eval `sed "/$conf_patt/ !d; s/$conf_patt//" $f` - eval `sed "/$conf_patt/ !d; s/$conf_patt//" $table` - sed 's|^[ ]*#.*||; s|/|\\/|g; s|\([^ =]\+\)[ =]\+\(.*\)|s/\1/\2/g|' $table | sed -f - $f > $tmp - chmod $mode $tmp - chown $owner $tmp - chgrp $group $tmp - diff -q $tmp $to >/dev/null 2>&1 || diff="@content" - local md_to=$(__md "$to") - local md_tmp=$(__md "$tmp") - [ "$md_to" = "$md_tmp" ] || diff="$diff@metadata ($md_to -> $md_tmp)" - if [ -z "$diff" ]; then - log -c ", no changes." - rm $tmp - continue - fi - local bak=$to$template_bak_ext - if [ "$backup" = 1 -a -f $to ] && ! diff -q $to $bak >/dev/null 2>&1; then - log -C ", saving backup to $to to $bak" - cp -p $to $bak - fi - mv $tmp $to - diff=${diff##@} - log -c ", updating ${diff//@/ + }, done." - done <<< $(cmd_list_templates "$@") - - if [ "$missing_table" != 0 ]; then - log "WARNING: $missing_table missing tables found. You might want to add them and run sudo $cmdline again." - fi -} - -cmd_get_value_from_tables() -{ - local key show_file - eval set -- `getopt -- k: "$@"` - while [ "$1" != -- ]; do - case $1 in - -k) - key=$2 - shift - ;; - -f) - show_file=1 - shift - ;; - *) - echo -e "Unexpected argument >$1<\n" >&2 - usage 1 - ;; - esac - shift - done - shift - - local f - while read f; do - grep -q "^\s*$key\s\+" $f || continue - [ "$show_file" = 1 ] && echo -n "$f: " - sed "s|^[ ]*#.*||; /^\s*$key\(\s\|=\)\+/ !d; s/^\s*$key\(\s\|=\)\+//" $f - done <<< $(cmd_list_template_tables "$@") -} - -cmd_built_today() -{ - local today=`date +'%Y-%m-%d'` - cmd_build_date | grep $today | cut -d' ' -f3 -} - -cmd_list_changed_files() -{ - list_projects "$@" | xargs rpm -qV | grep '^..5' | sed 's|[^/]*/|/|' -} - -# ----- here we go - -cmdline="$0 $@" -myname=`basename $0` -longname=$0 -opts="v" -table_exts=".jw-secret .jw-vars" -template_exts=".jw-tmpl" -template_bak_ext=".jw-pkg.bak" - -while [ "${1:0:1}" = '-' ]; do -case "$1" in --v) - opt_verbose=true - shift - ;; -*) - usage 1 - ;; -esac -shift -done - -cmd="${1//-/_}" -shift - -case $cmd in - -# -- TODO: re-implement this using pkg-manager.sh, or integrate with pkg-manager.sh -#init) -# if ! channel_present ftp.jannet.de; then -# echo -n "adding installation source ... " -# sudo smart channel -y --add ftp.jannet.de \ -# type=yast2 \ -# baseurl=ftp://dspadm:dspasswd@ftp.jannet.de/pub/packages/linux/suse/10.1 \ -# >/dev/null 2>&1 -# if channel_present; then echo done; else echo failed; fi -# fi -# ;; -# -#uninit) -# if channel_present ftp.jannet.de; then -# echo -n "removing installation source ... " -# sudo smart channel -y --remove ftp.jannet.de >/dev/null 2>&1 -# echo done -# fi -# ;; -# -#update) -# sudo smart update ftp.jannet.de -# sudo smart upgrade -y -# check_ldconfig -# ;; -# -#install) -# sudo smart update ftp.jannet.de -# if [ -f $1 ]; then -# sudo smart install -y `cat $1` -# else -# sudo smart install -y $* -# fi -# check_ldconfig -# ;; -#restore) -# echo "not yet implemented, sorry" >&2 -# ;; -list) - if [ "$opt_verbose" = true ]; then - list_packages "$@" | xargs -r rpm -qi - else - list_packages "$@" | xargs -r rpm -q - fi - ;; -list_projects) - list_projects "$@" - ;; -compile_templates|list_templates|list_template_tables|list_template_output|rm_template_output|diff|build_date|built_today|rpmnew|get_value_from_tables|list_changed_files) - cmd_$cmd "$@" - ;; -help) - usage 0 - ;; -*) - usage 1 - ;; -esac diff --git a/scripts/linktree.sh b/scripts/linktree.sh deleted file mode 100644 index 074ce4f8..00000000 --- a/scripts/linktree.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -ldflags="$@" -for f in $ldflags; do - echo checking $f - if [ "${f:0:2}" = -l ]; then - libs="$libs ${f:2}" - fi -done - -echo libs=$libs -path=$LD_LIBRARY_PATH -path=${path//:/ } -for l in $libs; do - lp= - for p in $path; do - lpc=$p/lib$l.so - if [ -r $lpc ]; then - lp=$lpc - break - fi - done - [ -n "$lp" ] || { - echo library $l not found in path, skipping - continue - } - echo ==================================== $lp - lddtree $lp -done - diff --git a/scripts/make-version-script.sh b/scripts/make-version-script.sh deleted file mode 100644 index cc9fac44..00000000 --- a/scripts/make-version-script.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -######################################################################## -# # -# generic utiltiy modules # -# (c) 2001 jannet it services # -# contact@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. # -# # -######################################################################## - - -version_tag=$1 - -cat << EOT -VERSION { - $version_tag { - global: - *; - }; -} -EOT diff --git a/scripts/mkspec-wrapper.sh b/scripts/mkspec-wrapper.sh deleted file mode 100644 index 87fb9dfe..00000000 --- a/scripts/mkspec-wrapper.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash - -usage() -{ - echo usage: $MYNAME /path/to/mkspec.sh -h [-N name] [-T topdir] [-V version] [-S source] [-R requires] [-P project] >&2 - [ "$1" ] && exit $1 -} - -append() -{ - local var=$1 - shift - local tmp=`eval echo \"\\$$var $@\" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//'` - eval $var=\"$tmp\" -} - -# -- here we go - -#set -x - -MYNAME=`basename $0` -ID=`whoami` -[ ! "$INSTALL_LOG" ] && INSTALL_LOG=/tmp/rpmbuild-$ID/install.log - -eval set -- `getopt -l "provides-run:" -l "provides-devel:" -o "P:T:V:S:N:hR:D:X:Y:d:" -- "$@"` - -while [ "$1" != -- ]; do -echo checking "$1=$2" >&2 -case $1 in - -h) - usage 0;; - -T) - TOPDIR="$2" - shift;; - -V) - V="$2" - shift;; - -S) - SOURCE="$2" - shift;; - -N) - NAME="$2" - shift;; - -R) - append REQUIRES_RUN "$2" - shift - ;; - -X) - append CONFLICTS_RUN "$2" - shift - ;; - -D) - append REQUIRES_DEVEL "$2" - shift - ;; - -Y) - append CONFLICTS_DEVEL "$2" - shift - ;; - --provides-run) - append PROVIDES_RUN "$2" - shift - ;; - --provides-devel) - append PROVIDES_DEVEL "$2" - shift - ;; - -P) - PROJECT="$2" - shift;; - -d) - DISTRIBUTION="$2" - shift;; - *) - usage 1;; -esac -shift -done -shift - -MKSPEC_SH="$1" -shift - -[ -z "$TOPDIR" ] && TOPDIR=. - -if [ -z "$V" ]; then - if [ -f $TOPDIR/VERSION ]; then - VERSION="`cat $TOPDIR/VERSION | cut -d- -f1`" - RELEASE="`cat $TOPDIR/VERSION | cut -d- -f2- | sed 's/[-_].*//'`" - else - VERSION=noversion - RELEASE=norelease - fi -else - VERSION="`echo $V | cut -d- -f1`" - RELEASE="`cat $TOPDIR/VERSION | cut -d- -f2- | sed 's/[-_].*//'`" -fi - -if [ -z "$NAME" ]; then - NAME=`pwd | xargs basename` -fi - -REQUIRES="$REQUIRES_RUN $REQUIRES_DEVEL" -CONFLICTS="$CONFLICTS_RUN $CONFLICTS_DEVEL" -#if [ -n "$REQUIRES" ]; then -# REQUIRES_RUN=`echo $REQUIRES | -# sed -e ' -# s/\([a-zA-Z-]\+\) *\([<>=]*\) *\([a-zA-Z0-9\.-]*\)/\1-run \2 \3,/g -# s/,$// -# s/-run-run/-run/ -# '` -# REQUIRES_DEVEL="$REQUIRES_RUN, $NAME-run = $VERSION-$RELEASE, `echo $REQUIRES_RUN | sed -e 's/-run/-devel/g'`" -#fi - -#echo "REQUIRES_RUN=\"$REQUIRES_RUN\"" -#exit - -export \ - REQUIRES REQUIRES_RUN REQUIRES_DEVEL \ - CONFLICTS CONFLICTS_RUN CONFLICTS_DEVEL \ - PROVIDES PROVIDES_RUN PROVIDES_DEVEL \ - TOPDIR \ - PROJECT NAME \ - SOURCE \ - VERSION RELEASE V \ - INSTALL_LOG \ - DISTRIBUTION - -bash $MKSPEC_SH - diff --git a/scripts/parse-valgrind-suppressions.sh b/scripts/parse-valgrind-suppressions.sh deleted file mode 100644 index e42da24a..00000000 --- a/scripts/parse-valgrind-suppressions.sh +++ /dev/null @@ -1,57 +0,0 @@ -#! /usr/bin/awk -f -# A script to extract the actual suppression info from the output of (for example) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all ./minimal -# The desired bits are between ^{ and ^} (including the braces themselves). -# The combined output should either be appended to /usr/lib/valgrind/default.supp, or placed in a .supp of its own -# If the latter, either tell valgrind about it each time with --suppressions=, or add that line to ~/.valgrindrc - -# NB This script uses the |& operator, which I believe is gawk-specific. In case of failure, check that you're using gawk rather than some other awk - -# The script looks for suppressions. When it finds one it stores it temporarily in an array, -# and also feeds it line by line to the external app 'md5sum' which generates a unique checksum for it. -# The checksum is used as an index in a different array. If an item with that index already exists the suppression must be a duplicate and is discarded. - -BEGIN { suppression=0; md5sum = "md5sum" } - # If the line begins with '{', it's the start of a supression; so set the var and initialise things - /^{/ { - suppression=1; i=0; next - } - # If the line begins with '}' its the end of a suppression - /^}/ { - if (suppression) - { suppression=0; - close(md5sum, "to") # We've finished sending data to md5sum, so close that part of the pipe - ProcessInput() # Do the slightly-complicated stuff in functions - delete supparray # We don't want subsequent suppressions to append to it! - } - } - # Otherwise, it's a normal line. If we're inside a supression, store it, and pipe it to md5sum. Otherwise it's cruft, so ignore it - { if (suppression) - { - supparray[++i] = $0 - print |& md5sum - } - } - - - function ProcessInput() - { - # Pipe the result from md5sum, then close it - md5sum |& getline result - close(md5sum) - # gawk can't cope with enormous ints like $result would be, so stringify it first by prefixing a definite string - resultstring = "prefix"result - - if (! (resultstring in chksum_array) ) - { chksum_array[resultstring] = 0; # This checksum hasn't been seen before, so add it to the array - OutputSuppression() # and output the contents of the suppression - } - } - - function OutputSuppression() - { - # A suppression is surrounded by '{' and '}'. Its data was stored line by line in the array - print "{" - for (n=1; n <= i; ++n) - { print supparray[n] } - print "}" - } diff --git a/scripts/pgit.sh b/scripts/pgit.sh deleted file mode 100644 index 94a4b6f2..00000000 --- a/scripts/pgit.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/bin/sh - -log() -{ - echo $@ -} - -err() -{ - log $@ -} - -fatal() -{ - err $@ - exit 1 -} - -marker() -{ - log "# ------------- [$cur/$n_projects] $@" -} - -fat_marker() -{ - log "# ==================================================== [$cur/$n_projects] $@" -} - -config() -{ - [ "$pdir" ] || { - # guess pdir - pdir=`pwd` - while [ `cat $pdir/CVS/Repository 2>/dev/null` != proj ]; do - [ "$pdir" = / ] && fatal "didn't find \"proj\" in directory components" - pdir=`dirname $pdir` - done - } - - [ "$pdirs" ] || { - pdirs=`(cd $pdir; ls -d */.git 2>/dev/null | sed 's%/.git%%')` - } - n_projects=`echo $pdirs | wc -w` -} - -run_git() -{ - marker git "$@" - # sadly, CentOS 7 has git 1.8.3.1, which doesn't support -C - if [ "$1" = -C ]; then - ( - cd $2 - shift 2 - git "$@" - ) - return $? - fi - git "$@" -} - -# ------------- commands -run() -{( - local cmd=$1 - local d - - shift - config - cd $pdir - - if [ "$PGIT_KEEP_GOING" != y ]; then set -e; fi - for d in $pdirs; do - cur=`expr $cur + 1` - run_git -C $d $cmd "$@" - done -)} - -commit() -{( - local d do_cvs - - if [ "$1" = --cvs ]; then - do_cvs=true - shift - fi - - config - cd $pdir - - if [ "$PGIT_KEEP_GOING" != y ]; then set -e; fi - for d in $pdirs; do - cur=`expr $cur + 1` - if run_git -C $d diff-index --quiet HEAD --; then - log "Nothing to commit" - continue - fi - run_git -C $d commit "$@" - done - - if [ "$do_cvs" = true -a -d CVS ]; then - cvs commit "$@" - fi -)} - -clone() -{( - local p - config - cd $pdir - local refspec=(${PGIT_CLONE_FROM_USER//:/ }) - local fromuser=${refspec[0]} - local fromref=${refspec[1]} - local toref=${refspec[2]} - local login=$JANWARE_USER - local projects="$PGIT_CLONE_PROJECTS" - local ignore="$PGIT_IGNORE" - [ "$login" ] || login=`whoami` - [ "$fromuser" ] || fromuser=`whoami` - [ "$fromref" ] || fromref=master - local git_srv_admin="$SSH $login@git.janware.com /opt/jw-build/bin/git-srv-admin.sh" - if [ -z "$projects" ]; then - projects=`$git_srv_admin -u $fromuser -j list-personal-projects` - [ "$?" != 0 ] && exit 1 - fi - n_projects=`echo $projects | wc -w` - if [ "$PGIT_KEEP_GOING" != y ]; then set -e; fi - for p in $projects; do - if echo $ignore | grep -q "\b$p\b"; then - continue - fi - cur=`expr $cur + 1` - local pullurl=ssh://$login@git.janware.com/srv/git/$fromuser/proj/$p - local pushurl=ssh://$login@git.janware.com/srv/git/$login/proj/$p - local curref="" - fat_marker "Fetching project $p from user $fromuser" - if [ "$fromuser" = "$login" ]; then - if [ -d $p ]; then - run_git -C $p pull --recurse-submodules=on-demand - else - run_git clone ssh://$login@git.janware.com/srv/git/$fromuser/proj/$p - fi - else - local remotename="jw-$fromuser" - if [ -d $p ]; then - run_git -C $p remote | grep -q "^$remotename$" || { - run_git -C $p remote add $remotename $pullurl - run_git -C $p remote set-url --push $remotename no_push - } - run_git -C $p fetch --prune --recurse-submodules=on-demand $remotename $fromref - if [ "$toref" ]; then - curref=`git -C $p branch --show-current` - if [ "$curref" = "$toref" ]; then - run_git -C $p pull --recurse-submodules=on-demand $remotename $fromref - else - run_git -C $p fetch --recurse-submodules=on-demand $remotename $fromref:$toref - fi - fi - else - # set -x - run_git clone ssh://$login@git.janware.com/srv/git/$fromuser/proj/$p - run_git -C $p remote rename origin $remotename || fatal failed to rename remote in $p - run_git -C $p remote set-url --push $remotename no_push - $git_srv_admin -u $login -j create-personal-project $p - run_git -C $p remote add origin $pushurl - run_git -C $p push --recurse-submodules=on-demand origin master - $git_srv_admin -u $login -j update-descriptions $p - run_git -C $p branch --set-upstream-to origin/master master - # set +x - fi - fi - run_git -C $p submodule update --init --recursive || fatal git submodule update failed in $p - done -)} - -diff() -{( - local d - config - cd $pdir - for d in $pdirs; do - cur=`expr $cur + 1` - # marker $d - run_git -C $d diff --src-prefix=$d/ --dst-prefix=$d/ "$@" - done -)} - -echo "running $0 $@ GIT_SSH=$GIT_SSH" >&2 - -SSH=ssh -[ "$GIT_SSH" ] && SSH=$GIT_SSH - -cmd=$1 -cur=0 -shift -case $cmd in - clone|diff|commit) - $cmd "$@" - ;; - *) - run $cmd "$@" - ;; -esac diff --git a/scripts/pkg-manager.sh b/scripts/pkg-manager.sh deleted file mode 100644 index ad990e78..00000000 --- a/scripts/pkg-manager.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh - -log() -{ - echo $@ >&2 -} - -err() -{ - echo $@ >&2 -} - -fatal() -{ - err "Giving up: $@" - exit 1 -} - -usage() -{ - cat<<-EOT - $myname cmd args - EOT -} - -run() -{ - log "Running ==== $@" - "$@" -} - -cmd_install() -{ - local env opts global_opts - local non_interactive - - set -- `getopt 'y' $*` - while [ "$1" != -- ] ; do - case "$1" in - -y) - non_interactive=1 - ;; - esac - shift - done - shift - - case $ID in - opensuse|suse) - [ "$non_interactive" = 1 ] && { - opts="--force-resolution --auto-agree-with-licenses" - global_opts="$global_opts --non-interactive --gpg-auto-import-keys --no-gpg-checks" - } - run sudo $env -S zypper $global_opts install $opts "$@" - ;; - debian|ubuntu|raspbian) - [ "$non_interactive" = 1 ] && { - global_opts="$global_opts -yq" - env="$env DEBIAN_FRONTEND=noninteractive" - } - run sudo $env -S apt-get $global_opts install "$@" - ;; - arch) - [ "$non_interactive" = 1 ] && { - global_opts="$global_opts --noconfirm" - env="$env DEBIAN_FRONTEND=noninteractive" - } - run sudo $env -S pacman $global_opts -S --needed "$@" - ;; - centos) - run sudo $env -S yum $global_opts install -y "$@" - ;; - *) - fatal "Tried to install on unsupported platform \"$ID\"" - ;; - esac -} - -cmd_refresh() -{ - local env opts global_opts - local non_interactive - - set -- `getopt 'y' $*` - while [ "$1" != -- ] ; do - case "$1" in - -y) - non_interactive=1 - ;; - esac - shift - done - shift - - case $ID in - opensuse|suse) - [ "$non_interactive" = 1 ] && { - global_opts="$global_opts --non-interactive --gpg-auto-import-keys --no-gpg-checks" - } - run sudo $env -S zypper $global_opts refresh $opts "$@" - ;; - debian|ubuntu|raspbian) - run sudo $env -S apt-get $global_opts update "$@" - ;; - centos) - run sudo $env -S yum $global_opts clean expire-cache "$@" - run sudo $env -S yum $global_opts makecache "$@" - ;; - *) - fatal "Tried to update unsupported platform \"$ID\"" - ;; - esac -} - -# -- here we go -myname=`basename $0` -. /etc/os-release -ID=${ID%%-*} -cmd="$1" -shift -cmd_$cmd "$@" diff --git a/scripts/pkg.sh b/scripts/pkg.sh deleted file mode 100644 index 8e19cee1..00000000 --- a/scripts/pkg.sh +++ /dev/null @@ -1,1237 +0,0 @@ -#!/bin/bash - -log() -{ - echo $@ -} - -goodbye() -{ - : - rm -f $tmp_mkdef_sh scm_status.tmp -} - -quit() -{ - goodbye - exit $1 -} - -usage() -{ - cat << EOT | sed 's/^ |//' - |usage: $myname cmd -EOT - [ "$1" ] && { - quit $1 - } -} - -fatal() -{ - log "$@" - log "Giving up." - quit 1 -} - -os() -{ - /bin/bash $JWB_SCRIPT_DIR/get-os.sh -} - -scm_commit() -{ - case $SCM in - cvs) - cvs commit "$@" - ;; - git) - git commit -uno "$@" - ;; - *) - fatal "tried to commit with unknown source code management tool $SCM" - ;; - esac -} - -platform() -{ - echo `os`/$RPM_ARCH -} - -abspath() -{ - (cd $1; /bin/pwd) -} - -read_map() -{ - cmd_version -p `platform` $@ read | sed 's/-dev//' -} - -write_map() -{ - cmd_version -p `platform` $1 write $2 -} - -find_path() -{ - local p - for p in $@; do - [ -e "$p" ] && { - echo $p - return 0 - } - done - fatal "none of the paths \"$@\" exists" -} - -scm_files() -{ - ( - cd $TOPDIR - /bin/bash $JWB_SCRIPT_DIR/scm.sh ls-files -f $@ - ) -} - -calculate_hash() -{ - ( - cd $TOPDIR - scm_files -z | \ - grep -vz "CHANGES\|VERSION\|HASH\|MD5SUMS\|RELEASES" | \ - xargs -0 md5sum | md5sum | sed 's/ .*//' - ) -} - -check_scm() -{ - if [ -d .git ]; then - log + checking git - git pull --no-edit || fatal "git pull failed, giving up" - git submodule update --init --recursive || fatal "git submodule update failed, giving up" - git status --porcelain | grep -v '^??' | grep -q . && { - git status - fatal "git has locally modified files, giving up" - } - else - log + checking cvs - cvs update -dP - cvs status > scm_status.tmp 2>&1 - if [ $? != 0 ]; then - cat scm_status.tmp - fatal "\n======== cvs status failed, giving up." - fi - grep -qi "locally modified" scm_status.tmp && \ - fatal "cvs copy has locally modified files, giving up" - grep -qi "needs" scm_status.tmp && \ - fatal "+ cvs copy is out-of-date, giving up" - fi -} - -check_cwd() -{ - pwd | grep -q $HOME/local/src -} - -create_empty_dir() -{ - [ $# != 2 ] && \ - fatal "Unable to create empty directory \"$@\"." - - local dir="$1" - shift - local desc="$@" - - mkdir -p "$dir" - - [ -w "$dir" ] || - fatal "No write-access to $desc \"$dir\"" - - [ `ls "$dir" | wc -l` -eq 0 ] || - fatal "$desc \"$dir\" isn't empty" -} - -increase_build_no() -{ - local build_no=`echo $1 | sed 's/.*-\([0-9]\+\)\(-dev\)*/\1/'` - build_no=`expr $build_no + 1` - echo $1 | sed "s/-\([0-9]\+\)\(-dev\)*/-$build_no\2/" -} - -check_next_version() -{ - local v=`read_map $TOPDIR/VERSION | sed 's/-dev//'` - local n=`read_map -n $TOPDIR/RELEASES | sed 's/-dev//'` - if [ "$n" != "$v" ]; then - echo "+ $RPM_PROJECT version is already at $v, no need to increase for release" >&2 - echo $v - return - fi - local h=`calculate_hash` - if [ ! -f $TOPDIR/HASH ]; then - echo "+ $RPM_PROJECT has no HASH file, needs release" >&2 - echo $v - return - fi - if ! read_map $TOPDIR/HASH | grep -q $h; then - echo "+ $RPM_PROJECT has no matching HASH value, needs release" >&2 - increase_build_no $v - return - fi - echo "+ $RPM_PROJECT has unchanged source" >&2 - if [ "$reinstall_check_failed" = 1 ]; then - echo "version $v is uninstallable, needs release" >&2 - increase_build_no $v - return - fi - if [ "$reinstall_check_succeeded" = 1 ]; then - echo $v - return - fi - if ! check_pkg_reinstall >&2; then - echo "version $v is uninstallable, needs release" >&2 - increase_build_no $v - return - fi - - echo "version $v doesn't match any release criteria, not releasing" >&2 - echo $v -} - -check_pkg_install() -{ - [ "$1" = -c ] && { - shift - [ ! -f "$1" ] && return 0 - } - local sudo - [ "$UID" = 0 ] || sudo=/usr/bin/sudo - echo "+ installing $1" - $sudo $RPM -U $1 || { - echo "failed to install $1" - return 1 - } -} - -check_pkg_reinstall() -{ - local v=`read_map $TOPDIR/VERSION` - local s - for s in devel run; do - if $RPM -q $RPM_PROJECT-$s > /dev/null 2>&1 ; then - echo + removing $RPM_PROJECT-$s - sudo $RPM -e $RPM_PROJECT-$s --nodeps --allmatches || { - echo "failed to uninstall $RPM_PROJECT-$s, ignored" - } - fi - done - - local suffix - case "$PKG_FORMAT" in - rpm) - suffix=-$v.$RPM_ARCH.rpm - ;; - *) - suffix=_$v""_$RPM_ARCH.deb - ;; - esac - - check_pkg_install $TOPDIR/$DIST_PCKG_DIR/$RPM_PROJECT-run$suffix || return 1 - check_pkg_install -c $TOPDIR/$DIST_PCKG_DIR/$RPM_PROJECT-devel$suffix || return 1; -} - -check_release_is_current() -{ - local reinstall_pkg= - local next=`check_next_version` - local v=`read_map $TOPDIR/VERSION` - - set -- `getopt 'r' $*` - while [ "$1" != -- ] ; do - case "$1" in - -r) - reinstall_pkg=1 - ;; - esac - shift - done - shift - - if ! read_map -n $TOPDIR/RELEASES | grep -Fq $next; then - echo "next version $next is not in RELEASES, needs release" >&2 - return 1 - fi - - if [ "$reinstall_pkg" ]; then - if ! check_pkg_reinstall; then - echo "version $v is uninstallable, needs release" >&2 - reinstall_check_failed=1 - return 1 - fi - reinstall_check_succeeded=1 - fi - - return 0 -} - -check_update_version() -{ - local comment="Start version" - set -- `getopt 'c:' "$@"` - while [ "$1" != -- ] ; do - case "$1" in - -c) - comment="$2" - shift - esac - shift - done - shift - - ( - cd $TOPDIR - local v=`read_map VERSION` - local next=`check_next_version` - [ "$next" ] || fatal "Failed to get next version." - if [ "$next" != "$v" ]; then - echo "$next-dev" > VERSION - scm_commit -m "$comment: $next" VERSION - return 0 - fi - return 1 - ) -} - -cmd_version() -{ - cmd_version_usage() - { - cat <<- EOT | sed 's/ |//' - |usage: $myname version filename cmd [args] - EOT - [ "$1" ] && exit $1 - } - - cmd_version_strip_dev_dummy() - { - cat - } - - cmd_version_strip_dev_real() - { - sed 's/-dev//' - } - - # -- here we go - local strip_dev=cmd_version_strip_dev_dummy - local platform_patt="\(^debian-[0-9.]\+\|^suse-\([0-9.]\+\|tumbleweed\)\)/\(i.86\|x86_64\|amd64\): *" - local no_compat= - local platform=`platform` - - [ $# -lt 2 ] && cmd_version_usage 1 - - set -- `getopt 'hsnp:' "$@"` - while [ "$1" != -- ] ; do - case "$1" in - -n) - no_compat=true;; - -s) - strip_dev=cmd_version_strip_dev_real;; - -p) - platform="$2"; shift;; - -h) - cmd_version_usage 0;; - *) - cmd_version_usage 1;; - esac - shift - done - shift - - local file="$1" - shift - - local cmd=$1 - shift - - case $cmd in - read) - local p=`echo $platform | sed 's%/%\\\/%g'` - local v=`sed "/$p:/ !d; s/$p: *//" $file` - [ "$v" ] && { - echo "$v" | $strip_dev - return - } - [ "$no_compat" = true ] && { - return - } - grep -q "$platform_patt" $file || { - cat $file | $strip_dev - return - } - local pp=`echo $platform_patt | sed 's%/%\\\/%g'` - sed "/$pp/ !d; s/$pp//; 2,$ d" $file | $strip_dev - ;; - write) - local val=$1 - local p=$platform - [ -f $file ] || { - echo "$p: $val" > $file - return - } - grep -q "$platform_patt" $file || { - echo "$p: $val" > $file - return - } - grep -q "^$p:" $file || { - echo "$p: $val" >> $file - return - } - p=`echo $p | sed 's%/%\\\/%g'` - val=`echo $val | sed 's%/%\\\/%g'` - sed "s/$p:.*/$p: $val/" $file > $file.tmp - mv $file.tmp $file - ;; - *) - echo unknown command $cmd >&2 - cmd_version_usage 1;; - esac -} - -build_pkg() -{ - set -e - - local version=`read_map $TOPDIR/VERSION | sed 's/-dev//'` - local src_base=$RPM_PROJECT-$version - local src_tree=$DIST_SRC_DIR/$src_base - local tar_archive=$src_base.tar.bz2 - local tar_archive_orig=$src_base.orig.tar.bz2 - local distribution=`os` - - expand_version_macros() { - echo $@ | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g" - } - - local rpm_requires_run=`expand_version_macros $RPM_REQUIRES_RUN` - local rpm_requires_devel=`expand_version_macros $RPM_REQUIRES_DEVEL` - local rpm_conflicts_run=`expand_version_macros $RPM_CONFLICTS_RUN` - local rpm_conflicts_devel=`expand_version_macros $RPM_CONFLICTS_DEVEL` - local rpm_provides_run=`expand_version_macros $RPM_PROVIDES_RUN` - local rpm_provides_devel=`expand_version_macros $RPM_PROVIDES_DEVEL` - - # --- create source directory tree - create_empty_dir $src_tree "Source files compilation directory" - - # --- copy source files over - scm_files | - grep -v VERSION | - cpio -o -H newc | - ( cd $src_tree; cpio -m --make-directories -i) - echo $version > $src_tree/VERSION - - local pkgfmt - for pkgfmt in $PKG_FORMAT; do - - local deffmt - case $pkgfmt in - rpm) - # historical mess: - # pkg.sh -> mkspec-wrapper.sh -> create-mkspec.sh -> mkspec.sh -> spec -> rpmbuild spec > /var/tmp/xy.sh -> pkg.sh milk-install-log - deffmt=spec;; - debian|deb) - deffmt=debian;; - *) - ;; - esac - - # --- generate spec file - local mkdef_sh=$TOPDIR/make/mk$deffmt.sh - local mkdef_wrapper_sh=$JWB_SCRIPT_DIR/mkspec-wrapper.sh - - [ ! -r $mkdef_wrapper_sh ] && \ - fatal "Failed to read package definition deffmt wrapper script \"$mkdef_wrapper_sh\"." - - scm_files | grep -q make/mk$deffmt.sh || { - local create_mkdef_sh=$JWB_SCRIPT_DIR/create-mk$deffmt.sh - [ ! -r "$PROJECT_DESCR_FILE" ] && \ - fatal "Failed to read project description file \"$PROJECT_DESCR_FILE\"." - [ ! -r "$create_mkdef_sh" ] && \ - fatal "Failed to read package build definition creation script \"$create_mkdef_sh\"." - PATH=$JWB_SCRIPT_DIR:$PATH /bin/bash $create_mkdef_sh $PROJECT_DESCR_FILE > $mkdef_sh.tmp - mv $mkdef_sh.tmp $mkdef_sh - tmp_mkdef_sh="$tmp_mkdef_sh $mkdef_sh" - } - - mkdef_sh=`readlink -f $mkdef_sh` - mkdef_wrapper_sh=`readlink -f $mkdef_wrapper_sh` - - ( - cd $src_tree - PATH=$JWB_SCRIPT_DIR:$PATH /bin/bash $mkdef_wrapper_sh $mkdef_sh \ - -V $version \ - -S $tar_archive \ - -N $RPM_PROJECT \ - -R "$rpm_requires_run" \ - -X "$rpm_conflicts_run" \ - -D "$rpm_requires_devel" \ - -Y "$rpm_conflicts_devel" \ - --provides-run "$rpm_provides_run" \ - --provides-devel "$rpm_provides_devel" \ - -P $PROJECT \ - -d $distribution \ - > $RPM_PROJECT.$deffmt - ) - done - - # --- tar up source directory tree - create_empty_dir $DIST_PCKG_DIR "Package directory" - - tar --anchored -czvf $DIST_PCKG_DIR/$tar_archive -C $DIST_SRC_DIR `basename $src_tree` - - case "$PKG_FORMAT" in - rpm) - # --- build RPMs and copy them to source directory - rpmbuild -ta $DIST_PCKG_DIR/$tar_archive - cp $SRPMS_DIR/$src_base.src.rpm $DIST_PCKG_DIR/ - cp $RPMS_DIR/$RPM_PROJECT-*-$version.$RPM_ARCH.rpm $DIST_PCKG_DIR/ - ;; - *) - #exit - #cp $DIST_PCKG_DIR/$tar_archive $src_tree/../$tar_archive_orig - ( - local mod_script_dir=`readlink -f $JWB_SCRIPT_DIR` - cd $src_tree - #export ENV_PREFIX=`readlink -f $TOPDIR`/$DIST_INST_DIR - #export INSTALL_LOG=blah - #strace -f -s 128 -o /tmp/strace.out debuild --no-tgz-check --prepend-path=$mod_script_dir -us -uc - debuild --no-tgz-check --prepend-path=$mod_script_dir -us -uc - ) - cp $DIST_SRC_DIR/*.deb $DIST_PCKG_DIR/ - ;; - esac -} - -upload_file() -{ - local quiet=false - if [ "$1" = -q ]; then - quiet=true - shift - fi - local f="$1" - local t="$2" - [ -f $DIST_PCKG_DIR/$f ] || { - if [ "$quiet" = true ]; then return 0; fi - "+ $DIST_PCKG_DIR/$f doesn't exist, can't upload" - return 1 - } - local os_name=`os | sed 's/-.*//'` - local os_version=`os | sed 's/[^-]\+-//'` - local target_base=rsync_ssh://root@pkg.janware.com:/srv/dav/pub/packages/linux/$os_name/$os_version - [ "$upload_urlbase" ] && target_base="$upload_urlbase" - local upload_attrib=644:755:`id -un`.207 - [ "$upload_file_attrib" ] && upload_attrib="$upload_file_attrib" - - local target - case "$t" in - tgz) - target=$target_base/$t/$f:$upload_attrib - ;; - src) - case $os_name in - centos) - target=$target_base/Source/SPackages/$f:$upload_attrib - #/srv/ftp/pub/packages/jw-foss/centos/7/Source/SPackages/tecla-1.6.3-7.1.src.rpm - ;; - *) - target=$target_base/rpm/$t/$f:$upload_attrib - #/srv/ftp/pub/packages/jw-foss/suse/tumbleweed/rpm/src/jw-build-1.0.0-74.src.rpm - ;; - esac - ;; - *) - case $os_name in - centos) - target=$target_base/$t/Packages/$f:$upload_attrib - #/srv/ftp/pub/packages/jw-foss/centos/7/x86_64/Packages/tecla-devel-1.6.3-7.1.x86_64.rpm - ;; - *) - target=$target_base/rpm/$t/$f:$upload_attrib - #/srv/ftp/pub/packages/jw-foss/suse/tumbleweed/rpm/x86_64/jw-build-run-1.0.0-74.x86_64.rpm - ;; - esac - esac - echo "+ uploading $target" - RSYNC_RSH=$SSH /bin/bash $JWB_SCRIPT_DIR/upload.sh $DIST_PCKG_DIR/$f $target -} - -upload_pkg() -{ - local server - set -e - local p - local v=`read_map $TOPDIR/VERSION | sed 's/-dev//'` - local h=`calculate_hash` - case $PKG_FORMAT in - rpm) - server=pkg.janware.com - upload_file $RPM_PROJECT-$v.tar.bz2 tgz - upload_file $RPM_PROJECT-$v.src.rpm src - upload_file $RPM_PROJECT-run-$v.$RPM_ARCH.rpm $RPM_ARCH - upload_file -q $RPM_PROJECT-devel-$v.$RPM_ARCH.rpm $RPM_ARCH - ;; - debian|deb) - server=apt.janware.com - local conf=`mktemp "/tmp/$myname"_XXXXXX` - cat <<-EOT > $conf - [DEFAULT] - default_host = janware-debian - [janware-debian] - fqdn = $server - # login = - incoming = /srv/dav/pub/packages/jw-foss/debian/mini-dinstall/incoming/ - method = rsync - hash = sha - allow_unsigned_uploads = yes - distributions = debian-8 - allowed_distributions = `os` - delayed = - run_lintian = no - run_dinstall = no - check_version = yes - passive_ftp = yes - #progress_indicator - scp_compress = yes - ssh_config_options = ForwardAgent=yes,Compression=yes,ServerAliveInterval=30,ConnectTimeout=120 - #post_upload_command = - #pre_upload_command = - #default_host_main = - EOT - dput -c $conf janware-debian dist/src/"$RPM_PROJECT"_"$v"_"$RPM_ARCH".changes - rm -f $conf - ;; - *) - fatal "Tried to upload with unknown package format \"$PKG_FORMAT\"" - ;; - esac - - write_map $TOPDIR/RELEASES $v - $SCM add $TOPDIR/RELEASES || true - write_map $TOPDIR/HASH $h - $SCM add $TOPDIR/HASH || true - echo "+ scheduling rebuild" - $SSH -l root $server /opt/packager-server/bin/packager-server schedule-rebuild - scm_commit -m "Release $v@`platform`" $TOPDIR/RELEASES $TOPDIR/HASH - if [ "$SCM" = git ]; then - git push || true - fi -} - -install_exe_wrapper() -{ - local from="`readlink -fm $1`" - local to="$2" - local ext=${from##*.} - local tmp=$to.tmp - - case $ext in - py) - cat << EOT | sed 's/^ *|//' > "$tmp" - |#!/usr/bin/python3 - | - |import sys - |import subprocess - |args=sys.argv - |args[0] = "$from" - |if subprocess.call([ '/usr/bin/python3' ] + args) != 0: - | print("subprocess failed") - | exit(1) -EOT - ;; - pl) - echo -e "#!/bin/bash\n\nexec /usr/bin/perl \"$from\" \"\$@\"" > "$tmp" - #echo -e "#!/bin/bash\n\nexec /usr/bin/perl \"$from\"" > "$tmp" - ;; - sh) - echo -e "#!/bin/bash\n\nexec /bin/bash \"$from\" \"\$@\"" > "$tmp" - ;; - *) - if file "$from" | grep -qi executable && [[ "$from" =~ "\.so$\|\.so\.[0-9.]*" ]]; then - echo -e "#!/bin/bash\n\nexec \"$from\" \"\$@\"" > "$tmp" - else - ln -sf $from $to - return - fi - ;; - esac - - chmod 755 "$tmp" - mv "$tmp" $to -} - -cmd_build() -{ - build_pkg -} - -cmd_upload() -{ - upload_pkg -} - -check_create_parent() -{ - [ "$1" != "true" ] && return 0 - local dir=`dirname -z "$2" | xargs -0 readlink -fm` - local path=`readlink -fm "$2"` - if [ "$dir" -a "$dir" != "$path" ]; then - mkdir -p "$dir" || { - echo "failed to create parent dir of \"$1\"" - exit 1 - } - fi - return 0 -} - -cmd_log_install() -{ - local args="$*" - - local c_format=rpm - local c_logfile=install.log - local c_mode_dir=false - local c_create_leading_dirs=false - local c_group=`id -gn` - local c_owner=`whoami` - local c_suffix= - local c_prefix= - local c_opmode=opmode_install - local c_absolute=0 - local c_wrap=0 - local c_no_log_dirs=0 - local install_opts - - set -- `getopt 'DLWi:a:f:l:bg:cdm:o:psS:vAN' $*` - - cfgfile_macro() - { - if echo "$*" | grep -qe '/etc/\|\.conf$\|\.leases$'; then - echo "%config(noreplace) " - fi - } - - while [ "$1" != -- ]; do - case $1 in - -f) - c_format=$2 - shift;; - -l) - c_logfile=$2 - shift;; - -a) - c_use_attr=true - ;; - -i) - c_ignore_prefix=$2 - shift - ;; - - -b) - install_opts="$install_opts $1" - ;; - -c) - install_opts="$install_opts $1" - ;; - -d) - c_mode_dir=true;; - -D) - c_create_leading_dirs=true;; - -g) - c_group=$2 - shift;; - -m) - c_mode=$2 - shift;; - -o) - c_owner=$2 - shift;; - -p) - install_opts="$install_opts $1" - ;; - -s) - install_opts="$install_opts $1" - ;; - -S) - c_suffix=$2 - shift;; - -v) - install_opts="$install_opts $1" - ;; - -L) - c_opmode=opmode_link;; - -W) - c_opmode=opmode_link - c_wrap=1;; - -A) - c_absolute=1;; - -N) - c_no_log_dirs=1;; - *) - echo unknown option \"$1\". Exiting. >&2 - exit 1;; - esac - shift - done - - shift - - local args="`echo " $args" | sed -e 's/ -l *[^ ]*//g; s/ -f *[^ ]*//g; s/ -a / /g; s/ -N / /g'`" - - if [ -z "$c_use_attr" ]; then - #args="`echo " $args" | sed -e 's/ -g *[^ ]*//g; s/ -m *[^ ]*//g; s/ -o *[^ ]*//g;'`" - args="`echo " $args" | sed -e 's/ -g *[^ ]*//g; s/ -o *[^ ]*//g;'`" - fi - - local c_target="`echo $* | awk '{$1=""; print $0}' | sed 's/^ *//'`" - local c_source="`echo $* | awk '{print $1}'`" - - case $c_opmode in - - opmode_install) - if [ -L "$c_source" ]; then - check_create_parent $c_create_leading_dirs $c_target - cp -d $c_source $c_target || exit $? - else - [ "$c_create_leading_dirs" ] && local install_opts="$install_opts -D" - install $install_opts $args || exit $? - fi - ;; - - opmode_link) - if [ "$c_mode_dir" = true ]; then - echo "ignoring directory $c_source during link creation" - exit 0 - fi - if [ "$c_absolute" != 0 ]; then - c_logfile="" - c_source=`readlink -f $c_source` - else - c_source=`basename $c_source` - fi - check_create_parent $c_create_leading_dirs $c_target - cd `dirname $c_target` - if [ "$c_wrap" = 1 ]; then - install_exe_wrapper $c_source $c_target - else - ln -sf $c_source `basename $c_target` - fi - ;; - - *) - echo "Mode \"$c_opmode\" not implemented. Exiting." >&2 - exit 1 - ;; - esac - - [ "$c_logfile" ] || { - exit 0 - } - - local file mode installd_file cfgfile dir attr - if [ "$c_mode_dir" = true ]; then - for file in $*; do - [ "$c_no_log_dirs" = 0 ] || continue - attr=" %attr($c_mode,$c_owner,$c_group)" - [ -L "$file" ] && attr="" - echo "%dir$attr $file" >> $c_logfile - done - else - if [ -f "$c_target" -o -L "$c_target" ]; then - installed_file="$c_target" - cfgfile="" - if [ "$c_mode" ]; then - mode=$c_mode - cfgfile=`cfgfile_macro "$installed_file"` - else - if [ -d "$c_source" ]; then - dir="%dir " - mode=0755 - else - cfgfile=`cfgfile_macro "$installed_file"` - dir="" - mode=0644 - fi - fi - attr="%attr($mode,$c_owner,$c_group)" - [ -L "$c_target" ] && attr="" - if [ -z "$dir" -o "$c_no_log_dirs" != 0 ]; then - echo "$dir$attr $cfgfile$c_target" | sed "s/^$c_ignore_prefix//" >> $c_logfile - fi - elif [ -d "$c_target" ]; then - for file in $c_source; do - installed_file="$c_target/`basename $file`" - cfgfile="" - if [ "$c_mode" ]; then - mode=$c_mode - cfgfile=`cfgfile_macro "$installed_file"` - else - if [ -d "$file" ]; then - [ "$c_no_log_dirs" = 0 ] || continue - dir="%dir " - mode=0755 - else - cfgfile=`cfgfile_macro "$installed_file"` - dir="" - mode=0644 - fi - fi - attr="%attr($mode,$c_owner,$c_group)" - [ -L "$file" ] && attr="" - echo "$dir$attr $cfgfile$installed_file" | - sed "s/^$c_ignore_prefix//" >> $c_logfile - done - fi - fi -} - -cmd_milk_install_log() -{ - milk_install_log_usage() - { - echo "usage: $myname milk-install-log [-h] [-n pkg-name] [-t rpm|deb] [-p remove-prefix] [-s subpackages] install-log output-dir" - [ "$1" ] && exit $1 - } - - milk_install_log_spec_attr() - { - local attr=$1 - shift - #echo "extracting attribute $attr from \"$@\"" >&2 - echo "$*" | sed "s/.*attr(\([0-9]\+\),\([^,]\+\),\([^,)]\+\)).*/\\$attr/" - } - - milk_install_log_init_postinst() - { - cat <<- EOT > $1 - #!/bin/sh - - EOT - chmod 755 $1 - } - - cat_log() - { - cat $in | sed ' - /\/usr\/bin$/ d - /\/usr\/sbin$/ d - /\/usr\/lib$/ d - /\/usr\/lib64$/ d - /\/usr\/lib\/pkgconfig$/ d - /\/usr\/lib64\/pkgconfig$/ d - ' | $user_filter - } - - compress() - { - sed ':a;N;$!ba;s/\n//g' - } - - make_unique() - { - sed 's/ \+/\n/g' | sort -u | grep . - } - - make_alt() - { - make_unique | sed 's/$/$\\|/' | compress - } - - local type name prefix in out subpackages - - local subpackages="run devel" - local user_filter=cat - - eval set -- `getopt -- ht:p:n:s:F: "$@"` - while [ "$1" != -- ]; do - case $1 in - -h) - usage 0;; - -t) - type="$2"; shift;; - -n) - name="$2"; shift;; - -p) - prefix="$2"; shift;; - -s) - subpackages="$2"; shift;; - -F) - user_filter="$2"; shift;; - *) - echo -e "Unexpected argument >$1<\n" >&2 - milk_install_log_usage 1;; - esac - shift - done - shift - - [ $# != 2 ] && { - echo -e "Too many arguments >$*<\n" >&2 - milk_install_log_usage 1 - } - - local in=$1 - local out=$2 - - local re_hpp_file="[^/]\+\.\(h\|hpp\)$" - local include_dirs=`cat_log | grep "/include/\(.*/\)*$re_hpp_file" | sed "s%.*/include/%/include/%; s%/$re_hpp_file%%"` - include_dirs=`echo /include /include/$name $include_dirs | make_unique` - local include_h_re=`echo $include_dirs | sed 's/ \\+/\\n/g' | sed 's%$%/[^/]\\\\+\\\\.h\\\\(pp\\\\)*%' | make_alt` - local include_dirs_re=`echo $include_dirs | make_alt` - - filter_devel="$filter_devel$include_h_re" - filter_devel="$filter_devel$include_dirs_re" - filter_devel="$filter_devel""devel\|make\|/lib[^/]\+\.a$\|/lib[^/]\+\.so$\|/[^/]\+\.exp$\|/[^/]\+\.def$\|/[^/]\+\.lib$\|/[^/]\+\.pc$\|" - filter_devel="$filter_devel/usr/lib[^/]*/pkgconfig" - - # TODO: simplify this - case $type in - rpm) - cat_log | sed "s% $prefix% %" | grep -ve $filter_devel > $in.$name-run - cat_log | sed "s% $prefix% %" | grep -e $filter_devel > $in.$name-devel - # TODO: this is unimplemented for debian packages - echo $subpackages | grep -q devel || cat $in.$name-devel >> $in.$name-run - ;; - deb) - cat_log | grep -v "%dir" | sed "s% $prefix% %; s%//*%/%g; s/.*) *//" | grep -ve $filter_devel | sed 's/\(.*\)\/\([^/]\+\) *$/inst-root\1\/\2 \1/' > $out/$name-run.install - cat_log | grep -v "%dir" | sed "s% $prefix% %; s%//*%/%g; s/.*) *//" | grep -e $filter_devel | sed 's/\(.*\)\/\([^/]\+\) *$/inst-root\1\/\2 \1/' > $out/$name-devel.install - cat_log | grep "%dir" | sed "s% $prefix% %; s%//*%/%g; s/.*) *//" | grep -ve $filter_devel | sed 's/\(.*\)\/\([^/]\+\) *$/\1\/\2/; s%^/%%' | sort -u > $out/$name-run.dirs - cat_log | grep "%dir" | sed "s% $prefix% %; s%//*%/%g; s/.*) *//" | grep -e $filter_devel | sed 's/\(.*\)\/\([^/]\+\) *$/\1\/\2/; s%^/%%' | sort -u > $out/$name-devel.dirs - #cat_log | sed "/%config/ !d; s% $prefix% %; s%//*%/%g; s/.*) *//" | grep -ve $filter_devel > $out/conffiles - cat_log | sed "/%config/ !d; s% $prefix% %; s%//*%/%g; s/.*) *//" | grep -ve $filter_devel > $out/conffiles.$name-run - cat_log | sed "/%config/ !d; s% $prefix% %; s%//*%/%g; s/.*) *//" | grep -e $filter_devel > $out/conffiles.$name-devel - - for p in run devel; do - postinst=$out/$name-$p.postinst - milk_install_log_init_postinst $postinst - cat $out/$name-$p.dirs $out/$name-$p.install | grep . | while read file dir; do - #echo read file \"$file\" >&2 - file=`echo /$file | sed 's/inst-root\///; s%^//*%/%'` - #echo file is now \"$file\" >&2 - #echo grep \"$prefix/*$file$\" $in >&2 - line=`grep $file$ $in` - perm=`milk_install_log_spec_attr 1 "$line"` - owner=`milk_install_log_spec_attr 2 "$line"` - group=`milk_install_log_spec_attr 3 "$line"` - echo "chown $owner:$group $file" >> $postinst - echo "chmod $perm $file" >> $postinst - done - done - ;; - *) - milk_install_log_usage 1 - ;; - esac -} - -# ---- here we go -umask 0022 -trap goodbye SIGINT SIGKILL - -# -- default values -TOPDIR=. -CHECK_CVS_SYNC_BEFORE_RPM_RELEASE=false -myname="${0##*/}" -cmdline="$0 $@" -tmp_mkdef_sh="" -PROJECT_DESCR_FILE=$TOPDIR/make/project.conf -DIST_SRC_DIR=dist/src -DIST_INST_DIR=dist/src -DIST_PCKG_DIR=dist/pckg -RPM_PROJECT="$PROJECT" -RPM_REQUIRES_RUN="" -RPM_REQUIRES_DEVEL="" -RPM_ARCH=$HOSTTYPE -PKG_FORMAT=rpm -SSH=ssh -SCM=cvs -[ "$RSYNC_RSH" ] && SSH=$RSYNC_RSH -[ "$CVS_RSH" ] && SSH=$CVS_RSH -[ -d .git ] && SCM=git - -while [ ${1:0:1} = - ]; do - case "$1" in - -h) - usage 0;; - -t) - eval DIST_SRC_DIR=\"$2\" - shift - ;; - -p) - eval DIST_PCKG_DIR=\"$2\" - shift - ;; - -m) - eval JWB_SCRIPT_DIR=\"$2\" - shift - ;; - -N) - eval RPM_PROJECT=\"$2\" - shift - ;; - -R) - 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 - ;; - --provides-run) - eval RPM_PROVIDES_RUN=\"$2\" - shift - ;; - --provides-devel) - eval RPM_PROVIDES_DEVEL=\"$2\" - shift - ;; - -P) - eval PROJECT=\"$2\" - shift - ;; - -a) - eval RPM_ARCH=\"$2\" - shift - ;; - -F) - eval PKG_FORMAT=\"$2\" - shift - ;; - -B) - eval upload_urlbase=\"$2\" - shift - ;; - -A) - eval upload_file_attrib=\"$2\" - shift - ;; - *) - echo "unrecognized option $1, giving up" >&2 - usage 1 - ;; - esac - shift -done - -[ "$JWB_SCRIPT_DIR" ] || JWB_SCRIPT_DIR=`dirname $0` -[ "$PROJECT" ] || PROJECT=`abspath $TOPDIR | xargs basename` - -cmd=$1 -shift - -export JWB_SCRIPT_DIR=`readlink -f $JWB_SCRIPT_DIR` -export PKG_SH=`readlink -f $0` - - -if [ `whoami` = root ]; then - RPMS_BUILD_DIR=/usr/src/packages -else - RPMS_BUILD_DIR=$HOME/rpmbuild -fi -SRPMS_DIR=$RPMS_BUILD_DIR/SRPMS -RPMS_DIR=$RPMS_BUILD_DIR/RPMS/$RPM_ARCH - -# shift - -[ ! "$cmd" ] && { - echo "missing command, giving up" >&2 - usage 1 -} - -case $PKG_FORMAT in -rpm) - RPM=/bin/rpm - ;; -deb|debian) - RPM="/bin/bash $JWB_SCRIPT_DIR/dpm.sh" - ;; -*) - fatal "Unknown package format \"$PKG_FORMAT\"" - ;; -esac - -case $cmd in -check-release) - cmd_check_release - ;; -need-release) - if check_release_is_current; then - echo no >&2 - exit 1 - else - echo yes >&1 - exit 0 - fi - ;; -update-version) - check_update_version "@" || exit 0 - ;; -version) - cmd_version "$@" - ;; -build) - check_cwd - rm -rf ./$DIST_SRC_DIR ./$DIST_PCKG_DIR - cmd_build - ;; -release-reinstall) - check_update_version -c "Start version" - cmd_build - cmd_upload - ;; -release) - cd $TOPDIR - check_scm - check_release_is_current -r || { - set -e - check_cwd - rm -rf ./$DIST_SRC_DIR ./$DIST_PCKG_DIR - check_update_version || true - cmd_build - check_pkg_reinstall - cmd_upload - } - ;; -upload) - cmd_upload - ;; -reinstall) - check_pkg_reinstall - ;; -release) - ;; -hash) - calculate_hash - ;; -log-install) - cmd_log_install "$@" - ;; -milk-install-log) - cmd_milk_install_log "$@" - ;; -*) - usage 1 - ;; -esac - -goodbye - diff --git a/scripts/purge-stale-projects.sh b/scripts/purge-stale-projects.sh deleted file mode 100644 index 62190165..00000000 --- a/scripts/purge-stale-projects.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash - -log() -{ - echo $@ -} - -fatal() -{ - log $@ - exit 1 -} - -goodbye() -{ - rm -f $scm_status -} - -check_scm() -{ - local p=$1 - if [ -d $p/.git ]; then - log + checking git - #git -C $p pull --no-edit || fatal "git pull failed, giving up" - if git -C $p status --porcelain --untracked-files=no | grep -v '^??' | grep -q . ; then - git -C $p status - fatal "git in project \"$p\" has locally modified files, giving up" - fi - else - log + checking cvs - #cvs update -dP $p - cvs status $p > $scm_status 2>&1 - if [ $? != 0 ]; then - cat $scm_status - fatal "\n======== cvs status failed in project \"$p\", giving up." - fi - grep -qi "locally modified" $scm_status && \ - fatal "cvs copy in project \"$p\" has locally modified files, giving up" - grep -qi "needs" $scm_status && \ - fatal "+ cvs copy in project \"$p\" is out-of-date, giving up" - fi -} - -set -e - -ssh=ssh -[ "$CVS_RSH" ] && ssh="$CVS_RSH" -[ "$GIT_SSH" ] && ssh="$GIT_SSH" -ssh=`which $ssh` -[ -x "$ssh" ] || fatal "SSH executable \"$ssh\" not found" -[ "$JANWARE_USER" ] || JANWARE_USER=`whoami` -ssh="$ssh -l $JANWARE_USER" - -for host in cvs.janware.com git.janware.com; do - $ssh $host echo hallo >/dev/null 2>&1 || fatal "Can't ssh into host $host" -done - -local_cvs_proj=`ls -d */CVS 2>/dev/null | sed 's%/[^/]*%%'` -local_git_proj=`ls -d */.git 2>/dev/null | sed 's%/[^/]*%%'` -remote_cvs_proj=`$ssh cvs.janware.com find /srv/cvs/proj -maxdepth 1 -mindepth 1 -type d -executable -readable | sed 's%.*/%%'` -remote_git_proj=`$ssh git.janware.com git-srv-admin.sh -j list-personal-projects` - -date=`date +'%Y%m%d'` -myname=`basename $0` - -trap goodbye EXIT INT QUIT KILL -scm_status=`mktemp /tmp/$myname""_XXXXXX` - -for p in $local_cvs_proj; do - [ -L $p ] && continue - [ -d $p ] || continue - echo $remote_cvs_proj | grep -q "\(^\| \)$p\($\| \)" && continue - n=purged/cvs/$date/$p - mkdir -p `dirname $n` - echo "--------------- moving stale cvs project $p to $n" - if ! make -C $p distclean; then echo "distclean failed, ignoring"; fi - if ! make -C $p clean; then echo "clean failed, ignoring"; fi - mv $p $n - sed -i "/\/$p\// d" CVS/Entries - purged="$purged $p" -done - -[ -d old ] && mv old purged - -[ "$purged" ] && { - cp -p CVS/Entries CVS/Entries-$date-`date +'%H%M%S'` -} - -for p in $purged; do - sed -i "/D\/$p\/\/\/\// d" CVS/Entries -done - -if [ -d dspc/src/CVS ]; then - for i in dspcd shared; do - sed -i "/D\/$i\/\/\/\// d" dspc/src/CVS/Entries - done -fi - -for i in dspider-btools dspider-shared; do - [ -L "$i" ] && rm $i -done - -for p in $local_git_proj; do - [ -L $p ] && continue - [ -d $p ] || continue - echo $remote_git_proj | grep -q "\(^\| \)$p\($\| \)" && continue - check_scm $p - echo done checking scm - n=purged/git/$date/$p - mkdir -p `dirname $n` - mv $p $n - log "moving stale project \"$p\" to \"$n\"" -done - diff --git a/scripts/python-tools.sh b/scripts/python-tools.sh deleted file mode 100644 index 543571fe..00000000 --- a/scripts/python-tools.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -usage() -{ - cat <<-EOT - - usage $myname [-e sed-extract-command] [-m module] file.py ... - - EOT - [ "$1" ] && exit $1 -} - -module_path() -{ - if [ "$module" ]; then - echo $module.$1 - return - fi - echo $1 -} - -cmd_create_init() -{ - local import_submodules=0 - local e f files base extracted module_path - local del="-------------------------- generated by $myname" - echo "# >> $del >>" - echo "from pkgutil import extend_path" - echo "from typing import Iterable" - echo "__path__ = extend_path(__path__, __name__) # type: ignore" # was "type Iterable[str]" - files="$*" - for f in $files; do - test -d $f && continue - base=${f##*/} - base=${base%.py} - if [ "$sed_extract_command" ]; then - #echo running $sed_extract_command on $f - extracted=`sed "$sed_extract_command" $f` - #extracted="$sed_extract_command" - for e in $extracted; do - echo "from `module_path $base` import $e" - done - fi - done - if [ "$import_submodules" = 1 ]; then - for f in $files; do - [ -f $f/__init__.py ] && echo "import `module_path $f` as $f" - done - fi - echo "# << $del <<" -} - -# --------------------- here we go - -myname=`basename $0` - -eval set -- `getopt -o 'he:m:' "$@"` -while [ "$1" != -- ]; do -case $1 in - -e) - sed_extract_command="$2" - shift - ;; - -m) - module=$2 - shift - ;; - -h) - usage 0;; - *) - echo unknown argument $1 - usage 1;; -esac -shift -done -shift - -cmd=cmd_${1//-/_} -shift - -eval $cmd $* diff --git a/scripts/qemu-boot.sh b/scripts/qemu-boot.sh deleted file mode 100644 index ff2caad9..00000000 --- a/scripts/qemu-boot.sh +++ /dev/null @@ -1,223 +0,0 @@ -#!/bin/bash - -goodbye() -{ - : - rm -rf $tmp_files -} - -usage() -{ -cat << EOT >&2 - - $myname -h - $myname {net|} [-b hostname] - -EOT - [ "$1" ] && exit $1 - exit 0 -} - -log() -{ - echo "$log_delim $*" - /usr/bin/logger -t "$myname" "$*" -} - -err() -{ - echo "$log_delim $*" >&2 - /usr/bin/logger -t "$myname" "$*" -} - -fatal() -{ - err "Fatal: $@ ... giving up" - exit 1 -} - -do_sudo() -{ - if [ "$UID" = 0 ]; then - while [[ $1 =~ ^- ]]; do shift; done - log running $@ - eval "$@" - return $? - fi - log running sudo $@ - #sudo -p "Password for $myname:" $@ - eval sudo "$@" - return $? -} - -ldap_search() -{ - local ldap_server=ldap.lcl - local binddn=cn=ldapadm,dc=jannet,dc=de - local password_files="$HOME/.feedfs-ldap/passwords/$binddn@$ldap_server $HOME/.ldap.secret" - local p password_file - for p in $password_files; do - [ -r "$p" ] || continue - password_file=$p - break - done - [ "$password_file" ] || fatal "None of the LDAP password files $password_files exists" - ldapsearch -y $password_file -xZ -h $ldap_server -D $binddn -b $base,ou=networks,dc=jannet,dc=de $@ -} - -list_hostnames() -{ - ldap_search -LLL "(objectClass=dhcpHost)" cn | sed '/cn: / !d; s/cn: //' -} - -boot_net() -{ - local mac - [ "$hostname" ] && { - #set -x - mac=`ldap_search -LLL "(cn=$short_hostname) dhcpHWAddress" | - sed '/dhcpHWAddress:/ !d; s/dhcpHWAddress: ethernet *//'` - macaddr=",macaddr=$mac" - } - - systemctl try-start dhcpd-priv.lcl - systemctl try-start nfsserver - - [ "$nic_model" ] || nic_model=",model=e1000" - # need this for net access, would be nicer if it didn't run as root - # -nographic - - do_sudo -E /usr/bin/$qemu_exe \ - -boot n \ - -net tap,ifname=tap0,script=$tmpdir/qemu-ifup,downscript=$tmpdir/qemu-ifdown \ - -net nic$nic_model$macaddr \ - "$qemu_opts" - - # invalid param macaddr -# do_sudo -E /usr/bin/$qemu_exe \ -# -boot n \ -# -net bridge,br=$bridge,$nic_model,macaddr=$macaddr \ -# $qemu_opts - - # access denied by ACL files -# do_sudo -E /usr/bin/$qemu_exe \ -# -boot n \ -# -net bridge,br=$bridge,$nic_model \ -# $qemu_opts -} - -boot_image() -{ - local boot_image="$1" - - test -r "$boot_image" || fatal "inaccessible boot image \"$boot_image\"" - #-net bridge,br=$bridge \ - #-net nic,vlan=1$nic_model,macaddr=00:02:36:22:13:6c \ - #-net tap,ifname=tap1,vlan=1,script=$tmpdir/qemu-ifup,downscript=$tmpdir/qemu-ifdown \ - #set -x - do_sudo -E /usr/bin/$qemu_exe \ - -net nic,$nic_model$macaddr \ - -net tap,ifname=tap0,vlan=0,script=$tmpdir/qemu-ifup,downscript=$tmpdir/qemu-ifdown \ - "$qemu_opts" \ - -drive file=$boot_image -} - -boot() -{ - tmpdir=`mktemp -d /tmp/$myname-XXXXXX` - ln -s $exe $tmpdir/qemu-ifup - ln -s $exe $tmpdir/qemu-ifdown - - #do_sudo /sbin/modprobe kvm-intel - tmp_files="$tmp_files $tmpdir" - xhost + - - case $1 in - net) - shift - boot_net "$@" - ;; - *) - boot_image "$@" - ;; - esac -} - -# -- here we go - -myname=`basename $0` -log_delim="===========================" -log running $0 $@ -[ -x $0 ] || chmod u+x $0 || fatal "$0 is not executable" -exe=`readlink -f $0` -dirname=`dirname $exe` -bridge=priv0 -bridge=pub0 -#bridge=enp0s31f6 -#bridge=in1 -macaddr=,macaddr=00:0B:DC:9B:D6:DA -base=dc=priv,dc=lcl -qemu_exe=qemu-kvm -qemu_exe=qemu-system-x86_64 -qemu_opts="" -ip=`PATH=/usr/sbin:/sbin:/usr/bin /usr/bin/which ip` -#nic_model=",model=rtl8139" -tmp_files="" -tmpdir="" - -trap goodbye INT QUIT EXIT KILL TERM PIPE - -OPTIND=1 -while getopts lhb:o:x:n:B:M: flag; do - case $flag in - h) - usage 0;; - l) - list_hostnames - exit 0;; - b) - hostname="$OPTARG" - short_hostname=`echo $hostname | sed 's/\..*//'` - dns_domain=`echo $hostname | cut -d. -f2-` - base=`echo $dns_domain | sed 's/\./,/g; s/\(^\|,\)/\1dc=/g'` - ;; - x) - qemu_exe="$OPTARG";; - o) - qemu_opts="$OPTARG";; - n) - nic_model=",model=$OPTARG";; - B) - bridge=$OPTARG;; - M) - macaddr=",macaddr=$OPTARG";; - - *) - usage 1;; - esac -done -shift $(($OPTIND - 1)) - -case $myname in -*ifup*) - virt_if=$1 - touch /tmp/i-ran-$myname - do_sudo $ip link set $virt_if up - do_sudo $ip link set dev $virt_if master $bridge - ;; - -*ifdown*) - virt_if=$1 - do_sudo $ip link set dev $virt_if nomaster - do_sudo $ip link set dev $virt_if down - ;; -qemu.sh) - boot "$@" - ;; -qemu-boot.sh) # legacy - boot "$@" - ;; -*) - echo called as unknown executable name $0 - ;; -esac diff --git a/scripts/scm.sh b/scripts/scm.sh deleted file mode 100644 index 7b6201a8..00000000 --- a/scripts/scm.sh +++ /dev/null @@ -1,174 +0,0 @@ -#!/bin/bash - -cmd_mv() -{ - local from="$1" - local to="$2" - case $scm in - cvs) - cp "$from" "$to" - cvs add "$to" - cvs remove -f "$from" - ;; - git) - git mv "$from" "$to" - ;; - esac -} - -cmd_commit() -{ - C='' - for i in "$@"; do - C="$C \"${i//\"/\\\"}\"" - done - eval $scm commit "$C" -} - -cmd_add() -{ - $scm add "$@" -} - -cmd_rm() -{ - case $scm in - cvs) - cvs remove "$@" - ;; - git) - git rm "$@" - ;; - esac -} - -cmd_clean() -{ - case $scm in - cvs) - while [ "${1:0:1}" = - ]; do - shift - done - set +e - local file - for file in $@; do - if ! grep -q "/$file/" CVS/Entries; then - rm -f $file - fi - done - ;; - git) - git clean -x "$@" - ;; - esac -} - -cmd_ls_files() -{ - filter_deleted() - { - local rc_file="$1" - shift - local cand - for cand in "$@"; do - grep -q "^R ./$cand/" $rc_file && continue - echo $cand - done - } - - output() - { - if [ "$zero_terminate" = 1 ]; then - echo -en "$*\x00" - else - echo "$*" - fi - } - - list_dirents_cvs() - { - local dirs=`sed '/^D\// !d; s%^D/%%; s%/.*%%' $1/CVS/Entries` - dirs="`filter_deleted $1/CVS/Entries $dirs`" - local cands - if [ -f $1/CVS/Entries.Log ]; then - cands="`sed '/^A D\// !d; s%^A D/%%; s%/.*%%' $1/CVS/Entries.Log`" - dirs="$dirs `filter_deleted $1/CVS/Entries.Log $cands`" - fi - local files=`sed '/^\// !d; s%/%%; s%/.*%%; s%^%%' $1/CVS/Entries` - files="`filter_deleted $1/CVS/Entries $files`" - local d f - for f in $files; do - output "$1/$f" - done - for d in $dirs; do - [ "$opt_only_regular_files" = 1 ] || output $1/$d - list_dirents_cvs $1/$d - done - } - - list_dirents_git() - { - local opts="$git_ls_files_opts" - git --version | grep -q "version *1" && opt_no_submodules=1 - [ "$opt_no_submodules" = 1 ] || opts="$opts --recurse-submodules" - git ls-files --recurse-submodules $opts $1 - } - - list_dirents() - { - if [ -d $1/CVS ]; then - list_dirents_cvs $1 - return - fi - git status >/dev/null 2>&1 || { - echo "failed to list versioned files in $1: no VCS" >&2 - exit 1 - } - list_dirents_git $1 - } - - set -- `getopt fnzt "$@"` - - while [ "$1" != -- ]; do - case $1 in - -f) - opt_only_regular_files=1 - ;; - -n) - opt_no_submodules=1 - ;; - -z) - zero_terminate=1 - git_ls_files_opts="$git_ls_files_opts -z" - opt_sort="$opt_sort -z" - ;; - -t) - text_files=1 - ;; - esac - shift - done - shift - - proj_dir="$1" - [ "$proj_dir" ] && cd $proj_dir - - if [ "$text_files" ]; then - list_dirents . | sort $opt_sort | xargs file -N | grep ":.*text" | cut -d: -f1 - else - list_dirents . | sort $opt_sort - fi -} - -# ------- here we go -export LANG=POSIX -myname=`basename $0` -cmd=cmd_${1//-/_} -shift -if [ -d "CVS" ]; then - scm=cvs -else - scm=git -fi - -$cmd "$@" diff --git a/scripts/streamline-project.sh b/scripts/streamline-project.sh deleted file mode 100644 index c749f3d4..00000000 --- a/scripts/streamline-project.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash - -goodbye() -{ - rm -rf $tmp - [ "$1" ] && exit $1 -} - -log() -{ - echo $@ -} - -error() -{ - log $@ -} - -fatal() -{ - error $@ - goodbye 1 -} - -set_var() -{ - local var=$1 - shift - eval local check=\$$var - if [ -z "$check" ]; then - eval $var="$@" - fi -} - -set_defaults() -{ - set_var modules `cd $dir; ls streamline-*.sh | sed 's/streamline-//; s/\.sh//; /^project$/ d'` -} - -usage() -{ - cat <<- EOT | sed 's/^ *|//' - | - | $myname [options] module ... - | - | module(s) are the module to be executed, currently selected: $modules - | - | options are - | - | -h: display this help message and exit sucessfully - | - EOT - goodbye $1 -} - -# -------------- here we go - -trap goodbye INT KILL EXIT - -myname=`basename $0` -dir=`dirname $0` - -eval set -- `getopt -- h "$@"` - -while [ "$1" != -- ]; do -case $1 in - -h) - usage=0;; - *) - usage=1;; -esac -shift -done -shift - -# modules="$@" - -set_defaults - -[ "$usage" ] && usage $usage - -for m in $modules; do - mod_script=$dir/streamline-$m.sh - log running $mod_script status - status=`$mod_script status` - r=$? - if [ "$r" != 0 ]; then - fatal "running "$mod_script status" failed ($r)" - fi - case $status in - not-implemented) - log "module $m is not implemented, yet, ignoring" - ;; - due) - log "need to run module $m" - ;; - *) - fatal "unrecognized output from module $m" - ;; - esac -done - diff --git a/scripts/timed-make-shell.sh b/scripts/timed-make-shell.sh deleted file mode 100644 index 09001ed3..00000000 --- a/scripts/timed-make-shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -shift # get rid of the '-c' supplied by make. -log=/tmp/make-cmds.log -/usr/bin/time --format "%E $*" -ao $log /bin/bash -c "$*" - diff --git a/scripts/upload.sh b/scripts/upload.sh deleted file mode 100644 index ed52d9d2..00000000 --- a/scripts/upload.sh +++ /dev/null @@ -1,362 +0,0 @@ -#!/bin/sh -######################################################################## -# # -# generic utiltiy modules # -# (c) 2001 jannet it services # -# contact@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. # -# # -######################################################################## - - -MYNAME=`basename $0` -HOST=pkg.janware.com -CFG_FILE=$HOME/.uploadrc - -login=`whoami` -method= -pw_ftp= -pw_scp=$HOME/.ssh/identity -pw_rsync= -pw_rsync_ssh=$HOME/.ssh/identity -file_mode= -dir_mode= -file_owner= -file_group= -ssh_identity= - -test -f $CFG_FILE && . $CFG_FILE - -if [ -n "$ssh_identity" ]; then - CFG_IDENTITY="-i $ssh_identity" -fi - -usage() -{ -cat << EOT - - Unified Upload Interface - Version '$Revision$' - '$Date$' - (c) 2002 Jannet IT Services http://www.jannet.de - - usage: $MYNAME -h - $MYNAME [-v] [-c variable] source [method://][[password:]login@]host[:target[:mode[:dirmode[:owner[.group]]]]] ... - - where "method" is one of "ftp", "scp", "rsync", "rsync_ssh". - - "password" may be a valid rsa private key file, too, if this makes sense with the chosen method. - - "source" may be a directory or a file. If it ends with a slash, it is treated as an existing - directory and expands to its contents. Thus, in the following, "source" denotes either a single - or multiple files or directories. - - "target" may be a directory or a file. - + If it is an existing directory, it will be populated with "source". The name(s) of "source" will be preserved. - + If it is not an existing directory, and does not have a trailing slash, - $MYNAME will skip everything following the last slash for a directory name, create - it, and populate it with "source". "source" will get renamed to the last portion of "target". - + If it is not an existing directory and has a trailing slash it will be created and populated with - "source". - - The default values for the optional parameters can be redefined in $CFG_FILE. - Currently they are: - - login="$login" - method="$method" - pw_ftp="$pw_ftp" - pw_scp="$pw_scp" - pw_rsync="$pc_rsync" - pw_rsync_ssh="$pw_rsync_ssh" - file_mode="$file_mode" - dir_mode="$dir_mode" - file_owner="$file_owner" - file_group="$file_group" - ssh_identity="$ssh_identity" - - Options: - - -h : show this help screen - -c variable : show contents of variable - valid variables are login, method, passwd, file_owner, file_group, file_mode, dir_mode, - source, target_file - -p : parse command line into variables, show results and exit if -x switch is active - -x : exit after informational commands - -EOT - [ -n "$1" ] && exit $1 -} - -log() -{ - echo $@ -} - -err() -{ - log $@ -} - -fatal() -{ - err $@ - exit 1 -} - -is_dir() -{ - isdir="`echo $1 | sed 's/.*\/$/yes/'`" - test "$isdir" = yes -} - -parse_target() -{ - target=$1 - LOGIN=`echo $target | sed -e 's/^.*:\/\///; /@/ !d; s/@.*//; s/.*://'` - test -n "$LOGIN" && echo login="\"$LOGIN\";" - METHOD=`echo $target | sed -e '/:\/\// !d; s/:\/\/.*//'` - test -n "$METHOD" && echo method="\"$METHOD\";" - PASSWD=`echo $target | sed -e '/@/ !d; /@/ !d; s/^.*:\/\///; s/@.*//' | rev | cut -d: -f2 | rev` - if [ -n "$PASSWD" ]; then - echo passwd="\"$PASSWD\";" - if [ -f "$PASSWD" ]; then - echo IDENTITY="\"-i $PASSWD\";" - else - echo IDENTITY="\"$CFG_IDENTITY\";" - fi - echo pw_ftp="\"$PASSWD\";" - echo pw_scp="\"$PASSWD\";" - echo pw_rsync="\"$PASSWD\";" - echo pw_rsync_ssh="\"$PASSWD\";" - fi - HOST=`echo $target | sed -e 's/^.*:\/\///; s/.*@//' | cut -d: -f1` - case $METHOD in - rsync_ssh) - if [ -z "$HOST" ]; then - PARSE_TARGET=FALSE - return - fi - echo host="\"$HOST\";" - ;; - "") - ;; - *) - PARSE_TARGET=FALSE - return - ;; - esac - TARGET_FILE=`echo $target | sed -e 's/^.*:\/\///; s/.*@//' | cut -d: -f2` - if [ -n "$TARGET_FILE" ]; then - echo target_file="\"$TARGET_FILE\";" - else - PARSE_TARGET=FALSE - return - fi - FILE_MODE=`echo $target | sed -e 's/^.*:\/\///; s/.*@//; /:/ !d' | cut -d: -f3` - test -n "$FILE_MODE" && echo file_mode="\"$FILE_MODE\";" - DIR_MODE=`echo $target | sed -e 's/^.*:\/\///; s/.*@//; /:/ !d' | cut -d: -f4` - test -n "$DIR_MODE" && echo dir_mode="\"$DIR_MODE\";" - FILE_OWNER=`echo $target | sed -e 's/^.*:\/\///; s/.*@//; /:/ !d' | cut -d: -f5 | cut -d. -f1` - test -n "$FILE_OWNER" && echo file_owner="\"$FILE_OWNER\";" - FILE_GROUP=`echo $target | sed -e 's/^.*:\/\///; s/.*@//; /:/ !d' | cut -d: -f5 | cut -d. -f2` - test -n "$FILE_GROUP" && echo file_group="\"$FILE_GROUP\";" - - if is_dir "$target_file" ; then - echo target_path=\"$TARGET_FILE/`basename $TARGET_FILE`\" # TODO: this is bullshit - else - echo target_path=\"$TARGET_FILE\" # TODO: this is bullshit - fi - - echo "PARSE_TARGET=\"OK\";" -} - -ssh_exec_stdin() -{ - $SSH -l $login $IDENTITY $host -C "SCRIPT=\`mktemp /tmp/$MYNAME""_XXXXXX\`; cat > \$SCRIPT; /bin/sh \$SCRIPT; rm \$SCRIPT" -} - -ssh_mkdir() -{ - set -e - dir=`echo $1 | sed -e 's/\/[^\/]*$//; s/\/*$//'` - parts="/ `echo $dir | sed -e 's%/% %g'`" - test -n "$dir_mode" && MODE="-m $dir_mode" -cat << EOT | - for part in $parts; do - path="\$path/\$part" - if [ ! -d \$path ]; then - mkdir \$path || break - test -n "$2" && chown "$2" \$path || continue - test -n "$3" && chgrp "$3" \$path || continue - test -n "$4" && chmod "$4" \$path || continue - fi - if [ ! -d \$path ]; then - fatal "failed to create directory \$path, owner=\$file_owner, group=\$file_group, mode=\$dir_mode" - fi - done -EOT - ssh_exec_stdin -} - -ssh_chown() -{ - set -e - dir=`echo $1 | sed -e 's/\/[^\/]*$//; s/\/*$//'` -cat << EOT | - if [ -f "$1" -a -n "$file_owner" ]; then chown $file_owner $1; fi - if [ -f "$1" -a -n "$file_group" ]; then chgrp $file_group $1; fi - #cd $1 - #if [ -n "$2" ]; then chown -R $2 . ; fi - #if [ -n "$3" ]; then chown -R $3 . ; fi -EOT - ssh_exec_stdin -} - -ssh_chmod() -{ - set -e - dir=`echo $1 | sed -e 's/\/[^\/]*$//; s/\/*$//'` -cat << EOT | - if [ -f "$1" -a -n "$file_mode" ]; then chmod $file_mode $1; fi - #if [ -n "$2" ]; then find . -type f | xargs --no-run-if-empty chmod $2 ; fi - #if [ -n "$3" ]; then find . -type d | xargs --no-run-if-empty chmod $3 ; fi -EOT - ssh_exec_stdin -} - -# -- here we go -# -- command line arguments -set -- `getopt 'hvc:px' $*` -while [ "$1" != -- ]; do -case $1 in - -h) - usage 0;; - -v) - VERBOSE=1;; - -c) - VARIABLE=$2 - shift;; - -p) - PARSE=1;; - -x) - EXIT=1;; - *) - usage 1;; -esac -shift -done -shift - -test -z "$VARIABLE" && test $# -lt 2 && usage 1 - -# -- get parameters from command line -n_targets=`expr $# - 1` -target="`echo $* | cut -d' ' -f$#`" -source="`echo $* | cut -d' ' -f1-$n_targets`" -#echo target=$target -#echo source=$source - -# -- check run -for s in $source; do - if [ ! -d "$s" -a ! -f "$s" -a ! -L "$s" ]; then - fatal \"$s\" is neither a regular file, nor a directory, nor a link. Exiting. >&2 - fi -done - -eval `parse_target $target` -if [ "$PARSE_TARGET" != OK ]; then - echo "Failed to parse target \"$t\"; exiting." - parse_target $t - exit 2 -fi -case $method in -rsync_ssh) - if [ "$login" != root ]; then - if [ "$file_owner" -a "$file_owner" != "$login" ]; then - fatal "File owner \"$file_owner\" is only legal, if you log in as \"$login\" or as \"root\"." - fi - fi - ;; -"") - ;; -*) - fatal "Support for method \"$method\" is not implemented." >&2 - ;; -esac - -# -- real run - -SSH=ssh -[ "$RSYNC_RSH" ] && SSH=$RSYNC_RSH - -if [ -n "$VARIABLE" ]; then - eval `parse_target` - case "$VARIABLE" in - login) echo $login;; - method) echo $method;; - passwd) echo $passwd;; - file_owner) echo $file_owner;; - file_group) echo $file_group;; - file_mode) echo $file_mode;; - dir_mode) echo $dir_mode;; - source) echo $source;; - target_file) echo $target_file;; - *) fatal Unknown variable \"$VARIABLE\". Exiting. >&2;; - esac - test "$EXIT" = 1 && exit 0 -fi - -if [ "$PARSE" = 1 ]; then - - eval `parse_target` - - for var in login method passwd file_owner file_group file_mode dir_mode source target_file ; do - - eval echo $var = \$$var - done - test "$EXIT" = 1 && exit 0 -fi - -eval `parse_target $target` -case $method in -rsync_ssh) - tmp_dir=/tmp/$login/rsync-ssh - ssh_mkdir $target_file $file_owner $file_group $dir_mode || fatal "failed to create directory for $target_file" - /usr/bin/rsync -az --links $RSYNC_EXTRA_OPTS -e "$SSH -l $login $IDENTITY" $source $login@$host:$target_file - ssh_chown $target_path $file_owner $file_group - ssh_chmod $target_path $file_mode $dir_mode - ;; -"") - #[ "$file_owner" ] || file_owner=`stat -c %u $source | head -1` - #[ "$file_group" ] || file_group=`stat -c %g $source | head -1` - #[ "$file_mode" ] || file_mode=`stat -c %a $source | head -1` - #install -m $file_mode -o $file_owner -g $file_group $source $target - $do_sudo cp $source $target - if [ "$file_owner" ] ; then $do_sudo chown $file_owner $target; fi - if [ "$file_group" ] ; then $do_sudo chgrp $file_group $target; fi - if [ "$file_mode" ] ; then $do_sudo chmod $file_mode $target; fi - ;; -*) - fatal "Internal error: \"$method\" is not implemented." >&2 - ;; -esac - diff --git a/tmpl/Makefile b/tmpl/Makefile deleted file mode 100644 index a9018b59..00000000 --- a/tmpl/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -TOPDIR = .. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dirs.mk diff --git a/tmpl/doxygen/Makefile b/tmpl/doxygen/Makefile deleted file mode 100644 index 616c1ae1..00000000 --- a/tmpl/doxygen/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -TOPDIR = ../.. - -TMPL_SUBDIR = doxygen - -SVG = $(TOPDIR)/htdocs/images/logo-janware/logo-janware.svg -GENERATED_WIDTHS_PNG = 400 - -LOGO = logo.png - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/svg.mk - -LOCAL_TMPL = $(wildcard *.html *.tmpl $(LOGO)) - -include $(JWBDIR)/make/tmpl.mk - -all: $(LOGO) -clean: clean.local - -$(LOGO): $(GENERATED_PNG) - cp $< $@ - -clean.local: - rm -f $(LOGO) diff --git a/tmpl/doxygen/doxygen.conf.tmpl b/tmpl/doxygen/doxygen.conf.tmpl deleted file mode 100644 index fd23e4a9..00000000 --- a/tmpl/doxygen/doxygen.conf.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -PROJECT_NAME = __PROJECT__ -PROJECT_NUMBER = __VERSION__ -PROJECT_BRIEF = "__PROJECT_SUMMARY__" -INPUT = __INPUT_DIRS__ -FILE_PATTERNS = __FILE_PATTERNS__ -RECURSIVE = __RECURSIVE__ -GENERATE_LATEX = NO -PAPER_TYPE = a4 -PREDEFINED = STRIPPED_DOWN_VERSION \ - __PROJECT_CAPNAME___API _BREAK_ABI_ -HAVE_DOT = YES -CALL_GRAPH = YES -CALLER_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES - -HTML_HEADER = header.html -HTML_FOOTER = footer.html -HTML_EXTRA_STYLESHEET = styles.css -EXCLUDE_SYMLINKS = YES -EXTRACT_STATIC = __EXTRACT_STATIC__ - -INLINE_SOURCES = __INLINE_SOURCES__ -SOURCE_BROWSER = __SOURCE_BROWSER__ diff --git a/tmpl/doxygen/footer.html b/tmpl/doxygen/footer.html deleted file mode 100644 index e69de29b..00000000 diff --git a/tmpl/doxygen/header.html b/tmpl/doxygen/header.html deleted file mode 100644 index 9e9ae32f..00000000 --- a/tmpl/doxygen/header.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/tmpl/doxygen/styles.css b/tmpl/doxygen/styles.css deleted file mode 100644 index 42f4a58f..00000000 --- a/tmpl/doxygen/styles.css +++ /dev/null @@ -1,13 +0,0 @@ -#logo { - text-align: right; - padding-right: 10px; -} - -#titlearea > table { - width: 100%; -} - -#titlearea { - /* background-color: #00FF00; */ -} - diff --git a/tmpl/tagged/Makefile b/tmpl/tagged/Makefile deleted file mode 100644 index b1ec41b6..00000000 --- a/tmpl/tagged/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -TOPDIR = ../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dirs.mk diff --git a/tmpl/tagged/cortex-m/Makefile b/tmpl/tagged/cortex-m/Makefile deleted file mode 100644 index 62d684a7..00000000 --- a/tmpl/tagged/cortex-m/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -TOPDIR = ../../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dirs.mk diff --git a/tmpl/tagged/cortex-m/ld/30-mem.ld.tmpl b/tmpl/tagged/cortex-m/ld/30-mem.ld.tmpl deleted file mode 100644 index 1d7ad385..00000000 --- a/tmpl/tagged/cortex-m/ld/30-mem.ld.tmpl +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of the µOS++ distribution. - * (https://github.com/micro-os-plus) - * Copyright (c) 2014 Liviu Ionescu. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Memory Spaces Definitions. - * - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - * - * The values below can be addressed in further linker scripts - * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'. - */ - -MEMORY -{ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K - CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0 - FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 128K - FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0 - EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0 - EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0 - EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0 - EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0 - MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0 -} - -/* - * For external ram use something like: - - RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K - - */ diff --git a/tmpl/tagged/cortex-m/ld/50-cortex-m-sections.ld.tmpl b/tmpl/tagged/cortex-m/ld/50-cortex-m-sections.ld.tmpl deleted file mode 100644 index ac8799fb..00000000 --- a/tmpl/tagged/cortex-m/ld/50-cortex-m-sections.ld.tmpl +++ /dev/null @@ -1,473 +0,0 @@ -/* - * This file is part of the µOS++ distribution. - * (https://github.com/micro-os-plus) - * Copyright (c) 2014 Liviu Ionescu. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Default linker script for Cortex-M (it includes specifics for - * STM32F[34]xx). - * - * To make use of the multi-region initialisations, define - * OS_INCLUDE_STARTUP_INIT_MULTIPLE_RAM_SECTIONS for the _startup.c file. - */ - -/* - * The '__stack' definition is required by crt0, do not remove it. - */ -__stack = ORIGIN(RAM) + LENGTH(RAM); - -_estack = __stack; /* STM specific definition */ - -/* - * Default stack sizes. - * These are used by the startup in order to allocate stacks - * for the different modes. - */ - -__Main_Stack_Size = 1024 ; - -PROVIDE ( _Main_Stack_Size = __Main_Stack_Size ) ; - -__Main_Stack_Limit = __stack - __Main_Stack_Size ; - -/* "PROVIDE" allows to easily override these values from an - * object file or the command line. */ -PROVIDE ( _Main_Stack_Limit = __Main_Stack_Limit ) ; - -/* - * There will be a link error if there is not this amount of - * RAM free at the end. - */ -_Minimum_Stack_Size = 256 ; - -/* - * Default heap definitions. - * The heap start immediately after the last statically allocated - * .sbss/.noinit section, and extends up to the main stack limit. - */ -PROVIDE ( _Heap_Begin = _end_noinit ) ; -PROVIDE ( _Heap_Limit = __stack - __Main_Stack_Size ) ; - -/* - * The entry point is informative, for debuggers and simulators, - * since the Cortex-M vector points to it anyway. - */ -ENTRY(_start) - - -/* Sections Definitions */ - -SECTIONS -{ - /* - * For Cortex-M devices, the beginning of the startup code is stored in - * the .isr_vector section, which goes to FLASH. - */ - .isr_vector : ALIGN(4) - { - FILL(0xFF) - - __vectors_start = ABSOLUTE(.) ; - __vectors_start__ = ABSOLUTE(.) ; /* STM specific definition */ - KEEP(*(.isr_vector)) /* Interrupt vectors */ - - KEEP(*(.cfmconfig)) /* Freescale configuration words */ - - /* - * This section is here for convenience, to store the - * startup code at the beginning of the flash area, hoping that - * this will increase the readability of the listing. - */ - *(.after_vectors .after_vectors.*) /* Startup code and ISR */ - - } >FLASH - - .inits : ALIGN(4) - { - /* - * Memory regions initialisation arrays. - * - * Thee are two kinds of arrays for each RAM region, one for - * data and one for bss. Each is iterrated at startup and the - * region initialisation is performed. - * - * The data array includes: - * - from (LOADADDR()) - * - region_begin (ADDR()) - * - region_end (ADDR()+SIZEOF()) - * - * The bss array includes: - * - region_begin (ADDR()) - * - region_end (ADDR()+SIZEOF()) - * - * WARNING: It is mandatory that the regions are word aligned, - * since the initialisation code works only on words. - */ - - __data_regions_array_start = .; - - LONG(LOADADDR(.data)); - LONG(ADDR(.data)); - LONG(ADDR(.data)+SIZEOF(.data)); - - LONG(LOADADDR(.data_CCMRAM)); - LONG(ADDR(.data_CCMRAM)); - LONG(ADDR(.data_CCMRAM)+SIZEOF(.data_CCMRAM)); - - __data_regions_array_end = .; - - __bss_regions_array_start = .; - - LONG(ADDR(.bss)); - LONG(ADDR(.bss)+SIZEOF(.bss)); - - LONG(ADDR(.bss_CCMRAM)); - LONG(ADDR(.bss_CCMRAM)+SIZEOF(.bss_CCMRAM)); - - __bss_regions_array_end = .; - - /* End of memory regions initialisation arrays. */ - - /* - * These are the old initialisation sections, intended to contain - * naked code, with the prologue/epilogue added by crti.o/crtn.o - * when linking with startup files. The standalone startup code - * currently does not run these, better use the init arrays below. - */ - KEEP(*(.init)) - KEEP(*(.fini)) - - . = ALIGN(4); - - /* - * The preinit code, i.e. an array of pointers to initialisation - * functions to be performed before constructors. - */ - PROVIDE_HIDDEN (__preinit_array_start = .); - - /* - * Used to run the SystemInit() before anything else. - */ - KEEP(*(.preinit_array_sysinit .preinit_array_sysinit.*)) - - /* - * Used for other platform inits. - */ - KEEP(*(.preinit_array_platform .preinit_array_platform.*)) - - /* - * The application inits. If you need to enforce some order in - * execution, create new sections, as before. - */ - KEEP(*(.preinit_array .preinit_array.*)) - - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - - /* - * The init code, i.e. an array of pointers to static constructors. - */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - . = ALIGN(4); - - /* - * The fini code, i.e. an array of pointers to static destructors. - */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - } >FLASH - - /* - * For some STRx devices, the beginning of the startup code - * is stored in the .flashtext section, which goes to FLASH. - */ - .flashtext : ALIGN(4) - { - *(.flashtext .flashtext.*) /* Startup code */ - } >FLASH - - - /* - * The program code is stored in the .text section, - * which goes to FLASH. - */ - .text : ALIGN(4) - { - *(.text .text.*) /* all remaining code */ - - /* read-only data (constants) */ - *(.rodata .rodata.* .constdata .constdata.*) - - *(vtable) /* C++ virtual tables */ - - KEEP(*(.eh_frame*)) - - /* - * Stub sections generated by the linker, to glue together - * ARM and Thumb code. .glue_7 is used for ARM code calling - * Thumb code, and .glue_7t is used for Thumb code calling - * ARM code. Apparently always generated by the linker, for some - * architectures, so better leave them here. - */ - *(.glue_7) - *(.glue_7t) - - } >FLASH - - /* ARM magic sections */ - .ARM.extab : ALIGN(4) - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - . = ALIGN(4); - __exidx_start = .; - .ARM.exidx : ALIGN(4) - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - . = ALIGN(4); - _etext = .; - __etext = .; - - /* MEMORY_ARRAY */ - /* - .ROarraySection : - { - *(.ROarraySection .ROarraySection.*) - } >MEMORY_ARRAY - */ - - /* - * The secondary initialised data section. - */ - .data_CCMRAM : ALIGN(4) - { - FILL(0xFF) - *(.data.CCMRAM .data.CCMRAM.*) - . = ALIGN(4) ; - } > CCMRAM AT>FLASH - - /* - * This address is used by the startup code to - * initialise the .data section. - */ - _sidata = LOADADDR(.data); - - /* - * The initialised data section. - * - * The program executes knowing that the data is in the RAM - * but the loader puts the initial values in the FLASH (inidata). - * It is one task of the startup to copy the initial values from - * FLASH to RAM. - */ - .data : ALIGN(4) - { - FILL(0xFF) - /* This is used by the startup code to initialise the .data section */ - _sdata = . ; /* STM specific definition */ - __data_start__ = . ; - *(.data_begin .data_begin.*) - - *(.data .data.*) - - *(.data_end .data_end.*) - . = ALIGN(4); - - /* This is used by the startup code to initialise the .data section */ - _edata = . ; /* STM specific definition */ - __data_end__ = . ; - - } >RAM AT>FLASH - - /* - * The uninitialised data sections. NOLOAD is used to avoid - * the "section `.bss' type changed to PROGBITS" warning - */ - - /* The secondary uninitialised data section. */ - .bss_CCMRAM (NOLOAD) : ALIGN(4) - { - *(.bss.CCMRAM .bss.CCMRAM.*) - } > CCMRAM - - /* The primary uninitialised data section. */ - .bss (NOLOAD) : ALIGN(4) - { - __bss_start__ = .; /* standard newlib definition */ - _sbss = .; /* STM specific definition */ - *(.bss_begin .bss_begin.*) - - *(.bss .bss.*) - *(COMMON) - - *(.bss_end .bss_end.*) - . = ALIGN(4); - __bss_end__ = .; /* standard newlib definition */ - _ebss = . ; /* STM specific definition */ - } >RAM - - .noinit_CCMRAM (NOLOAD) : ALIGN(4) - { - *(.noinit.CCMRAM .noinit.CCMRAM.*) - } > CCMRAM - - .noinit (NOLOAD) : ALIGN(4) - { - _noinit = .; - - *(.noinit .noinit.*) - - . = ALIGN(4) ; - _end_noinit = .; - } > RAM - - /* Mandatory to be word aligned, _sbrk assumes this */ - PROVIDE ( end = _end_noinit ); /* was _ebss */ - PROVIDE ( _end = _end_noinit ); - PROVIDE ( __end = _end_noinit ); - PROVIDE ( __end__ = _end_noinit ); - - /* - * Used for validation only, do not allocate anything here! - * - * This is just to check that there is enough RAM left for the Main - * stack. It should generate an error if it's full. - */ - ._check_stack : ALIGN(4) - { - . = . + _Minimum_Stack_Size ; - } >RAM - - /* - * The FLASH Bank1. - * The C or assembly source must explicitly place the code - * or data there using the "section" attribute. - */ - .b1text : ALIGN(4) - { - *(.b1text) /* remaining code */ - *(.b1rodata) /* read-only data (constants) */ - *(.b1rodata.*) - } >FLASHB1 - - /* - * The EXTMEM. - * The C or assembly source must explicitly place the code or data there - * using the "section" attribute. - */ - - /* EXTMEM Bank0 */ - .eb0text : ALIGN(4) - { - *(.eb0text) /* remaining code */ - *(.eb0rodata) /* read-only data (constants) */ - *(.eb0rodata.*) - } >EXTMEMB0 - - /* EXTMEM Bank1 */ - .eb1text : ALIGN(4) - { - *(.eb1text) /* remaining code */ - *(.eb1rodata) /* read-only data (constants) */ - *(.eb1rodata.*) - } >EXTMEMB1 - - /* EXTMEM Bank2 */ - .eb2text : ALIGN(4) - { - *(.eb2text) /* remaining code */ - *(.eb2rodata) /* read-only data (constants) */ - *(.eb2rodata.*) - } >EXTMEMB2 - - /* EXTMEM Bank0 */ - .eb3text : ALIGN(4) - { - *(.eb3text) /* remaining code */ - *(.eb3rodata) /* read-only data (constants) */ - *(.eb3rodata.*) - } >EXTMEMB3 - - - /* After that there are only debugging sections. */ - - /* This can remove the debugging information from the standard libraries */ - /* - DISCARD : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - */ - - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* - * DWARF debug sections. - * Symbols in the DWARF debugging sections are relative to the beginning - * of the section so we begin them at 0. - */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } -} diff --git a/tmpl/tagged/cortex-m/ld/Makefile b/tmpl/tagged/cortex-m/ld/Makefile deleted file mode 100644 index bc9a1d01..00000000 --- a/tmpl/tagged/cortex-m/ld/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -TOPDIR = ../../../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/tagged-tmpl-repo.mk diff --git a/tmpl/tex/Makefile b/tmpl/tex/Makefile deleted file mode 100644 index b1ec41b6..00000000 --- a/tmpl/tex/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -TOPDIR = ../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/dirs.mk diff --git a/tmpl/tex/de_contract/Makefile b/tmpl/tex/de_contract/Makefile deleted file mode 100644 index 5fc1d264..00000000 --- a/tmpl/tex/de_contract/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -TOPDIR = ../../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/text.mk diff --git a/tmpl/tex/de_contract/frontpage.tex.tmpl b/tmpl/tex/de_contract/frontpage.tex.tmpl deleted file mode 100644 index a940e319..00000000 --- a/tmpl/tex/de_contract/frontpage.tex.tmpl +++ /dev/null @@ -1,78 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex frontpage for technical documents % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\thispagestyle{empty} - -%\begin{figure}[t] -%\begin{flushright} -%%\begin{minipage}[t]{8cm} -%%\includegraphics[width=6cm,height=3cm]{__FRONTLOGO_EPS__} -%\includegraphics{__FRONTLOGO_EPS__} -%%%\end{minipage} -%\end{flushright} -%\end{figure} - -\begin{center} -\fbox{ -\parbox[t]{15cm} -{ -\vspace{0.3cm} - -\centerline{\Huge \bf __TITLE__} - -\vspace{0.3cm} - -\centerline{\Huge \bf __SUBTITLE__} - -\vspace{0.3cm} - -}} - -\vspace{3cm} - -\centerline{\Large __DATE__} - -\vspace{0.3cm} - -\centerline{\Large Dokumentversion: __VERSION__} - -\vspace{0.3cm} - -\end{center} - -%\begin{figure}[b] -%\begin{flushright} -%\begin{minipage}[b]{12cm} -%\begin{flushright} -%{\Large __AUTHORS__} -%\end{flushright} -%\end{minipage} -%\end{flushright} -%\end{figure} diff --git a/tmpl/tex/de_contract/header.tex.tmpl b/tmpl/tex/de_contract/header.tex.tmpl deleted file mode 100644 index b827bb03..00000000 --- a/tmpl/tex/de_contract/header.tex.tmpl +++ /dev/null @@ -1,237 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex style definition % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\documentclass[a4paper,12pt,oneside,makeidx]{__DOCUMENT_CLASS__} % - -\voffset=-12mm -\parindent=0mm -\parskip1ex plus 1pt minus 0.2pt -\parskip1ex plus 1pt minus 0.2pt - -\setcounter{secnumdepth}{3} -\setcounter{tocdepth}{3} - -\usepackage{array} -%\usepackage{amsmath} -\usepackage{amsfonts} -\usepackage{tabularx} -\usepackage{longtable} -\usepackage{graphicx} -\usepackage{verbatim} -%\usepackage{lgrind} -\usepackage{listings} -\lstloadlanguages{C++} -\usepackage[german]{babel} -%\usepackage[font=footnotesize,labelfont=bf,singlelinecheck=false,format=plain,,justification=justified]{caption} -%\usepackage[font=footnotesize,labelfont=bf,singlelinecheck=false,format=plain,,]{caption} -%\usepackage{portland} -\usepackage{amsmath} -\usepackage{float} -\usepackage{paralist} -\usepackage{lastpage} -\usepackage{zref-totpages} -%\usepackage[applemac]{inputenc} -%\usepackage[latin1]{inputenc} -\usepackage[utf8]{inputenc} - -%---------------------- File "./base/proc.sty": -%---------------------- File "./misc/blkarray.sty": -%---------------------- File "./misc/doublespace.sty": -%---------------------- File "./misc/euler.sty": -%---------------------- File "./misc/fnpara.sty": -%---------------------- File "./misc/gletter.sty": -%---------------------- File "./misc/setspace.sty": -%---------------------- File "./misc/gb4e.sty": -%---------------------- File "./misc/acmconf.sty": -%---------------------- File "./misc/articleJFPLC.sty": -%---------------------- File "./misc/seg.sty": -%---------------------- File "./tools/ftnright.sty": -% \usepackage{fnpara} % macht einen einzigen Block draus! -%\usepackage{proc} % Warnung Klasse - File -%\usepackage{blkarray} % -%\usepackage{doublespace} -%\usepackage{euler} -%\usepackage{gletter} -\usepackage{fnpara} - -%\usepackage{acmconf} -%\usepackage{articleJFPLC} -%\usepackage{gb4e} -%\usepackage{seg} - -\usepackage{lscape} -%\usepackage{epsfig} -%\usepackage[umlaute] - -\usepackage{xcolor} - -\definecolor{lightblue}{rgb}{0.8,0.8,1.0} -\definecolor{darkred}{rgb}{0.5,0.0,0.0} -\definecolor{lightred}{rgb}{1.0,0.8,0.8} -\definecolor{lightgreen}{rgb}{0.8,1.0,0.8} -\definecolor{lightyellow}{rgb}{1.0,1.0,0.7} - -\usepackage[pdftex,breaklinks,colorlinks,backref,pagebackref,linkcolor=darkred,citecolor=blue, urlcolor=darkred,pdfauthor=__AUTHORS__,pdftitle=__TITLE__,pdfsubject=__SUBTITLE__]{hyperref} -\usepackage[section]{placeins} -\usepackage{import} -\usepackage[right]{eurosym} - -\usepackage{textcomp} -\usepackage{booktabs} -%\usepackage{german}{babel} - -\usepackage[ngerman,colorinlistoftodos,shadow,textsize=tiny]{todonotes} -\usepackage{listings} - \lstset{ - literate= {\"O}{{\"O}}1 {\"A}{{\"A}}1 {\"U}{{\"U}}1 {"s}{{\ss}}2 {\"u}{{\"u}}1 - {\"a}{{\"a}}1 {\"o}{{\"o}}1 - } -\usepackage{mdframed} -\usepackage{xspace} - -%\usepackage{natbib} -%\bibliographystyle{plainnat} - -\bibliographystyle{gerplain} -\bibliography{literatur} -\usepackage{cite} - -%\textwidth 22.7cm -\topmargin -0.4cm -\oddsidemargin 0.5cm -\evensidemargin 0.5cm -\textwidth=16cm \textheight=24.7cm \oddsidemargin-0mm -% \renewcommand{\baselinestretch}{1.5} - -% macht Zeilenumbrüche in \texttt möglich > -\newcommand{\origttfamily}{}% sollte noch nicht definiert sein! -\let\origttfamily=\ttfamily % alte Definition von \ttfamily sichern -\renewcommand{\ttfamily}{\origttfamily \hyphenchar\font=`\-} -% macht Zeilenumbrüche in \texttt möglich < - -\newcommand{\C}{\mathbb{C}} -\newcommand{\R}{\mathbb{R}} -\newcommand{\N}{\mathbb{N}} -\newcommand{\Z}{\mathbb{Z}} -\newcommand{\Fourier}{\mathcal{F}} -\newcommand{\cont}{\mathcal{C}} -\newcommand{\eqv}{\Longleftrightarrow} -\newcommand{\grad}{\bigtriangledown} -\newcommand{\yields}{\Longrightarrow} -\newcommand{\Linf}{\cal{L}^\infty} -\newcommand{\degr}{$^\circ $} -\newcommand{\ra}{$\rightarrow$\quad} -\newcommand{\la}{$\leftarrow$\quad} -\newcommand{\pr}{\texttt} -\newcommand{\bs}{$\backslash$} -\newcommand{\pa}{\noindent \paragraph} -\newcommand{\bv}{\begin{quote}\begin{ttfamily}} -\newcommand{\ev}{\end{ttfamily}\end{quote}} -\newcommand {\hb}{\cite{SysMan}} -\newcommand {\fx}{\cite{Fax}} -\newcommand {\cconsole}{{\bf C-Console}\textsuperscript{\textregistered}\,} - -\let\oldEUR\EUR -\renewcommand{\EUR}[1]{\oldEUR{#1}\xspace} - -%\sloppy - -% Groessen, die in der Diplomarbeit automatisch gesetzt werden -% statistische Auswertung der Klassifikation -\newcommand {\Pclass}{} -\newcommand {\pclass}{} -\newcommand {\wrong}{} -\newcommand {\DKdurch}{} -\newcommand {\DKmin}{} -% Parameter eines Orientierungsdetektors - -\newcommand {\sigy}{} -\newcommand {\sigx}{} -\newcommand {\xnull}{} -\newcommand {\dspider}{{\bf Dspider}\textsuperscript{\textregistered}\,} - -% \DeclareMathSymbol{\C}{\mathalpha}{\AMSb}{``43} -% \DeclareMathSymbol{\R}{\mathalpha}{\AMSb}{``52} - - -\newcolumntype{v}[1]{% ->{\raggedright\hspace{0pt}\arraybackslash}p{#1}% -} - -\renewcommand\floatpagefraction{.9} -\renewcommand\topfraction{.9} -\renewcommand\bottomfraction{.9} -\renewcommand\textfraction{.1} -\setlength{\headheight}{15pt} - -\newenvironment{prog}{\begin{quote}}{\end{quote} } - -\newenvironment{tabularcompactitem}{% - \setdefaultleftmargin{1em}{1em}{1em}{1em}{1em}{1em}% - \vspace{-\topsep}% - \compactitem -}{ - \vspace*{-\ht\strutbox}% - \endcompactitem -} - -\makeindex - -% Kopf- und Fußzeile -\usepackage{fancyhdr} -\pagestyle{fancy} -\fancyhf{} - -%Kopfzeile mittig mit Kaptilname -%\fancyhead[C]{__TITLE__ __SUBTITLE__ \nouppercase{\leftmark}} -\title{__TITLE__ __SUBTITLE__} -\author{__AUTHORS__} -\fancyhead[C]{__TITLE__ __SUBTITLE__} -%Linie oben -%\renewcommand{\headrulewidth}{0.5pt} - -%Fußzeile links bzw. innen -\fancyfoot[L]{Dok.-Vers.: __VERSION__ vom __DATE__} -%\fancyfoot[L]{__TITLE__ __SUBTITLE__ __VERSION__} -%Fußzeile mittig (Seitennummer) -% \renewcommand{\headrulewidth}{0.0pt} %obere Linie ausblenden -\fancyfoot[R]{Seite \thepage \hspace{2pt} von \ztotpages} -%Linie unten -\renewcommand{\footrulewidth}{0.5pt} - -% Fußzeile auf jeder Seite - auch Kapitel und Inhaltsverzeichnis -\fancypagestyle{plain}{% - \fancyhf{}% - %\fancyhead[C]{} %Kapitelname ausblenden - \fancyfoot[L]{__TITLE__ __SUBTITLE__, V. __VERSION__, __DATE__} - \renewcommand{\headrulewidth}{0.0pt} %obere Linie ausblenden - \fancyfoot[R]{\thepage} -} diff --git a/tmpl/tex/de_contract/index_head.html.tmpl b/tmpl/tex/de_contract/index_head.html.tmpl deleted file mode 100644 index 8ac66da7..00000000 --- a/tmpl/tex/de_contract/index_head.html.tmpl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - __TITLE__ - - - - - - - - - -
-
- -
- -
- -
- -

__TITLE__

-

__SUBTITLE__

-

__DATE__

-

Version: __VERSION__

-  -  -

__AUTHORS__

-  -
-
- -
-

- -

Achtung!

- -Diese Website wurde automatisch mit Hilfe des Skripts -latex2html erstellt. -Obwohl es ein sehr nützliches Programm ist, ist bei seiner Anwendung ein Teil des ursprüichen Dokuments verloren gegangen. -Wenn Sie das ganze Dokument fehlerfrei einsehen wollen, dann benutzen Sie bitte eine der unten zum Download angebotenen Versionen. -

- -

diff --git a/tmpl/tex/de_contract/index_tail.html.tmpl b/tmpl/tex/de_contract/index_tail.html.tmpl deleted file mode 100644 index 5c8e0703..00000000 --- a/tmpl/tex/de_contract/index_tail.html.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -

-

-
-
-  -  -contents -
- - diff --git a/tmpl/tex/de_presentation/Makefile b/tmpl/tex/de_presentation/Makefile deleted file mode 100644 index 5fc1d264..00000000 --- a/tmpl/tex/de_presentation/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -TOPDIR = ../../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/text.mk diff --git a/tmpl/tex/de_presentation/frontpage.tex.tmpl b/tmpl/tex/de_presentation/frontpage.tex.tmpl deleted file mode 100644 index a940e319..00000000 --- a/tmpl/tex/de_presentation/frontpage.tex.tmpl +++ /dev/null @@ -1,78 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex frontpage for technical documents % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\thispagestyle{empty} - -%\begin{figure}[t] -%\begin{flushright} -%%\begin{minipage}[t]{8cm} -%%\includegraphics[width=6cm,height=3cm]{__FRONTLOGO_EPS__} -%\includegraphics{__FRONTLOGO_EPS__} -%%%\end{minipage} -%\end{flushright} -%\end{figure} - -\begin{center} -\fbox{ -\parbox[t]{15cm} -{ -\vspace{0.3cm} - -\centerline{\Huge \bf __TITLE__} - -\vspace{0.3cm} - -\centerline{\Huge \bf __SUBTITLE__} - -\vspace{0.3cm} - -}} - -\vspace{3cm} - -\centerline{\Large __DATE__} - -\vspace{0.3cm} - -\centerline{\Large Dokumentversion: __VERSION__} - -\vspace{0.3cm} - -\end{center} - -%\begin{figure}[b] -%\begin{flushright} -%\begin{minipage}[b]{12cm} -%\begin{flushright} -%{\Large __AUTHORS__} -%\end{flushright} -%\end{minipage} -%\end{flushright} -%\end{figure} diff --git a/tmpl/tex/de_presentation/header.tex.tmpl b/tmpl/tex/de_presentation/header.tex.tmpl deleted file mode 100644 index 907cff88..00000000 --- a/tmpl/tex/de_presentation/header.tex.tmpl +++ /dev/null @@ -1,22 +0,0 @@ -% vim: set filetype=tex : -\documentclass[t,usepdftitle=false__DOCUMENT_CLASS_OPTIONS__]{beamer} -\usepackage[accumulated]{beamerseminar} -\usepackage{beamertexpower} -\usepackage{beamerthemeshadow} -\hypersetup{colorlinks,linkcolor=blue,pdfpagemode=FullScreen} -\usepackage[right]{eurosym} -\usepackage{import} -\usetheme{Darmstadt} - -\usepackage[T1]{fontenc} -\usepackage[utf8]{inputenc} - -\usepackage{tikz} -\usetikzlibrary{decorations.pathreplacing,positioning,calc} - -\newcommand{\pr}{\texttt} -\newcommand{\animationframes}{__ANIMATION_FRAMES__} - -\title{__TITLE__ -- __SUBTITLE__} -\author[__AUTHORS__]{__AUTHORS__\\\href{mailto:__CONTACT_EMAIL__}{\code{__CONTACT_EMAIL__}}} -\date{__DATE__} diff --git a/tmpl/tex/de_presentation/index_head.html.tmpl b/tmpl/tex/de_presentation/index_head.html.tmpl deleted file mode 100644 index 8ac66da7..00000000 --- a/tmpl/tex/de_presentation/index_head.html.tmpl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - __TITLE__ - - - - - - - - - -
-
- -
- -
- -
- -

__TITLE__

-

__SUBTITLE__

-

__DATE__

-

Version: __VERSION__

-  -  -

__AUTHORS__

-  -
-
- -
-

- -

Achtung!

- -Diese Website wurde automatisch mit Hilfe des Skripts -latex2html erstellt. -Obwohl es ein sehr nützliches Programm ist, ist bei seiner Anwendung ein Teil des ursprüichen Dokuments verloren gegangen. -Wenn Sie das ganze Dokument fehlerfrei einsehen wollen, dann benutzen Sie bitte eine der unten zum Download angebotenen Versionen. -

- -

diff --git a/tmpl/tex/de_presentation/index_tail.html.tmpl b/tmpl/tex/de_presentation/index_tail.html.tmpl deleted file mode 100644 index 5c8e0703..00000000 --- a/tmpl/tex/de_presentation/index_tail.html.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -

-

-
-
-  -  -contents -
- - diff --git a/tmpl/tex/de_technical/Makefile b/tmpl/tex/de_technical/Makefile deleted file mode 100644 index 5fc1d264..00000000 --- a/tmpl/tex/de_technical/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -TOPDIR = ../../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/text.mk diff --git a/tmpl/tex/de_technical/frontpage.ger.tmpl b/tmpl/tex/de_technical/frontpage.ger.tmpl deleted file mode 100644 index 430befe9..00000000 --- a/tmpl/tex/de_technical/frontpage.ger.tmpl +++ /dev/null @@ -1,80 +0,0 @@ -DON'T EDIT! -DELETE -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex frontpage for technical documents % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\thispagestyle{empty} - -\begin{figure}[t] -\begin{flushright} -%\begin{minipage}[t]{8cm} -%\includegraphics[width=6cm,height=3cm]{__FRONTLOGO_EPS__} -\includegraphics{__FRONTLOGO_EPS__} -%%\end{minipage} -\end{flushright} -\end{figure} - -\begin{center} -\fbox{ -\parbox[t]{15.0cm} -{ -\vspace{0.3cm} - -\centerline{\Huge \bf __TITLE__} - -\vspace{0.3cm} - -\centerline{\Huge \bf __SUBTITLE__} - -\vspace{0.3cm} - -}} - -\vspace{3cm} - -\centerline{\Large __DATE__} - -\vspace{0.3cm} - -\centerline{\Large Dokumentversion: __VERSION__} - -\vspace{0.3cm} - -\end{center} - -\begin{figure}[b] -\begin{flushright} -\begin{minipage}[b]{8cm} -\begin{flushright} -{\Large __AUTHORS__} -\end{flushright} -\end{minipage} -\end{flushright} -\end{figure} diff --git a/tmpl/tex/de_technical/frontpage.tex.tmpl b/tmpl/tex/de_technical/frontpage.tex.tmpl deleted file mode 100644 index 92ea5c8e..00000000 --- a/tmpl/tex/de_technical/frontpage.tex.tmpl +++ /dev/null @@ -1,86 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex frontpage for technical documents % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%\hypersetup{ -% pdfauthor={...}, -% pdftitle={...}, -% pdfsubject={...}, -% urlcolor=red, -% linkcolor=darkred, -%} - -\thispagestyle{empty} - -\begin{figure}[t] -\begin{flushright} -%\begin{minipage}[t]{8cm} -\includegraphics[width=6cm]{__FRONTLOGO_PDF__} -%%\end{minipage} -\end{flushright} -\end{figure} - -\begin{center} -\fbox{ -\parbox[t]{15cm} -{ -\vspace{0.3cm} - -\centerline{\Huge \bf __TITLE__} - -\vspace{0.3cm} - -\centerline{\Huge \bf __SUBTITLE__} - -\vspace{0.3cm} - -}} - -\vspace{3cm} - -\centerline{\Large __DATE__} - -\vspace{0.3cm} - -\centerline{\Large Dokumentversion: __VERSION__} - -\vspace{0.3cm} - -\end{center} - -\begin{figure}[b] -\begin{flushright} -\begin{minipage}[b]{12cm} -\begin{flushright} -{\Large __AUTHORS__} -\end{flushright} -\end{minipage} -\end{flushright} -\end{figure} diff --git a/tmpl/tex/de_technical/header.ger.tmpl b/tmpl/tex/de_technical/header.ger.tmpl deleted file mode 100644 index 4421e17e..00000000 --- a/tmpl/tex/de_technical/header.ger.tmpl +++ /dev/null @@ -1,132 +0,0 @@ -DON'T EDIT -DELETE -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex style definition % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\documentclass[a4paper,12pt,oneside] {__DOCUMENT_CLASS__} -\setcounter{secnumdepth}{3} -\setcounter{tocdepth}{3} -%\usepackage{amsmath} -\usepackage{amsfonts} -\usepackage{graphicx} -\usepackage{verbatim} -%\usepackage{lgrind} -\usepackage{listings} -\lstloadlanguages{C++} -\usepackage[german]{babel} -\usepackage[footnotesize]{caption} -%\usepackage{portland} -%---------------------- File "./base/proc.sty": -%---------------------- File "./misc/blkarray.sty": -%---------------------- File "./misc/doublespace.sty": -%---------------------- File "./misc/euler.sty": -%---------------------- File "./misc/fnpara.sty": -%---------------------- File "./misc/gletter.sty": -%---------------------- File "./misc/setspace.sty": -%---------------------- File "./misc/gb4e.sty": -%---------------------- File "./misc/acmconf.sty": -%---------------------- File "./misc/articleJFPLC.sty": -%---------------------- File "./misc/seg.sty": -%---------------------- File "./tools/ftnright.sty": -% \usepackage{fnpara} % macht einen einzigen Block draus! -%\usepackage{proc} % Warnung Klasse - File -%\usepackage{blkarray} % -%\usepackage{doublespace} -%\usepackage{euler} -%\usepackage{gletter} -\usepackage{fnpara} -\usepackage[right]{eurosym} -\usepackage{import} - -%\usepackage{acmconf} -%\usepackage{articleJFPLC} -%\usepackage{gb4e} -%\usepackage{seg} - -%\usepackage{lscape} -%\usepackage{epsfig} -%\usepackage[umlaute] - -\textwidth 15cm -\textheight 23.5cm -\topmargin -0.4cm -\oddsidemargin 0.5cm -\evensidemargin 0.5cm -% \renewcommand{\baselinestretch}{1.5} - -\newcommand{\C}{\mathbb{C}} -\newcommand{\R}{\mathbb{R}} -\newcommand{\N}{\mathbb{N}} -\newcommand{\Z}{\mathbb{Z}} -\newcommand{\Fourier}{\mathcal{F}} -\newcommand{\cont}{\mathcal{C}} -\newcommand{\eqv}{\Longleftrightarrow} -\newcommand{\grad}{\bigtriangledown} -\newcommand{\yields}{\Longrightarrow} -\newcommand{\Linf}{\cal{L}^\infty} -\newcommand{\degr}{$^\circ $} -\newcommand{\ra}{$\rightarrow$\quad} -\newcommand{\la}{$\leftarrow$\quad} -\newcommand{\pr}{\texttt} -\newcommand{\bs}{$\backslash$} -\newcommand{\pa}{\noindent \paragraph} -\newcommand{\bv}{\begin{quote}\begin{ttfamily}} -\newcommand{\ev}{\end{ttfamily}\end{quote}} - -\sloppy - -% Groessen, die in der Diplomarbeit automatisch gesetzt werden -% statistische Auswertung der Klassifikation -\newcommand {\Pclass}{} -\newcommand {\pclass}{} -\newcommand {\wrong}{} -\newcommand {\DKdurch}{} -\newcommand {\DKmin}{} -% Parameter eines Orientierungsdetektors - -\newcommand {\sigy}{} -\newcommand {\sigx}{} -\newcommand {\xnull}{} - -% \DeclareMathSymbol{\C}{\mathalpha}{\AMSb}{``43} -% \DeclareMathSymbol{\R}{\mathalpha}{\AMSb}{``52} - - -\renewcommand\floatpagefraction{.9} -\renewcommand\topfraction{.9} -\renewcommand\bottomfraction{.9} -\renewcommand\textfraction{.1} - -\newenvironment{prog}{\begin{quote}}{\end{quote} } - -linkcolor=blue, -linkcolor=blue, - citecolor=blue, urlcolor=blue diff --git a/tmpl/tex/de_technical/header.tex.tmpl b/tmpl/tex/de_technical/header.tex.tmpl deleted file mode 100644 index b827bb03..00000000 --- a/tmpl/tex/de_technical/header.tex.tmpl +++ /dev/null @@ -1,237 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex style definition % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\documentclass[a4paper,12pt,oneside,makeidx]{__DOCUMENT_CLASS__} % - -\voffset=-12mm -\parindent=0mm -\parskip1ex plus 1pt minus 0.2pt -\parskip1ex plus 1pt minus 0.2pt - -\setcounter{secnumdepth}{3} -\setcounter{tocdepth}{3} - -\usepackage{array} -%\usepackage{amsmath} -\usepackage{amsfonts} -\usepackage{tabularx} -\usepackage{longtable} -\usepackage{graphicx} -\usepackage{verbatim} -%\usepackage{lgrind} -\usepackage{listings} -\lstloadlanguages{C++} -\usepackage[german]{babel} -%\usepackage[font=footnotesize,labelfont=bf,singlelinecheck=false,format=plain,,justification=justified]{caption} -%\usepackage[font=footnotesize,labelfont=bf,singlelinecheck=false,format=plain,,]{caption} -%\usepackage{portland} -\usepackage{amsmath} -\usepackage{float} -\usepackage{paralist} -\usepackage{lastpage} -\usepackage{zref-totpages} -%\usepackage[applemac]{inputenc} -%\usepackage[latin1]{inputenc} -\usepackage[utf8]{inputenc} - -%---------------------- File "./base/proc.sty": -%---------------------- File "./misc/blkarray.sty": -%---------------------- File "./misc/doublespace.sty": -%---------------------- File "./misc/euler.sty": -%---------------------- File "./misc/fnpara.sty": -%---------------------- File "./misc/gletter.sty": -%---------------------- File "./misc/setspace.sty": -%---------------------- File "./misc/gb4e.sty": -%---------------------- File "./misc/acmconf.sty": -%---------------------- File "./misc/articleJFPLC.sty": -%---------------------- File "./misc/seg.sty": -%---------------------- File "./tools/ftnright.sty": -% \usepackage{fnpara} % macht einen einzigen Block draus! -%\usepackage{proc} % Warnung Klasse - File -%\usepackage{blkarray} % -%\usepackage{doublespace} -%\usepackage{euler} -%\usepackage{gletter} -\usepackage{fnpara} - -%\usepackage{acmconf} -%\usepackage{articleJFPLC} -%\usepackage{gb4e} -%\usepackage{seg} - -\usepackage{lscape} -%\usepackage{epsfig} -%\usepackage[umlaute] - -\usepackage{xcolor} - -\definecolor{lightblue}{rgb}{0.8,0.8,1.0} -\definecolor{darkred}{rgb}{0.5,0.0,0.0} -\definecolor{lightred}{rgb}{1.0,0.8,0.8} -\definecolor{lightgreen}{rgb}{0.8,1.0,0.8} -\definecolor{lightyellow}{rgb}{1.0,1.0,0.7} - -\usepackage[pdftex,breaklinks,colorlinks,backref,pagebackref,linkcolor=darkred,citecolor=blue, urlcolor=darkred,pdfauthor=__AUTHORS__,pdftitle=__TITLE__,pdfsubject=__SUBTITLE__]{hyperref} -\usepackage[section]{placeins} -\usepackage{import} -\usepackage[right]{eurosym} - -\usepackage{textcomp} -\usepackage{booktabs} -%\usepackage{german}{babel} - -\usepackage[ngerman,colorinlistoftodos,shadow,textsize=tiny]{todonotes} -\usepackage{listings} - \lstset{ - literate= {\"O}{{\"O}}1 {\"A}{{\"A}}1 {\"U}{{\"U}}1 {"s}{{\ss}}2 {\"u}{{\"u}}1 - {\"a}{{\"a}}1 {\"o}{{\"o}}1 - } -\usepackage{mdframed} -\usepackage{xspace} - -%\usepackage{natbib} -%\bibliographystyle{plainnat} - -\bibliographystyle{gerplain} -\bibliography{literatur} -\usepackage{cite} - -%\textwidth 22.7cm -\topmargin -0.4cm -\oddsidemargin 0.5cm -\evensidemargin 0.5cm -\textwidth=16cm \textheight=24.7cm \oddsidemargin-0mm -% \renewcommand{\baselinestretch}{1.5} - -% macht Zeilenumbrüche in \texttt möglich > -\newcommand{\origttfamily}{}% sollte noch nicht definiert sein! -\let\origttfamily=\ttfamily % alte Definition von \ttfamily sichern -\renewcommand{\ttfamily}{\origttfamily \hyphenchar\font=`\-} -% macht Zeilenumbrüche in \texttt möglich < - -\newcommand{\C}{\mathbb{C}} -\newcommand{\R}{\mathbb{R}} -\newcommand{\N}{\mathbb{N}} -\newcommand{\Z}{\mathbb{Z}} -\newcommand{\Fourier}{\mathcal{F}} -\newcommand{\cont}{\mathcal{C}} -\newcommand{\eqv}{\Longleftrightarrow} -\newcommand{\grad}{\bigtriangledown} -\newcommand{\yields}{\Longrightarrow} -\newcommand{\Linf}{\cal{L}^\infty} -\newcommand{\degr}{$^\circ $} -\newcommand{\ra}{$\rightarrow$\quad} -\newcommand{\la}{$\leftarrow$\quad} -\newcommand{\pr}{\texttt} -\newcommand{\bs}{$\backslash$} -\newcommand{\pa}{\noindent \paragraph} -\newcommand{\bv}{\begin{quote}\begin{ttfamily}} -\newcommand{\ev}{\end{ttfamily}\end{quote}} -\newcommand {\hb}{\cite{SysMan}} -\newcommand {\fx}{\cite{Fax}} -\newcommand {\cconsole}{{\bf C-Console}\textsuperscript{\textregistered}\,} - -\let\oldEUR\EUR -\renewcommand{\EUR}[1]{\oldEUR{#1}\xspace} - -%\sloppy - -% Groessen, die in der Diplomarbeit automatisch gesetzt werden -% statistische Auswertung der Klassifikation -\newcommand {\Pclass}{} -\newcommand {\pclass}{} -\newcommand {\wrong}{} -\newcommand {\DKdurch}{} -\newcommand {\DKmin}{} -% Parameter eines Orientierungsdetektors - -\newcommand {\sigy}{} -\newcommand {\sigx}{} -\newcommand {\xnull}{} -\newcommand {\dspider}{{\bf Dspider}\textsuperscript{\textregistered}\,} - -% \DeclareMathSymbol{\C}{\mathalpha}{\AMSb}{``43} -% \DeclareMathSymbol{\R}{\mathalpha}{\AMSb}{``52} - - -\newcolumntype{v}[1]{% ->{\raggedright\hspace{0pt}\arraybackslash}p{#1}% -} - -\renewcommand\floatpagefraction{.9} -\renewcommand\topfraction{.9} -\renewcommand\bottomfraction{.9} -\renewcommand\textfraction{.1} -\setlength{\headheight}{15pt} - -\newenvironment{prog}{\begin{quote}}{\end{quote} } - -\newenvironment{tabularcompactitem}{% - \setdefaultleftmargin{1em}{1em}{1em}{1em}{1em}{1em}% - \vspace{-\topsep}% - \compactitem -}{ - \vspace*{-\ht\strutbox}% - \endcompactitem -} - -\makeindex - -% Kopf- und Fußzeile -\usepackage{fancyhdr} -\pagestyle{fancy} -\fancyhf{} - -%Kopfzeile mittig mit Kaptilname -%\fancyhead[C]{__TITLE__ __SUBTITLE__ \nouppercase{\leftmark}} -\title{__TITLE__ __SUBTITLE__} -\author{__AUTHORS__} -\fancyhead[C]{__TITLE__ __SUBTITLE__} -%Linie oben -%\renewcommand{\headrulewidth}{0.5pt} - -%Fußzeile links bzw. innen -\fancyfoot[L]{Dok.-Vers.: __VERSION__ vom __DATE__} -%\fancyfoot[L]{__TITLE__ __SUBTITLE__ __VERSION__} -%Fußzeile mittig (Seitennummer) -% \renewcommand{\headrulewidth}{0.0pt} %obere Linie ausblenden -\fancyfoot[R]{Seite \thepage \hspace{2pt} von \ztotpages} -%Linie unten -\renewcommand{\footrulewidth}{0.5pt} - -% Fußzeile auf jeder Seite - auch Kapitel und Inhaltsverzeichnis -\fancypagestyle{plain}{% - \fancyhf{}% - %\fancyhead[C]{} %Kapitelname ausblenden - \fancyfoot[L]{__TITLE__ __SUBTITLE__, V. __VERSION__, __DATE__} - \renewcommand{\headrulewidth}{0.0pt} %obere Linie ausblenden - \fancyfoot[R]{\thepage} -} diff --git a/tmpl/tex/de_technical/index_head.html.tmpl b/tmpl/tex/de_technical/index_head.html.tmpl deleted file mode 100644 index 8ac66da7..00000000 --- a/tmpl/tex/de_technical/index_head.html.tmpl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - __TITLE__ - - - - - - - - - -
-
- -
- -
- -
- -

__TITLE__

-

__SUBTITLE__

-

__DATE__

-

Version: __VERSION__

-  -  -

__AUTHORS__

-  -
-
- -
-

- -

Achtung!

- -Diese Website wurde automatisch mit Hilfe des Skripts -latex2html erstellt. -Obwohl es ein sehr nützliches Programm ist, ist bei seiner Anwendung ein Teil des ursprüichen Dokuments verloren gegangen. -Wenn Sie das ganze Dokument fehlerfrei einsehen wollen, dann benutzen Sie bitte eine der unten zum Download angebotenen Versionen. -

- -

diff --git a/tmpl/tex/de_technical/index_tail.html.tmpl b/tmpl/tex/de_technical/index_tail.html.tmpl deleted file mode 100644 index 5c8e0703..00000000 --- a/tmpl/tex/de_technical/index_tail.html.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -

-

-
-
-  -  -contents -
- - diff --git a/tmpl/tex/en_technical/Makefile b/tmpl/tex/en_technical/Makefile deleted file mode 100644 index 5fc1d264..00000000 --- a/tmpl/tex/en_technical/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# (c) 2001 jannet it services -# contact@jannet.de -# $Id$ - -TOPDIR = ../../.. - -include $(TOPDIR)/make/proj.mk -include $(JWBDIR)/make/text.mk diff --git a/tmpl/tex/en_technical/frontpage.ger.tmpl b/tmpl/tex/en_technical/frontpage.ger.tmpl deleted file mode 100644 index 2c5adde7..00000000 --- a/tmpl/tex/en_technical/frontpage.ger.tmpl +++ /dev/null @@ -1,78 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex frontpage for technical documents % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\thispagestyle{empty} - -\begin{figure}[t] -\begin{flushright} -%\begin{minipage}[t]{8cm} -%\includegraphics[width=6cm,height=3cm]{__FRONTLOGO_EPS__} -\includegraphics{__FRONTLOGO_EPS__} -%%\end{minipage} -\end{flushright} -\end{figure} - -\begin{center} -\fbox{ -\parbox[t]{15cm} -{ -\vspace{0.3cm} - -\centerline{\Huge \bf __TITLE__} - -\vspace{0.3cm} - -\centerline{\Huge \bf __SUBTITLE__} - -\vspace{0.3cm} - -}} - -\vspace{3cm} - -\centerline{\Large __DATE__} - -\vspace{0.3cm} - -\centerline{\Large Document Version: __VERSION__} - -\vspace{0.3cm} - -\end{center} - -\begin{figure}[b] -\begin{flushright} -\begin{minipage}[b]{8cm} -\begin{flushright} -{\Large __AUTHORS__} -\end{flushright} -\end{minipage} -\end{flushright} -\end{figure} diff --git a/tmpl/tex/en_technical/frontpage.tex.tmpl b/tmpl/tex/en_technical/frontpage.tex.tmpl deleted file mode 100644 index b3c545bd..00000000 --- a/tmpl/tex/en_technical/frontpage.tex.tmpl +++ /dev/null @@ -1,89 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex frontpage for technical documents % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\thispagestyle{empty} - -\begin{figure}[t] -\begin{flushright} -%\begin{minipage}[t]{8cm} -%\includegraphics[width=6cm,height=3cm]{__FRONTLOGO_EPS__} -\includegraphics{__FRONTLOGO_EPS__} -%%\end{minipage} -\end{flushright} -\end{figure} - -\begin{center} -\fbox{ -\parbox[t]{15cm} -{ -\vspace{0.3cm} - -\centerline{\Huge \bf __TITLE__} - -\vspace{0.3cm} - -\centerline{\Huge \bf __SUBTITLE__} - -\vspace{0.3cm} - -}} - -\vspace{3cm} - -\centerline{\Huge \bf __CONFIDENTIAL_REMARK__} - -\vspace{3cm} - -\centerline{\Large __DATE__} - -\vspace{0.3cm} - -\centerline{\Large Document Version: __VERSION__} - -\vspace{0.3cm} - -\end{center} - -\begin{figure}[b] -\begin{flushright} -\begin{minipage}[b]{12cm} -\begin{flushright} -{\Large __AUTHORS__} -\end{flushright} -\end{minipage} -\end{flushright} -\end{figure} - -%\pagestyle{fancy} - -%\fancypagestyle{plain} -%\fancyfoot{} -%\fancyfoot[C]{{\bf \Large __CONFIDENTIAL_REMARK__}\\ \thepage} -%\fancyfoot[LE]{bla} diff --git a/tmpl/tex/en_technical/header.ger.tmpl b/tmpl/tex/en_technical/header.ger.tmpl deleted file mode 100644 index 45de46d7..00000000 --- a/tmpl/tex/en_technical/header.ger.tmpl +++ /dev/null @@ -1,127 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex style definition % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\documentclass[a4paper,12pt,oneside] {__DOCUMENT_CLASS__} -\setcounter{secnumdepth}{3} -\setcounter{tocdepth}{3} -%\usepackage{amsmath} -\usepackage{amsfonts} -\usepackage{graphics} -\usepackage{graphicx} -\usepackage{verbatim} -%\usepackage{lgrind} -%\usepackage[german]{babel} -\usepackage[footnotesize]{caption} -%\usepackage{portland} -%---------------------- File "./base/proc.sty": -%---------------------- File "./misc/blkarray.sty": -%---------------------- File "./misc/doublespace.sty": -%---------------------- File "./misc/euler.sty": -%---------------------- File "./misc/fnpara.sty": -%---------------------- File "./misc/gletter.sty": -%---------------------- File "./misc/setspace.sty": -%---------------------- File "./misc/gb4e.sty": -%---------------------- File "./misc/acmconf.sty": -%---------------------- File "./misc/articleJFPLC.sty": -%---------------------- File "./misc/seg.sty": -%---------------------- File "./tools/ftnright.sty": -% \usepackage{fnpara} % macht einen einzigen Block draus! -%\usepackage{proc} % Warnung Klasse - File -%\usepackage{blkarray} % -%\usepackage{doublespace} -%\usepackage{euler} -%\usepackage{gletter} -\usepackage{fnpara} -\usepackage[right]{eurosym} -\usepackage{import} - -%\usepackage{acmconf} -%\usepackage{articleJFPLC} -%\usepackage{gb4e} -%\usepackage{seg} - -\usepackage{lscape} -\usepackage{listings} -\lstloadlanguages{C++} -%\usepackage{epsfig} -%\usepackage[umlaute] - -\textwidth 15cm -\textheight 23.5cm -\topmargin -0.4cm -\oddsidemargin 0.5cm -\evensidemargin 0.5cm -% \renewcommand{\baselinestretch}{1.5} - -\newcommand{\C}{\mathbb{C}} -\newcommand{\R}{\mathbb{R}} -\newcommand{\N}{\mathbb{N}} -\newcommand{\Z}{\mathbb{Z}} -\newcommand{\Fourier}{\mathcal{F}} -\newcommand{\cont}{\mathcal{C}} -\newcommand{\eqv}{\Longleftrightarrow} -\newcommand{\grad}{\bigtriangledown} -\newcommand{\yields}{\Longrightarrow} -\newcommand{\Linf}{\cal{L}^\infty} -\newcommand{\degr}{$^\circ $} -\newcommand{\ra}{$\rightarrow$\quad} -\newcommand{\la}{$\leftarrow$\quad} -\newcommand{\pr}{\texttt} -\newcommand{\bs}{$\backslash$} -\newcommand{\pa}{\noindent \paragraph} -\newcommand{\bv}{\begin{quote}\begin{ttfamily}} -\newcommand{\ev}{\end{ttfamily}\end{quote}} - -\sloppy - -% Groessen, die in der Diplomarbeit automatisch gesetzt werden -% statistische Auswertung der Klassifikation -\newcommand {\Pclass}{} -\newcommand {\pclass}{} -\newcommand {\wrong}{} -\newcommand {\DKdurch}{} -\newcommand {\DKmin}{} -% Parameter eines Orientierungsdetektors - -\newcommand {\sigy}{} -\newcommand {\sigx}{} -\newcommand {\xnull}{} - -% \DeclareMathSymbol{\C}{\mathalpha}{\AMSb}{``43} -% \DeclareMathSymbol{\R}{\mathalpha}{\AMSb}{``52} - - -\renewcommand\floatpagefraction{.9} -\renewcommand\topfraction{.9} -\renewcommand\bottomfraction{.9} -\renewcommand\textfraction{.1} - -\newenvironment{prog}{\begin{quote}}{\end{quote} } diff --git a/tmpl/tex/en_technical/header.tex.tmpl b/tmpl/tex/en_technical/header.tex.tmpl deleted file mode 100644 index 87a8155a..00000000 --- a/tmpl/tex/en_technical/header.tex.tmpl +++ /dev/null @@ -1,141 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% tex style definition % -% (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. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\documentclass[a4paper,12pt,oneside] {__DOCUMENT_CLASS__} -\setcounter{secnumdepth}{3} -\setcounter{tocdepth}{3} - -\usepackage{array} -%\usepackage{amsmath} -\usepackage{longtable} -\usepackage{lscape} -\usepackage{amsfonts} -\usepackage{graphics} -\usepackage{graphicx} -\usepackage{verbatim} -\usepackage{fancyhdr} -%\usepackage{lgrind} -%\usepackage[german]{babel} -\usepackage[footnotesize]{caption} -%\usepackage{portland} -\usepackage{float} -\usepackage{cite} -%---------------------- File "./base/proc.sty": -%---------------------- File "./misc/blkarray.sty": -%---------------------- File "./misc/doublespace.sty": -%---------------------- File "./misc/euler.sty": -%---------------------- File "./misc/fnpara.sty": -%---------------------- File "./misc/gletter.sty": -%---------------------- File "./misc/setspace.sty": -%---------------------- File "./misc/gb4e.sty": -%---------------------- File "./misc/acmconf.sty": -%---------------------- File "./misc/articleJFPLC.sty": -%---------------------- File "./misc/seg.sty": -%---------------------- File "./tools/ftnright.sty": -% \usepackage{fnpara} % macht einen einzigen Block draus! -%\usepackage{proc} % Warnung Klasse - File -%\usepackage{blkarray} % -%\usepackage{doublespace} -%\usepackage{euler} -%\usepackage{gletter} -\usepackage{fnpara} - -%\usepackage{acmconf} -%\usepackage{articleJFPLC} -%\usepackage{gb4e} -%\usepackage{seg} - -\usepackage{listings} -\lstloadlanguages{C++} -%\usepackage{epsfig} -%\usepackage[umlaute] - -\textwidth 15cm -\textheight 23.5cm -\topmargin -0.4cm -\oddsidemargin 0.5cm -\evensidemargin 0.5cm -% \renewcommand{\baselinestretch}{1.5} - -\usepackage[pdftex,breaklinks,colorlinks,backref,pagebackref,linkcolor=blue,citecolor=blue, urlcolor=blue]{hyperref} -\usepackage[right]{eurosym} -\usepackage{import} - - -\newcommand{\C}{\mathbb{C}} -\newcommand{\R}{\mathbb{R}} -\newcommand{\N}{\mathbb{N}} -\newcommand{\Z}{\mathbb{Z}} -\newcommand{\Fourier}{\mathcal{F}} -\newcommand{\cont}{\mathcal{C}} -\newcommand{\eqv}{\Longleftrightarrow} -\newcommand{\grad}{\bigtriangledown} -\newcommand{\yields}{\Longrightarrow} -\newcommand{\Linf}{\cal{L}^\infty} -\newcommand{\degr}{$^\circ $} -\newcommand{\ra}{$\rightarrow$\quad} -\newcommand{\la}{$\leftarrow$\quad} -\newcommand{\pr}{\texttt} -\newcommand{\bs}{$\backslash$} -\newcommand{\pa}{\noindent \paragraph} -\newcommand{\bv}{\begin{quote}\begin{ttfamily}} -\newcommand{\ev}{\end{ttfamily}\end{quote}} - -\sloppy - -% Groessen, die in der Diplomarbeit automatisch gesetzt werden -% statistische Auswertung der Klassifikation -\newcommand {\Pclass}{} -\newcommand {\pclass}{} -\newcommand {\wrong}{} -\newcommand {\DKdurch}{} -\newcommand {\DKmin}{} -% Parameter eines Orientierungsdetektors - -\newcommand {\sigy}{} -\newcommand {\sigx}{} -\newcommand {\xnull}{} -\newcommand {\dspider}{{\bf Dspider}\textsuperscript{\textregistered}\,} - -% \DeclareMathSymbol{\C}{\mathalpha}{\AMSb}{``43} -% \DeclareMathSymbol{\R}{\mathalpha}{\AMSb}{``52} - - -\newcolumntype{v}[1]{% ->{\raggedright\hspace{0pt}\arraybackslash}p{#1}% -} - -\renewcommand\floatpagefraction{.9} -\renewcommand\topfraction{.9} -\renewcommand\bottomfraction{.9} -\renewcommand\textfraction{.1} - -\newenvironment{prog}{\begin{quote}}{\end{quote} } diff --git a/tmpl/tex/en_technical/index_head.html.tmpl b/tmpl/tex/en_technical/index_head.html.tmpl deleted file mode 100644 index e629b9c7..00000000 --- a/tmpl/tex/en_technical/index_head.html.tmpl +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - __TITLE__ - - - - - - - - - -
-
- -
- -
- -
- -

__TITLE__

-

__SUBTITLE__

-

__DATE__

-

Version: __VERSION__

-  -  -

__AUTHORS__

-  -
-
- -
-

- -

Warning

- -This site has been automatically generated with the script latex2html. -Although it is a very useful program, some of the contents of the document was -lost during the conversion. If you want to be shure to get the whole document, -stick with one of the versions listed for download below.

- -

diff --git a/tmpl/tex/en_technical/index_tail.html.tmpl b/tmpl/tex/en_technical/index_tail.html.tmpl deleted file mode 100644 index 5c8e0703..00000000 --- a/tmpl/tex/en_technical/index_tail.html.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -

-

-
-
-  -  -contents -
- - diff --git a/tmpl/tex/technical/Makefile b/tmpl/tex/technical/Makefile deleted file mode 100644 index 7a749e5b..00000000 --- a/tmpl/tex/technical/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: -clean install distclean profclean: