summaryrefslogtreecommitdiff
path: root/Makefile (follow)
Commit message (Collapse)AuthorAge
* Rework Makefile to support cross compilation.Helmut Grohne2025-09-20
| | | | | | | | Build lopsubgen twice during cross compilation since it is both run and installed. This will enable cross building liblopsub on other distributions such as Yocto or PtxDist. Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>
* build: Never remove any intermediate files.Andre Noll2025-09-20
| | | | | Defining .SECONDARY instructs make(1) to never drop the files generated by lex. This avoids spurious rebuilds, speeding up the build.
* build: Honor LDFLAGSAndre Noll2024-05-10
| | | | | | It's good practice to include CPPFLAGS, CFLAGS and LDFLAGS in the rules which invoke the linker. We already do this for the former two, so do the same with LDFLAGS as well.
* Add target to create a static library.Andre Noll2024-02-25
| | | | | | | It's sometimes handy to create a static version of the library, although this is generally frowned upon. No standard target depends on the new liblopsub.a target, so the static library is not build by default. One has to explicitly run "make liblopsub.a" to build it.
* Makefile: Include Makefile.local if it exists.Andre Noll2023-11-07
| | | | This provides a way to support local recipes.
* Makefile: Add -ffile-prefix-map to CC to avoid embedding build paths.Vagrant Cascadian2023-06-27
| | | | Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>
* build: Error out on implicit function declarations.Andre Noll2021-04-28
| | | | | | | | | | Replacing lopsub.h by an empty file builds a buggy lopsubgen-stage1 executable which segfaults due to a format string mismatch caused by the implicit declaration of lls_version(). In this package all functions are supposed to be declared, so let's fail the build if any undeclared functions are found. Tested-by: Alex Gietz <oss@mcdinner.de>
* build: Improve handling of compiler options.Andre Noll2021-04-28
| | | | | | | Introduce LLS_CFLAGS and STRICT_CFLAGS to avoid duplicating the flags in the various cc recipes. We don't touch CFLAGS or CPPFLAGS in the Makefile but include it the cc commands to let the user override our settings.
* build: Activate .DELETE_ON_ERROR.Andre Noll2021-04-28
| | | | | | | | | | | Since m4 lacks the -o option to specify an output file, we redirect stdout in several recipes, in particular in the recipe that creates lopsub.h from lopsub.h.m4. If the m4 command fails, lopsub.h will be incomplete or empty, yet it will be considered as up-to-date by make(1). This patch teaches make(1) to remove such incomplete output files on errors.
* build: Bail out early if m4 or lex don't exist.Andre Noll2021-04-28
| | | | | | | | | | | This gives a decent error message on the attempt to run make(1) on a system where one or both of these essential programs are not installed. A previous version of the patch used .SHELLSTATUS instead of the dummy variable, but this did not work with make-4.1 which ships with Ubuntu-18.04. Suggested-by: Alex Gietz <oss@mcdinner.de>
* build: Remove duplicate -g in cc command.Andre Noll2021-04-26
| | | | Specifying -g more than once has no effect.
* build: Avoid "html" rule with empty recipe.Andre Noll2020-07-07
| | | | | This was over-engineered, and only one of the three rules which create .html files depends on both the header and the footer.
* Fix build target www.Andre Noll2020-07-07
| | | | | | | | This target is supposed to create the html files of the home page. This broke one year ago when the build system was instructed to create compressed man pages. Fortunately, the fix is trivial. Fixes: f35b70fc3e8656f71437cc85062da31488acd781
* Make the build reproducible.Chris Lamb2019-12-02
| | | | | | | | | | | Whilst working on the Reproducible Builds effort [0] we noticed that liblopsub could not be built reproducibly. This is because it calls "gzip" manually without the -n flag. This should have been reported by lintian via the package-contains-timestamped-gzip tag. [0] https://reproducible-builds.org/
* Makefile: Get rid of superfluous '+' character in date.Andre Noll2019-07-13
| | | | | | | | Commit bb3a974325f (Don't embed compile-time timestamps into generated files) from a couple of weeks ago introduced a leading '+' in case SOURCE_DATE_EPOCH is not set because DATE_FMT already contains the '+' character for the argument to date(1), The superfluous '+' becomes part of the generated man pages, which looks a bit weird.
* Don't embed compile-time timestamps into generated files.Chris Lamb2019-06-05
| | | | | | | | | | Currently the build is not reproducible because make(1) runs date(1) to provide the month and the year for the man page. Fix this by honouring SOURCE_DATE_EPOCH as described in https://reproducible-builds.org/specs/source-date-epoch/ Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>
* Create a dynamic library.Andre Noll2019-04-22
| | | | | | | | | | | | | | | | | | As pointed out by Adam Borowski, static linking makes updates tedious. This patch switches the package over to create a dynamic library instead. We have to specify -fPIC for compiling and --shared for linking. The shared object is called liblopsub.so.X.Y.Z, where X, Y, and Z are the digits of the version string as created from the git revision by the version-gen.sh script. The soname for the linker to put into each executable which is linked against lopsub is liblopsub.so.$X. The install target is modified to install liblopsub.so.X.Y.Z instead of liblopsub.a, and it also creates the usual symbolic links for shared libraries. It does not run ldconfig, though. Requested-by: Adam Borowski <kilobyte@angband.pl>
* build: Honor the Filesystem Hierarchy Standard.v1.0.2Andre Noll2019-03-14
| | | | | According to this standard, man pages should go to /usr/share/man rather than to /usr/man.
* build: Compress man pages.Andre Noll2019-03-14
| | | | | | | | Man pages should always be installed in compressed form, so run gzip on all four man pages. We always specify -f so that gzip won't ask questions, and use the highest compression level because the pages are compressed only once and decompressed every time the man page is opened.
* build: .a files do not need to be executable.Andre Noll2019-03-14
| | | | | We currently install liblopsub.a with mode 755, but the executable bit is not needed. In fact, lintian complains about this.
* build: Support DESTDIR.Andre Noll2019-03-14
| | | | | It's strongly recommended to support this feature because it eases packaging. And it's easy to implement.
* build: Provide target distclean.Andre Noll2019-03-14
| | | | | | | | | | All software packages should at least provide the "clean" and "distclean" targets. So far we only supported the former, which removed all generated files. This commit adds the distclean target and modifies the clean target to only remove files generated by the compiler, but not the files that were generated by lopsubgen.
* build: Activate ONESHELL.Andre Noll2019-03-14
| | | | | | This instructs "make" to pass all the lines in the recipe to a single invocation of the shell, which is generally a good idea since it speeds up the build a bit.
* The long option parser for subcommands (lopsub).v1.0.0Andre Noll2016-10-23
This library was under development for over a year and is now ready for prime time. The code is believed to be mature and no bugs are known at this time. The API is fully documented and stable, and no new features are planned. Future fixes and enhancements will take backwards compatibility into account. The code used to be part of the paraslash package, but has been moved to its own repository. All prior commits have been discarded, so this repository contains only the final result as a single commit. The input files for the lopsubgen utility and the config file parser are based on flex. The API documentation is created with gendoc.m4, a simple m4 file which is part of this repository. Documentation includes the three man pages lopsub.7, lopsubgen.1 and lopsub.suite.5 which describe different aspects of the library. There is also an example application called lopsubex which illustrates various features of the library.