Commit graph

25 commits

Author SHA1 Message Date
CismonX
1d00501355
build: refactor EX_FEAT() helper macro
- Rename local m4 definitions with `ex_` prefix.
- Rename AC_DEFINE() definitions with `ENABLE_` prefix.
- Remove flag `N`, use `Y` only.
2025-07-18 17:20:12 +08:00
CismonX
602519db12
build: misc refactor
EX_DEP():
- Do not generate feature check code if `feat-names` is empty.
- Improve docs.

others:
- Reuse `$host_os` for system type check result.
2025-07-12 12:53:16 +08:00
CismonX
296b85cbe9
build: refactor feature variable exporting
- Remove EX_AMCOND() and EX_FEAT_EXPORT(), instead add flags to
  EX_FEAT() to check whether a feature should be exported.
- Only mark a feature to be exported with AM_CONDITIONAL() when
  it is checked within either */Makefile.am or tests/atlocal.in.
- Only add a feature to test/atlocal.in when it is checked by
  ATX_FEAT_*().
- Move feature "bookmarkfs-util" after features that may enable it,
  so that its enable status can be correctly displayed.
2025-07-12 12:52:28 +08:00
CismonX
328095ae43
build: install man pages by default
Since we're already installing man pages conditionally
(only install a man page when the corresponding program is enabled),
it makes more sense to install them by default,
instead of having to install separately with `make install-man`.
2025-07-09 21:02:22 +08:00
CismonX
f9940400bb
chore: bump version to 0.1.3 2025-07-01 13:37:05 +08:00
CismonX
65d29fd017
build: inline libxxhash by default 2025-06-29 12:19:11 +08:00
CismonX
dad1984d7f
build: move bookmarkfs_util.pc.in to ./src
Whatever pkg-config is interested in all lies within ./src.
2025-06-18 16:13:07 +08:00
CismonX
9de097d9ee
build: refactor configuration scripts
- Move common `AC_DEFINE()` usage to `EX_FEAT()`.
- Remove unused argument `action-if-disabled` for `EX_FEAT()`.
- Conditionally enable features by default.
2025-06-17 13:41:17 +08:00
CismonX
6fc165ff65
all: properly handle time_t on 32-bit platforms
Do not force 64-bit `time_t` on 32-bit platforms, since libfuse
does not do so.  Linking shared objects with incompatible types
breaks ABI, resulting in undefined behavior.

Instead, add run-time checks to make sure that timestamps do not
overflow.  If they do, set to `INT32_MAX`.

Also tidy up build scripts, tests, and the installation guide.
2025-06-14 11:43:03 +08:00
CismonX
f1451d206e
chore: bump version to 0.1.2 2025-06-12 11:31:39 +08:00
CismonX
565063ee9b
chore: bump version to 0.1.1 2025-04-07 12:23:50 +08:00
CismonX
81db7a786c
build: rename bookmarkfs.pc -> bookmarkfs_util.pc
Also update configure_ext.m4 to support EX_DEP() with underscores
in package name.
2025-04-01 12:49:21 +08:00
CismonX
a2dda5ec84
build: hard fail on unsupported platforms
Attempting to build on an unsupported platform should trigger
an error instead of a warning.
2025-03-21 09:06:30 +08:00
CismonX
f6e3b743d1
build: rename autoconf helper macros
These macros are supposed to be reusable for other projects.
Also, a shorter name improves the readability of the config script.
2025-03-14 07:44:51 +08:00
CismonX
9fab17734c
chore: misc cleanup 2025-03-07 14:35:45 +08:00
CismonX
b585a05c91
chore: remove null pointer representation check
That part of code in configure.ac look stupid, remove it.

If we _do_ try to run BookmarkFS on such an exotic platform with
non-zero null pointers, the breakage should be detected by the tests
(if it can run or even build at all).
2025-03-05 16:43:00 +08:00
CismonX
5affe9ee02
test: misc updates
- Export feature variables for conditional testing.
- Add helper macros.
- Move helper shell functions from atlocal.in to testsuite.at.
  The atlocal file should only contain feature variables.
- Update existing tests.
2025-02-20 11:11:10 +08:00
CismonX
31067eff42
build: misc update 2025-02-11 18:28:30 +08:00
CismonX
08f0655721
test: init tests; add tests for util lib
- Init Autotest.
  Not using DejaGNU since there won't be many interactive testing.
- Add basic test cases for the utility library (hash and prng).
2025-02-08 01:48:07 +08:00
CismonX
d99ef6d681
chore: update links
- Specify the full homepage URL.
- Follow GNU's naming convention for mailing lists.
2025-02-05 18:11:37 +08:00
CismonX
031691fae5
build: move BUILDING_BOOKMARKFS to config.h 2025-02-02 18:51:48 +08:00
CismonX
54c81c43bb
all: fix __FILE_NAME__ workaround
Do not apply offset for __FILE__ in non-VPATH build,
since the path is not prefixed with `${srcdir}/` in that case.
2025-02-02 17:48:42 +08:00
CismonX
c17d6ebadf
all: better workaround for __FILE_NAME__
There's only a few legacy releases of gcc and clang that
support -fmacro-prefix-map but not __FILE_NAME__.
Thus the originial workaround is not very beneficial.

Switching to a more portable `__FILE__ + offset` workaround
that works for any standard-compliant compiler, even TinyCC.

However, this workaround may produce binaries that leak
information about the build environment, especially when using
an exotic build path.
2025-02-01 23:25:19 +08:00
CismonX
34d66374cd
chore: minor wording corrections in configure.ac 2025-01-02 16:42:31 +08:00
CismonX
cdf0ddfc53
init: prepare for Savannah 2024-12-31 18:09:03 +08:00