[Nickle] nickle: Branch 'master' - 3 commits
Keith Packard
keithp at keithp.com
Fri Oct 10 11:20:21 PDT 2025
Makefile.am | 140 ------------------------------
README.release | 5 -
acinclude.m4 | 38 --------
autogen.sh | 11 --
bench/Makefile.am | 23 ----
build-rpm | 35 ++++---
configure.ac | 204 --------------------------------------------
doc/Makefile.am | 1
doc/tutorial/Makefile.am | 42 ---------
examples/Makefile.am | 30 ------
examples/smlng/Makefile.am | 23 ----
examples/turtle/Makefile.am | 23 ----
meson.build | 7 +
nickle.spec.in | 28 ++----
test/Makefile.am | 43 ---------
15 files changed, 45 insertions(+), 608 deletions(-)
New commits:
commit b670a66f56298575aacf318e5eebeaa45af453e1
Author: Keith Packard <keithp at keithp.com>
Date: Fri Oct 10 10:15:42 2025 -0700
Remove autotools stuff
This is now stale and will only confuse people
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index ba28ec9..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,140 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-## Copyright © 1988-2005 Keith Packard and Bart Massey.
-## All Rights Reserved. See the file COPYING in this directory
-## for licensing information.
-
-AUTOMAKE_OPTIONS = foreign
-SUBDIRS = bench test examples doc
-
-RELEASE_DATE := @RELEASE_DATE@
-
-NICKLEFILES = builtin.5c math.5c scanf.5c mutex.5c \
- arc4.5c prng.5c command.5c abort.5c \
- printf.5c history.5c ctype.5c string.5c socket.5c \
- file.5c parse-args.5c svg.5c process.5c \
- prime_sieve.5c factorial.5c gamma.5c sort.5c list.5c skiplist.5c \
- json.5c cha-cha.5c
-
-EXTRA_DIST = README.name README.release autogen.sh ChangeLog \
- $(NICKLEFILES) nickle.1.in nickle.spec.in
-
-MAINTAINERCLEANFILES=ChangeLog
-
-.PHONY: ChangeLog
-
-ChangeLog:
- (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || \
- (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
-
-dist-hook: ChangeLog
-
-nickleincludedir=$(includedir)/nickle
-
-nickleinclude_HEADERS = \
- builtin.h nickle-config.h mem.h nickle.h ref.h value.h \
- builtin-namespaces.h gram.h memp.h opcode.h stack.h
-
-bin_PROGRAMS = nickle
-
-nickle_SOURCES = \
- alarm.c array.c atom.c box.c compile.c debug.c \
- divide.c edit.c error.c execute.c expr.c file.c float.c \
- foreign.c frame.c func.c gcd.c hash.c int.c integer.c io.c \
- main.c mem.c natural.c pretty.c profile.c rational.c ref.c \
- refer.c sched.c scope.c stack.c string.c struct.c \
- symbol.c sync.c type.c union.c util.c value.c \
- mem.h memp.h nickle.h opcode.h ref.h stack.h value.h \
- builtin-command.c builtin-debug.c builtin-environ.c \
- builtin-file.c builtin-math.c builtin-namespaces.h \
- builtin-semaphore.c builtin-sockets.c builtin-string.c \
- builtin-thread.c builtin-toplevel.c builtin-pid.c \
- builtin-date.c builtin.c builtin.h \
- builtin-foreign.c gram.y lex.l
-
-pkgdata_DATA = $(NICKLEFILES) COPYING
-
-man_MANS = nickle.1
-
-AM_YFLAGS = -d
-
-AM_CPPFLAGS = \
- -DBUILD=\""$(RELEASE_DATE)"\" \
- -DBUILD_VERSION=\""$(VERSION)"\" \
- -DLOCAL_BUILD \
- -DNICKLELIBDIR=\"@nicklelibdir@\"
-
-AM_CFLAGS = \
- -D_FORTIFY_SOURCE=2 \
- -Wall -Wpointer-arith -Wstrict-prototypes \
- -Wmissing-prototypes -Wmissing-declarations \
- -Wnested-externs -fno-strict-aliasing -fwrapv
-
-AM_LDFLAGS = $(NICKLE_LDFLAGS)
-
-USES_GRAM_H = \
- array.o \
- compile.o \
- error.o \
- expr.o \
- file.o \
- lex.o \
- main.o \
- pretty.o \
- type.o
-
-$(USES_GRAM_H): gram.h
-
-builtin.o main.o: Makefile
-
-TARFILE=$(PACKAGE)-$(VERSION).tar.gz
-SIGFILE=$(PACKAGE)-$(VERSION).tar.gz.asc
-DEBFILE=$(PACKAGE)_$(VERSION)_amd64.deb
-SRPMFILE=$(RPMDIR)/SRPMS/$(PACKAGE)-$(VERSION)-1.src.rpm
-RPMFILE=$(RPMDIR)/RPMS/$(PACKAGE)-$(VERSION)-1.x86_64.rpm
-RELEASE_FILES = $(TARFILE) $(SIGFILE) $(SRPMFILE) $(RPMFILE)
-
-nickle.1: nickle.1.in nickle-config.h
- sed -e 's,@''VERSION@,$(VERSION),' \
- -e 's,@''BUILD_DATE@,$(BUILD_DATE),' \
- -e 's,@''pkgdatadir@,$(pkgdatadir),' $(top_srcdir)/nickle.1.in > $@
-
-nickle.spec: nickle.spec.in nickle-config.h
- sed -e 's,@''VERSION@,$(VERSION),' \
- -e 's,@''pkgdatadir@,$(pkgdatadir),' $(top_srcdir)/nickle.spec.in > $@
-
-clean-local:
- rm -f nickle.1 nickle.spec
-
-#
-# This assumes you've got Mike Harris's rpmbuild-nonroot stuff installed
-# using the defaults
-#
-RPMDIR=$(HOME)/rpmbuild
-
-rpm: $(RPMFILE) $(SRPMFILE)
-
-$(RPMFILE): $(TARFILE) nickle.spec
- mkdir -p $(RPMDIR)/$(PACKAGE)-$(VERSION)
- cp $(TARFILE) $(RPMDIR)/$(PACKAGE)-$(VERSION)
- rpmbuild -ba nickle.spec
-
-$(SRPMFILE): $(RPMFILE)
-
-$(TARFILE): dist-gzip $(DISTFILES)
- touch $(TARFILE)
- echo $(TARFILE) ready
-
-compile:
- echo 'no need to build compile'
-
-$(SIGFILE): $(TARFILE)
- rm -f $@
- gpg -a --detach-sign $(TARFILE)
-
-release-files: $(RELEASE_FILES)
-
-release: $(RELEASE_FILES)
- scp $(RELEASE_FILES) nickle.org:/var/www/nickle/release
-
-.PHONY: debuild debuild-signed debuild-unsigned debuild-dirs rpm force
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index f184959..0000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,38 +0,0 @@
-dnl Check for readline and get termcap lib as well
-AC_DEFUN([AC_LIB_READLINE],[
- doit=yes
- AC_ARG_WITH(readline,
- [ --with-readline=DIR GNU readline library in DIR],
- doit=$with_readline)
- case $doit in
- no)
- ;;
- *)
- readline_header="readline"
- readline_libdir=""
- case $doit in
- yes)
- ;;
- *)
- readline_libdir="-L$doit/lib -R$doit/lib"
- readline_incdir="-I$doit/include"
- ;;
- esac
- AC_CHECK_LIB(ncurses,tparm,TERMLIB=-lncurses,
- AC_CHECK_LIB(termcap,tgetent,TERMLIB=-ltermcap))
- saved_LIBS="$LIBS"
- LIBS="$LIBS $TERMLIB"
- saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $readline_libdir"
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $readline_incdir"
- AC_CHECK_LIB(readline,readline,
- [ AC_CHECK_HEADER(readline/readline.h,
- LIBS="$saved_LIBS -lreadline $TERMLIB"
- AC_DEFINE(HAVE_LIBREADLINE,1,
- [support fancy command line editing])) ],
- [ AC_MSG_RESULT([Cannot find readline. Build with --without-readline or set the readline path appropriately.])
- exit 1 ])
- ;;
- esac
-])
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index d658275..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-#
-# $Id$
-#
-# runs autotools to create ./configure and friends
-#
-# configure depends on version.m4, but autoreconf does not realize this
-dir=`dirname $0`
-rm $dir/configure
-(cd $dir && autoreconf -Wall -v --install) || exit 1
-$dir/configure "$@"
diff --git a/bench/Makefile.am b/bench/Makefile.am
deleted file mode 100644
index c95a61d..0000000
--- a/bench/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-CFILES=choose.c \
- composite.c \
- ifact.c \
- rfact.c
-BCFILES=choose.bc \
- composite.bc \
- ifact.bc \
- rfact.bc
-NICKLEFILES = choose.5c \
- composite.5c \
- ifact.5c \
- rfact.5c
-HARNESS=runbench.sh
-
-CLEANFILES=choose composite ifact rfact
-
-benchdir=$(pkgdatadir)/bench
-
-bench_DATA=$(CFILES) $(BCFILES) $(NICKLEFILES)
-
-bench_SCRIPTS=$(HARNESS)
-
-EXTRA_DIST=$(bench_DATA) $(bench_SCRIPTS)
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index c6ca95a..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,204 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-dnl Copyright © 1988-2004 Keith Packard and Bart Massey.
-dnl All Rights Reserved. See the file COPYING in this directory
-dnl for licensing information.
-
-AC_PREREQ([2.69])
-
-AC_INIT([nickle],[2.102],[http://nickle.org],[nickle])
-RELEASE_DATE="2024-12-24"
-AC_CONFIG_SRCDIR([nickle.h])
-AC_CONFIG_HEADERS([nickle-config.h])
-AC_CONFIG_AUX_DIR(.)
-
-AM_INIT_AUTOMAKE([foreign])
-
-AC_SUBST([RELEASE_DATE])
-dnl Checks for programs.
-AC_PROG_CC
-AX_PROG_CC_FOR_BUILD
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AM_PROG_LEX
-dnl AC_PROG_YACC
-AC_CHECK_PROGS([YACC], byacc yacc bison, yacc)
-case "$YACC" in
-*bison) YACC="$YACC -y" ;;
-esac
-AC_PATH_PROG(BC, bc, yes, no)
-if test "$BC" = "no"; then
- AC_MSG_ERROR([Missing bc])
-fi
-AC_PATH_PROG(FMT, fmt, yes, no)
-if test "$FMT" = "no"; then
- AC_MSG_ERROR([Missing fmt])
-fi
-AC_PATH_PROG(TR, tr, yes, no)
-if test "$TR" = "no"; then
- AC_MSG_ERROR([Missing tr])
-fi
-AC_PATH_PROG(EXPR, expr, yes, no)
-if test "$EXPR" = "no"; then
- AC_MSG_ERROR([Missing expr])
-fi
-
-dnl Checks for libraries.
-AC_CHECK_FUNC(log,,AC_CHECK_LIB(m, log))
-AC_CHECK_FUNC(gethostbyname,,AC_CHECK_LIB(nsl, gethostbyname))
-AC_CHECK_FUNC(socket,,AC_CHECK_LIB(socket, socket)
- AC_CHECK_LIB(resolv, hstrerror))
-AC_CHECK_LIB(dl, dlopen)
-
-dnl as-compiler-flag.m4 0.0.1
-dnl autostars m4 macro for detection of compiler flags
-dnl
-dnl ds at schleef.org
-
-AC_DEFUN([AS_COMPILER_FLAG],
-[
- AC_MSG_CHECKING([to see if compiler understands $1])
-
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $1"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[return 0])], [flag_ok=yes], [flag_ok=no])
- CFLAGS="$save_CFLAGS"
-
- if test "X$flag_ok" = Xyes; then
- $2
- true
- else
- $3
- true
- fi
- AC_MSG_RESULT([$flag_ok])
-])
-
-AS_COMPILER_FLAG([-Wl,-E], GCC_EXTERN="yes", GCC_EXTERN="no")
-NICKLE_LDFLAGS=""
-if test $GCC_EXTERN = yes; then
- NICKLE_LDFLAGS="-Wl,-E"
- AC_DEFINE([HAVE_EXTERN_SYMS], 1, [C compilers can extern program symbols])
-fi
-AC_SUBST(NICKLE_LDFLAGS)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h strings.h time.h sys/time.h unistd.h sys/resource.h)
-AC_CHECK_HEADERS(stropts.h)
-AC_CHECK_HEADERS(dlfcn.h)
-
-dnl Checks for precise integer types
-AC_CHECK_HEADERS(stdint.h)
-case "$ac_cv_header_stdint_h" in
- no)
- AC_CHECK_SIZEOF([unsigned long long], 0)
- AC_CHECK_SIZEOF([unsigned long], 0)
- AC_CHECK_SIZEOF([unsigned int], 0)
- AC_CHECK_SIZEOF([unsigned short], 0)
- ;;
- yes)
- AC_MSG_CHECKING([for uint64_t])
- AC_EGREP_HEADER([uint64_t], stdint.h,
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_UINT64_T], 1, [Has uint64_t datatype]),
- AC_MSG_RESULT(no))
- ;;
-esac
-
-dnl Checks for library functions.
-
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(unsetenv setenv putenv gettimeofday hstrerror select)
-AC_CHECK_FUNCS(sigaction sigrelse sigignore setrlimit getrlimit)
-AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose)
-AC_CHECK_FUNC(significand,,AC_CHECK_LIB(m, significand))
-AC_CHECK_MEMBER([struct tm.tm_zone],
- AC_DEFINE([HAVE_STRUCT_TM_TM_ZONE], 1, [Has tm_zone in struct tm]),,
- [[#include <time.h>]])
-AC_CHECK_MEMBER([struct tm.tm_gmtoff],
- AC_DEFINE([HAVE_STRUCT_TM_TM_GMTOFF], 1, [Has tm_gmtoff in struct tm]),,
- [[#include <time.h>]])
-
-case "$ac_cv_func_significand""$ac_cv_lib_m_significand" in
- *yes*)
- AC_DEFINE(HAVE_SIGNIFICAND,1,[Has significand function])
- ;;
-esac
-
-AC_PATH_PROGS([ASCIIDOCTORPDF],[asciidoctor-pdf])
-
-AM_CONDITIONAL(HASASCIIDOCTORPDF,test -n "$ASCIIDOCTORPDF")
-
-AC_FUNC_GETPGRP
-
-dnl Handle large files
-AC_SYS_LARGEFILE
-
-AC_ARG_WITH([libedit],
- AC_HELP_STRING([--with-libedit],
- [use libedit for command line editing]),
- [use_libedit=yes], [use_libedit=no])
-
-case "$use_libedit" in
- yes)
- PKG_CHECK_MODULES([LIBEDIT], [libedit])
- have_libreadline=yes
- LIBREADLINE_CFLAGS="${LIBEDIT_CFLAGS}"
- LIBREADLINE_LIBS="${LIBEDIT_LIBS}"
- READLINE_H="<readline.h>"
- ;;
- *)
- AC_LIB_READLINE
- echo "done checking for readline"
- if test "x$ac_cv_header_readline_readline_h" = xyes; then
- have_libreadline=yes
- READLINE_H="<readline/readline.h>"
- HISTORY_H="<readline/history.h>"
- fi
- ;;
-esac
-
-if test "x$have_libreadline" = "xyes"; then
-
- AC_DEFINE(HAVE_LIBREADLINE, 1, [Has readline library])
- AC_DEFINE_UNQUOTED(READLINE_H, ${READLINE_H}, [readline.h include path])
- if test "x$HISTORY_H" != "x"; then
- AC_DEFINE_UNQUOTED(HISTORY_H, ${HISTORY_H}, [history.h include path])
- fi
-
- CFLAGS="${LIBREADLINE_CFLAGS} ${CFLAGS}"
- LIBS="${LIBREADLINE_LIBS} ${LIBS}"
-
- AC_CHECK_DECL(rl_catch_signals,
- AC_DEFINE(HAVE_RL_CATCH_SIGNALS,1,[Has rl_catch_signals]),,[#include ${READLINE_H}])
- AC_CHECK_DECL(rl_reset_after_signal,
- AC_DEFINE(HAVE_RL_RESET_AFTER_SIGNAL,1,[Has rl_reset_after_signal]),,[#include ${READLINE_H}])
- AC_CHECK_DECL(rl_cleanup_after_signal,
- AC_DEFINE(HAVE_RL_CLEANUP_AFTER_SIGNAL,1,[Has rl_cleanup_after_signal]),,[#include ${READLINE_H}])
- AC_CHECK_DECL(rl_echo_signal_char,
- AC_DEFINE(HAVE_RL_ECHO_SIGNAL_CHAR,1,[Has rl_echo_signal_char]),,[#include ${READLINE_H}])
- AC_CHECK_DECL(rl_free_line_state,
- AC_DEFINE(HAVE_RL_FREE_LINE_STATE,1,[Has rl_free_line_state]),,[#include ${READLINE_H}])
-fi
-
-if test "x$prefix" = xNONE; then
- prefix="$ac_default_prefix"
-fi
-
-nicklelibdir=`eval echo ${datadir}`/nickle
-
-AC_SUBST(nicklelibdir)
-
-AC_CONFIG_FILES(
- Makefile
- test/Makefile
- bench/Makefile
- examples/Makefile
- examples/smlng/Makefile
- examples/turtle/Makefile
- doc/Makefile
- doc/tutorial/Makefile)
-
-AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index 8dd0b9f..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS=tutorial
\ No newline at end of file
diff --git a/doc/tutorial/Makefile.am b/doc/tutorial/Makefile.am
deleted file mode 100644
index f001888..0000000
--- a/doc/tutorial/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-ADOCFILES=nickle-tutorial.adoc
-PDFFILES=$(ADOCFILES:.adoc=.pdf)
-
-PDF_DATE=$(shell date -ud '$(RELEASE_DATE)')
-
-.adoc.pdf:
- asciidoctor-pdf -o $@ $<
-
-ADOCINC= \
- tour/tour.adoc \
- basics/invoke.adoc \
- basics/command.adoc \
- intro/variables.adoc \
- intro/expressions.adoc \
- intro/statements.adoc \
- intro/functions.adoc \
- builtins/io.adoc \
- builtins/math.adoc \
- builtins/strings.adoc \
- advanced/copying.adoc \
- advanced/namespaces.adoc \
- advanced/exceptions.adoc \
- advanced/concurrency.adoc \
- advanced/continuations.adoc
-
-IMAGES = nickle_obverse.jpg
-
-EXTRA_DIST=$(ADOCFILES) $(ADOCINC) $(IMAGES)
-
-if HASASCIIDOCTORPDF
-
-all-local: $(PDFFILES)
-
-clean-local:
- $(RM) -f $(PDFFILES)
-
-
-$(PDFFILES): $(ADOCINC)
-
-doc_DATA = $(PDFFILES)
-
-endif
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644
index c2b7d90..0000000
--- a/examples/Makefile.am
+++ /dev/null
@@ -1,30 +0,0 @@
-SUBDIRS=smlng turtle
-
-NICKLEFILES=\
- comb.5c \
- cribbage.5c \
- erat.5c \
- fourfours.5c \
- initializer.5c \
- is-prime.5c \
- kaiser.5c \
- menace2.5c \
- miller-rabin.5c \
- mutextest.5c \
- numbers.5c \
- polynomial.5c \
- prime.5c \
- qbrating.5c \
- randtest.5c \
- restart.5c \
- roman.5c \
- rsa-demo.5c \
- rsa.5c \
- skiplisttest.5c \
- sudoku.5c
-
-exampledir=$(pkgdatadir)/examples
-
-example_DATA=$(NICKLEFILES) COPYING
-
-EXTRA_DIST=$(NICKLEFILES) COPYING
diff --git a/examples/smlng/Makefile.am b/examples/smlng/Makefile.am
deleted file mode 100644
index 78a079d..0000000
--- a/examples/smlng/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# SGML-like parser
-#
-# Copyright © 2001 Keith Packard and Carl Worth
-# All Rights Reserved. See the file COPYING in this directory
-# for licensing information.
-#
-NICKLEFILES=\
- context.5c \
- generate.5c \
- parse.5c \
- test.5c
-
-exampledir=$(pkgdatadir)/examples/smlng
-
-example_DATA=$(NICKLEFILES) COPYING
-
-TESTS_ENVIRONMENT=NICKLESTART=$(top_srcdir)/builtin.5c NICKLEPATH=$(top_srcdir):$(top_srcdir)/$(subdir)
-LOG_COMPILER=$(top_builddir)/nickle < $(top_srcdir)/$(subdir)/data.sgml
-
-TESTS=test.5c
-
-EXTRA_DIST=$(NICKLEFILES) data.sgml COPYING
diff --git a/examples/turtle/Makefile.am b/examples/turtle/Makefile.am
deleted file mode 100644
index 0cbda02..0000000
--- a/examples/turtle/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Draw "snowflake" fractal
-#
-# Copyright © 2001 Bart Massey.
-# All Rights Reserved. See the file COPYING in this directory
-# for licensing information.
-
-NICKLEFILES=\
- snowflake.5c \
- turtle.5c
-
-exampledir=$(pkgdatadir)/examples/turtle
-
-example_DATA=$(NICKLEFILES) snowflake.tex COPYING
-
-EXTRA_DIST=$(example_DATA) COPYING
-
-TESTS_ENVIRONMENT=NICKLESTART=$(top_srcdir)/builtin.5c NICKLEPATH=$(top_srcdir):$(top_srcdir)/$(subdir)
-TESTS=snowflake.5c
-LOG_COMPILER=$(top_builddir)/nickle
-
-CLEANFILES=snowflake.eepic snowflake.aux snowflake.dvi snowflake.log
-
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644
index 94e9b76..0000000
--- a/test/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-check_SCRIPTS=\
- scanf.5c \
- gcdtest.5c \
- inttest.5c \
- optest.5c \
- orderofoptest.5c \
- rattest.5c \
- reftest.5c \
- arraytest.5c \
- modtest.5c \
- hashtest.5c \
- signal.5c \
- round.5c \
- fround.5c \
- math.5c \
- factorial.5c \
- is_type.5c \
- jsontest.5c \
- datetest.5c \
- string-file.5c \
- sorttest.5c \
- chacha_test.5c
-
-TABLES=math-tables.5c
-
-# Install test files so they can be run later
-
-testdir=$(pkgdatadir)/test
-
-test_DATA=$(check_SCRIPTS) $(TABLES)
-
-TESTS_ENVIRONMENT=NICKLESTART=$(top_srcdir)/builtin.5c NICKLEPATH=$(top_srcdir) MALLOC_CHECK_=3 MALLOC_PERTURB_=$(shell echo $$(($$RANDOM % 255 + 1)))
-TESTS=$(check_SCRIPTS)
-LOG_COMPILER=$(top_builddir)/nickle
-
-EXTRA_DIST=$(check_SCRIPTS) math-tables.sh math-funcs.bc
-
-math.5c: $(TABLES)
-
-$(TABLES): math-tables.sh math-funcs.bc
- $(srcdir)/math-tables.sh -o $(TABLES)
-
-CLEANFILES=$(TABLES)
commit 72208b6ad4a6f185b281242f1ce5c096aa7b51da
Author: Keith Packard <keithp at keithp.com>
Date: Fri Oct 10 11:14:54 2025 -0700
Update README.release to include RPM instructions
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/README.release b/README.release
index 1ac82b8..60699a4 100644
--- a/README.release
+++ b/README.release
@@ -12,7 +12,7 @@ important steps:
meson test -C build
4. Update debian/changelog
- git log --pretty=oneline 2.<xx>..master
+ git log --pretty=oneline 2.<xx-1>..master
5. Commit these changes
git-commit -m'Update to version 2.<xx>' -a
@@ -32,3 +32,6 @@ important steps:
10. Upload release
scp build/meson-dist/* nickle.org:/var/www/nickle/release
dput
+
+11. Build and upload RPM
+ ./build-rpm upload
commit edbaa03cf512957213355393c437b20158c3e8a9
Author: Keith Packard <keithp at keithp.com>
Date: Fri Oct 10 11:04:47 2025 -0700
Make build-rpm work with meson
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/build-rpm b/build-rpm
index 6548853..4695109 100755
--- a/build-rpm
+++ b/build-rpm
@@ -1,14 +1,25 @@
#!/bin/sh
-VERSION=`egrep BUILD_VERSION version.h | sed -e 's/^[^"]*"//' -e 's/".*$//'`
-echo "Building nickle $VERSION RPM..." >&2
+#
+# usage: build-rpm {upload}
+#
+BUILD_DIR=build-rpm-dir
+rm -rf "$BUILD_DIR"
+trap "rm -rf '$BUILD_DIR'" EXIT
+meson setup "$BUILD_DIR"
+ninja -C "$BUILD_DIR" dist
+SPEC_FILE=`echo "$BUILD_DIR"/nickle-*.spec`
+VERSION=`echo "$SPEC_FILE" | sed -e 's/^.*nickle-//' -e 's/.spec$//'`
RPMBUILD=$HOME/rpmbuild
-echo mkdir -p $RPMBUILD/nickle-$VERSION
-make nickle-$VERSION.tar.gz
-cp nickle-$VERSION.tar.gz $RPMBUILD/nickle-$VERSION
-cp nickle.spec nickle-$VERSION.spec
-ed nickle-$VERSION.spec << EOF
-/VERSION/s//$VERSION/
-w
-q
-EOF
-rpm -ba nickle-$VERSION.spec
+mkdir -p $RPMBUILD/SOURCES
+TAR=nickle-$VERSION.tar.xz
+cp "$BUILD_DIR"/meson-dist/"$TAR" "$RPMBUILD/SOURCES/$TAR"
+rpmbuild -ba "$SPEC_FILE"
+case "$1" in
+ upload)
+ scp \
+ "$RPMBUILD"/RPMS/*/nickle-"$VERSION"*.rpm \
+ "$RPMBUILD"/RPMS/*/nickle-debuginfo-"$VERSION"*.rpm \
+ "$RPMBUILD"/SRPMS/nickle-"$VERSION"-*.src.rpm \
+ nickle.org:/var/www/nickle/release
+ ;;
+esac
diff --git a/meson.build b/meson.build
index a43ffcf..e699e88 100644
--- a/meson.build
+++ b/meson.build
@@ -285,3 +285,10 @@ subdir('test')
subdir('examples')
subdir('bench')
subdir('doc')
+
+nickle_spec_file = 'nickle-' + meson.project_version() + '.spec'
+
+nickle_spec = configure_file(output: nickle_spec_file,
+ input: 'nickle.spec.in',
+ configuration: { 'VERSION': meson.project_version() },
+ install: false)
diff --git a/nickle.spec.in b/nickle.spec.in
index e33fe9e..c0b5ab7 100644
--- a/nickle.spec.in
+++ b/nickle.spec.in
@@ -6,7 +6,7 @@ Group: Development/Languages
License: MIT
URL: http://nickle.org
-Source: http://nickle.org/release/nickle-%{version}.tar.gz
+Source: http://nickle.org/release/nickle-%{version}.tar.xz
Buildroot: %{_tmppath}/%{name}-%{version}-root
%description
@@ -18,24 +18,25 @@ different, some design choices have been made differently, and a very few
features are simply missing.
%prep
+rm- rf build && mkdir build
%setup -q
+%conf
+CFLAGS="$RPM_OPT_FLAGS" meson setup build --prefix=/usr
+
%build
-export CFLAGS="$RPM_OPT_FLAGS"
-%configure
-make
+ninja -C build
+
+%check
+ninja -C build test
%install
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
-#mkdir -p $RPM_BUILD_ROOT%{prefix}
-%makeinstall
-#make prefix=$RPM_BUILD_ROOT%{prefix} install
-cp -R examples $RPM_BUILD_ROOT%{_datadir}/nickle/
+DESTDIR=%{buildroot} ninja -C build install
%files
%defattr(-,root,root)
-%doc README README.name COPYING AUTHORS INSTALL NEWS TODO doc/tutorial/nickle-tutorial.pdf
+%doc README README.name COPYING AUTHORS INSTALL NEWS TODO build/doc/tutorial/nickle-tutorial.pdf
%attr(755,root,root) %{_bindir}/nickle
%dir %{_datadir}/nickle
%{_mandir}/man1/nickle.1*
@@ -43,10 +44,3 @@ cp -R examples $RPM_BUILD_ROOT%{_datadir}/nickle/
%dir %{_includedir}/nickle
%{_includedir}/nickle/*
%exclude %{_datadir}/doc/nickle/*
-
-%clean
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
-
-%changelog
-* Thu Mar 1 2004 Mike A. Harris <mharris at www.linux.org.uk> 2.29-2
-- Initial rpm spec file
More information about the Nickle
mailing list