2018-07-22 12:24:36 +00:00
|
|
|
|
# GNU Mes --- Maxwell Equations of Software
|
2023-02-13 08:27:52 +00:00
|
|
|
|
# Copyright © 2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2018-07-21 22:43:39 +00:00
|
|
|
|
#
|
2018-07-22 12:24:36 +00:00
|
|
|
|
# This file is part of GNU Mes.
|
2018-07-21 22:43:39 +00:00
|
|
|
|
#
|
2018-07-22 12:24:36 +00:00
|
|
|
|
# GNU Mes is free software; you can redistribute it and/or modify it
|
2018-07-21 22:43:39 +00:00
|
|
|
|
# under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
|
# your option) any later version.
|
|
|
|
|
#
|
2018-07-22 12:24:36 +00:00
|
|
|
|
# GNU Mes is distributed in the hope that it will be useful, but
|
2018-07-21 22:43:39 +00:00
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY 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
|
2018-07-22 12:24:36 +00:00
|
|
|
|
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
2018-07-21 22:43:39 +00:00
|
|
|
|
|
2018-07-25 06:14:13 +00:00
|
|
|
|
SHELL=@BASH@
|
|
|
|
|
srcdest=@srcdest@
|
|
|
|
|
srcdir=@srcdir@
|
|
|
|
|
abs_top_srcdir=@abs_top_srcdir@
|
|
|
|
|
abs_top_builddir=@abs_top_builddir@
|
|
|
|
|
|
|
|
|
|
GUILE_FLAGS:=--no-auto-compile -L . -L module -C . -C module
|
|
|
|
|
|
|
|
|
|
cleaning-p:=$(filter clean%, $(MAKECMDGOALS))$(filter %clean, $(MAKECMDGOALS))
|
|
|
|
|
|
|
|
|
|
ifndef cleaning-p
|
|
|
|
|
include .config.make
|
2019-05-22 15:55:20 +00:00
|
|
|
|
ifneq ($(prefix),)
|
|
|
|
|
prefix-arg=--prefix=$(prefix)
|
|
|
|
|
endif
|
|
|
|
|
ifneq ($(build),)
|
|
|
|
|
build-arg=--build=$(build)
|
|
|
|
|
endif
|
|
|
|
|
ifneq ($(host),)
|
|
|
|
|
host-arg=--host=$(host)
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(mes_libc),system)
|
|
|
|
|
--with-system-libc=system
|
|
|
|
|
endif
|
2018-07-25 06:14:13 +00:00
|
|
|
|
.config.make:
|
2019-05-22 15:55:20 +00:00
|
|
|
|
${srcdir}/configure $(prefix_arg) $(host-arg) $(build-arg) $(with-system-libc)
|
2018-07-25 06:14:13 +00:00
|
|
|
|
endif
|
|
|
|
|
|
2018-07-23 18:03:57 +00:00
|
|
|
|
PHONY_TARGETS:=\
|
|
|
|
|
TAGS\
|
|
|
|
|
all-go\
|
|
|
|
|
all\
|
|
|
|
|
build\
|
|
|
|
|
check\
|
|
|
|
|
clean-go\
|
|
|
|
|
clean\
|
|
|
|
|
default\
|
|
|
|
|
dist\
|
|
|
|
|
distclean\
|
|
|
|
|
doc\
|
|
|
|
|
dvi\
|
|
|
|
|
gcc\
|
|
|
|
|
generate-ChangeLog\
|
|
|
|
|
help\
|
|
|
|
|
html\
|
|
|
|
|
info\
|
|
|
|
|
install-dvi\
|
|
|
|
|
install-html\
|
|
|
|
|
install-pdf\
|
|
|
|
|
install-ps\
|
|
|
|
|
install-strip\
|
|
|
|
|
install\
|
|
|
|
|
installcheck\
|
|
|
|
|
installdirs\
|
|
|
|
|
maintainer-clean\
|
|
|
|
|
man\
|
|
|
|
|
mes-gcc\
|
|
|
|
|
mes-tcc\
|
|
|
|
|
mes\
|
|
|
|
|
mostlyclean\
|
|
|
|
|
pdf\
|
|
|
|
|
ps\
|
2020-01-19 10:27:53 +00:00
|
|
|
|
sign-dist\
|
2018-07-23 18:03:57 +00:00
|
|
|
|
uninstall\
|
2018-07-28 09:37:47 +00:00
|
|
|
|
web\
|
2018-07-23 18:03:57 +00:00
|
|
|
|
#
|
|
|
|
|
|
2018-07-21 22:43:39 +00:00
|
|
|
|
.PHONY: $(PHONY_TARGETS)
|
|
|
|
|
|
2023-05-15 16:10:05 +00:00
|
|
|
|
X86_ARCH_HEADERS = $(wildcard $(srcdest)include/linux/x86/*.h)
|
lib: stat: Use SYS_stat64 for 32bit platforms.
This fixes <https://debbugs.gnu.org/41264>.
* include/linux/arm/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/linux/x86/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/sys/stat.h (struct stat): Move definition to...
* include/linux/arm/kernel-stat.h,
include/linux/m2/kernel-stat.h,
include/linux/x86/kernel-stat.h,
include/linux/x86_64/kernel-stat.h: These new files.
* include/gnu/x86/kernel-stat.h: New file.
* configure (main): Copy <srcdest>include/<kernel>/<arch>/*.h to
include/.
* configure.sh: Likewise.
* .gitignore: Ignore them. Add copyright header.
* build-aux/GNUmakefile.in (X86_ARCH_HEADERS, ARCH_HEADERS): New
variables.
(build): Use them.
(include/arch/%.h, arch-dir): New targets.
* build-aux/bootstrap.sh.in (AM_CPPFLAGS): Replace
<srcdest>include/<kernel>/<cpu> with built ../include.
* build-aux/build.sh.in (AM_CPPFLAGS): Likewise.
* build-aux/install.sh.in: Also install built include.
* include/m2/types.h: New file.
* kaem.run: Use it.
* simple.sh: Copy kernel-stat.h, syscall.h for kernel/cpu to
include/arch.
2022-10-29 11:17:58 +00:00
|
|
|
|
ARCH_HEADERS = $(X86_ARCH_HEADERS:$(srcdest)include/linux/x86/%=include/arch/%)
|
|
|
|
|
|
2018-07-21 22:43:39 +00:00
|
|
|
|
default: all
|
|
|
|
|
|
2018-08-09 09:00:10 +00:00
|
|
|
|
all: doc
|
|
|
|
|
|
|
|
|
|
doc: build
|
2018-07-23 18:03:57 +00:00
|
|
|
|
|
lib: stat: Use SYS_stat64 for 32bit platforms.
This fixes <https://debbugs.gnu.org/41264>.
* include/linux/arm/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/linux/x86/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/sys/stat.h (struct stat): Move definition to...
* include/linux/arm/kernel-stat.h,
include/linux/m2/kernel-stat.h,
include/linux/x86/kernel-stat.h,
include/linux/x86_64/kernel-stat.h: These new files.
* include/gnu/x86/kernel-stat.h: New file.
* configure (main): Copy <srcdest>include/<kernel>/<arch>/*.h to
include/.
* configure.sh: Likewise.
* .gitignore: Ignore them. Add copyright header.
* build-aux/GNUmakefile.in (X86_ARCH_HEADERS, ARCH_HEADERS): New
variables.
(build): Use them.
(include/arch/%.h, arch-dir): New targets.
* build-aux/bootstrap.sh.in (AM_CPPFLAGS): Replace
<srcdest>include/<kernel>/<cpu> with built ../include.
* build-aux/build.sh.in (AM_CPPFLAGS): Likewise.
* build-aux/install.sh.in: Also install built include.
* include/m2/types.h: New file.
* kaem.run: Use it.
* simple.sh: Copy kernel-stat.h, syscall.h for kernel/cpu to
include/arch.
2022-10-29 11:17:58 +00:00
|
|
|
|
build: | $(ARCH_HEADERS)
|
2019-06-25 19:40:43 +00:00
|
|
|
|
$(SHELL) build.sh
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
2018-11-06 19:29:35 +00:00
|
|
|
|
src/${program_prefix}mes: build
|
2018-08-10 09:15:43 +00:00
|
|
|
|
|
lib: stat: Use SYS_stat64 for 32bit platforms.
This fixes <https://debbugs.gnu.org/41264>.
* include/linux/arm/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/linux/x86/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/sys/stat.h (struct stat): Move definition to...
* include/linux/arm/kernel-stat.h,
include/linux/m2/kernel-stat.h,
include/linux/x86/kernel-stat.h,
include/linux/x86_64/kernel-stat.h: These new files.
* include/gnu/x86/kernel-stat.h: New file.
* configure (main): Copy <srcdest>include/<kernel>/<arch>/*.h to
include/.
* configure.sh: Likewise.
* .gitignore: Ignore them. Add copyright header.
* build-aux/GNUmakefile.in (X86_ARCH_HEADERS, ARCH_HEADERS): New
variables.
(build): Use them.
(include/arch/%.h, arch-dir): New targets.
* build-aux/bootstrap.sh.in (AM_CPPFLAGS): Replace
<srcdest>include/<kernel>/<cpu> with built ../include.
* build-aux/build.sh.in (AM_CPPFLAGS): Likewise.
* build-aux/install.sh.in: Also install built include.
* include/m2/types.h: New file.
* kaem.run: Use it.
* simple.sh: Copy kernel-stat.h, syscall.h for kernel/cpu to
include/arch.
2022-10-29 11:17:58 +00:00
|
|
|
|
include/arch/%.h: $(srcdest)include/$(mes_kernel)/$(mes_cpu)/%.h | arch-dir
|
|
|
|
|
cp -f $< $@
|
|
|
|
|
|
|
|
|
|
arch-dir:
|
|
|
|
|
mkdir -p include/arch
|
|
|
|
|
|
2018-07-23 18:03:57 +00:00
|
|
|
|
clean:
|
2019-11-03 21:15:11 +00:00
|
|
|
|
rm -f *.o *.s bin/mes bin/mes-gcc bin/mes-mescc
|
2019-12-04 17:49:39 +00:00
|
|
|
|
rm -f mes.{aux,cp,cps,fn,info,log,tmp,toc,vr,vrs}
|
|
|
|
|
rm -f .log build.log
|
|
|
|
|
rm -f 0exit-42 0hello-mes exit-42 body-exit-42 body-hello-mes hello-mes
|
|
|
|
|
rm -f build-aux/mes-snarf.go
|
|
|
|
|
rm -f module/mescc.go
|
|
|
|
|
rm -f module/mes/*.go module/mescc/*.go
|
2020-08-22 12:09:54 +00:00
|
|
|
|
rm -f module/mescc/armv4/*.go
|
2019-12-04 17:49:39 +00:00
|
|
|
|
rm -f module/mescc/i386/*.go
|
|
|
|
|
rm -f module/mescc/x86_64/*.go
|
|
|
|
|
rm -rf gcc-lib/*.o gcc-lib/*.s gcc-lib/*.a gcc-lib/*-mes
|
2019-12-08 15:36:05 +00:00
|
|
|
|
rm -f gcc-lib/libc+gnu.c
|
|
|
|
|
rm -f gcc-lib/.log gcc-lib/build.log
|
2019-12-04 17:49:39 +00:00
|
|
|
|
rm -rf mescc-lib/*.o mescc-lib/*.s mescc-lib/*.a mescc-lib/*-mes
|
2019-12-08 15:36:05 +00:00
|
|
|
|
rm -f mescc-lib/libc+gnu.c
|
|
|
|
|
rm -f mescc-lib/.log mescc-lib/build.log
|
2019-11-03 21:15:11 +00:00
|
|
|
|
rm -rf mescc/bin
|
2019-12-04 17:49:39 +00:00
|
|
|
|
rm -f scaffold/boot/*.log scaffold/boot/*.trs
|
|
|
|
|
rm -f test-suite.log tests/*.log tests/*.trs
|
|
|
|
|
rm -f scaffold/*.s scaffold/*.o
|
|
|
|
|
rm -f doc/images/gcc-mesboot-graph.{eps,pdf,png}
|
|
|
|
|
rm -f doc/mes.1 doc/mesar.1 doc/mescc.1
|
|
|
|
|
rm -f .config .config.E .config.o
|
|
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
|
rm -f GNUmakefile bootstrap.sh build.sh check.sh install.sh uninstall.sh
|
|
|
|
|
rm -f include/mes/config.h
|
|
|
|
|
rm -f .config.make config.sh mescc-lib/config.sh gcc-lib/config.sh
|
|
|
|
|
rm -f scripts/mesar scripts/mescc scripts/mescc.scm scripts/m2-merge
|
|
|
|
|
rm -f TAGS
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
|
|
|
|
mostlyclean: clean
|
|
|
|
|
|
2019-12-04 17:49:39 +00:00
|
|
|
|
maintainer-clean: distclean
|
|
|
|
|
rm -f doc/mes.info
|
|
|
|
|
rm -f doc/version.texi
|
2018-07-23 18:03:57 +00:00
|
|
|
|
|
2018-07-25 06:14:13 +00:00
|
|
|
|
TAGS:
|
core: Use casting functions.
Silence all casting errors by using casting functions.
* src/cc.c (cast_charp_to_scmp, cast_charp_to_scmpp,
cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
* src/m2.c (cast_charp_to_scmp, cast_charp_to_scmpp,
cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
* include/mes/mes.h: Declare them.
(struct scm): Add car_value, cdr_value, function.
(g_continuations): Change to long.
* src/mes.c: Silence all casting errors by using casting functions.
2020-10-18 13:44:49 +00:00
|
|
|
|
etags ${srcdest}lib/*.c ${srcdest}lib/*/*.c ${srcdest}src/*.c ${srcdest}include/*.h ${srcdest}include/*/*.h ${srcdest}include/sys/*.h
|
2018-07-21 22:43:39 +00:00
|
|
|
|
|
2018-07-25 06:14:13 +00:00
|
|
|
|
all-go:
|
|
|
|
|
${srcdest}build-aux/build-guile.sh
|
|
|
|
|
|
|
|
|
|
clean-go:
|
|
|
|
|
rm -f $(shell find . -name '*.go')
|
|
|
|
|
|
|
|
|
|
check:
|
2019-06-25 19:40:43 +00:00
|
|
|
|
$(SHELL) check.sh
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
2018-08-15 17:11:54 +00:00
|
|
|
|
check-mescc:
|
2019-06-25 19:40:43 +00:00
|
|
|
|
$(SHELL) pre-inst-env build-aux/check-mescc.sh
|
2018-08-15 17:11:54 +00:00
|
|
|
|
|
2018-07-25 06:14:13 +00:00
|
|
|
|
# Mes does not feature post-install checks yet, so we're great!
|
|
|
|
|
installcheck:
|
|
|
|
|
true
|
|
|
|
|
|
2018-08-09 09:00:10 +00:00
|
|
|
|
install:
|
2019-06-25 19:40:43 +00:00
|
|
|
|
$(SHELL) install.sh
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
|
|
|
|
uninstall:
|
2019-06-25 19:40:43 +00:00
|
|
|
|
$(SHELL) uninstall.sh
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
2018-08-09 09:00:10 +00:00
|
|
|
|
doc/version.texi: ${srcdest}doc/mes.texi GNUmakefile
|
2018-07-25 06:14:13 +00:00
|
|
|
|
@mkdir -p $(@D)
|
2023-09-09 12:04:20 +00:00
|
|
|
|
timestamp=$$({ git log --pretty=format:%ct -- $< \
|
|
|
|
|
|| date +%s -r $<; } \
|
|
|
|
|
| sort -n -r | head -n 1); \
|
|
|
|
|
dmy=$$(date --date="@$$timestamp" "+%-d %B %Y"); \
|
|
|
|
|
(echo "@set UPDATED $$dmy"; \
|
|
|
|
|
echo "@set UPDATED-MONTH $$my"; \
|
|
|
|
|
echo "@set EDITION $(VERSION)"; \
|
2018-07-25 06:14:13 +00:00
|
|
|
|
echo "@set VERSION $(VERSION)") > $@
|
|
|
|
|
|
|
|
|
|
doc: doc/version.texi
|
|
|
|
|
ifdef MAKEINFO
|
|
|
|
|
doc: info
|
|
|
|
|
else
|
|
|
|
|
$(warning skipping info: no makeinfo)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifdef HELP2MAN
|
|
|
|
|
doc: man
|
|
|
|
|
else
|
|
|
|
|
$(warning skipping man: no help2man)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
info: doc/mes.info
|
|
|
|
|
|
2018-09-04 05:51:15 +00:00
|
|
|
|
doc/mes.info: ${srcdest}doc/mes.texi doc/version.texi ${srcdest}doc/images/gcc-mesboot-graph.png GNUmakefile
|
2018-07-25 06:14:13 +00:00
|
|
|
|
$(MAKEINFO) -o $@ -I doc -I doc $<
|
|
|
|
|
|
2018-07-28 09:37:47 +00:00
|
|
|
|
doc/images/%.eps: ${srcdest}doc/images/%.dot
|
|
|
|
|
ifdef DOT
|
|
|
|
|
$(DOT) -T eps $< > $@
|
|
|
|
|
else
|
|
|
|
|
touch $@
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
doc/images/%.pdf: ${srcdest}doc/images/%.dot
|
|
|
|
|
ifdef DOT
|
|
|
|
|
$(DOT) -T pdf $< > $@
|
|
|
|
|
else
|
|
|
|
|
touch $@
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
doc/images/%.png: ${srcdest}doc/images/%.dot
|
2018-07-25 06:14:13 +00:00
|
|
|
|
ifdef DOT
|
|
|
|
|
$(DOT) -T png $< > $@
|
|
|
|
|
else
|
|
|
|
|
touch $@
|
|
|
|
|
$(warning info: graphvis missing: no images)
|
|
|
|
|
endif
|
|
|
|
|
|
2019-11-04 22:43:38 +00:00
|
|
|
|
man: doc/mes.1 doc/mescc.1 doc/mesar.1
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
2018-08-09 09:00:10 +00:00
|
|
|
|
# disable builtin-rules
|
|
|
|
|
%.o: %.s
|
|
|
|
|
%.s: %.S
|
|
|
|
|
%.o: %.S
|
|
|
|
|
%.o: %.c
|
|
|
|
|
%: %.S
|
|
|
|
|
%: %.o
|
|
|
|
|
%: %.c
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
2023-09-09 11:56:01 +00:00
|
|
|
|
# help2man reproducibility
|
|
|
|
|
SOURCE_DATE_EPOCH=$(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0)
|
|
|
|
|
export SOURCE_DATE_EPOCH
|
|
|
|
|
|
2018-11-06 19:29:35 +00:00
|
|
|
|
doc/mes.1: src/${program_prefix}mes | build
|
2019-11-04 22:43:38 +00:00
|
|
|
|
MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) \
|
|
|
|
|
--name="Scheme interpreter for bootstrapping the GNU system" \
|
|
|
|
|
$(<F) > $@
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
2018-11-06 19:29:35 +00:00
|
|
|
|
doc/mescc.1: scripts/mescc src/${program_prefix}mes | build
|
2019-11-04 22:43:38 +00:00
|
|
|
|
MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) \
|
|
|
|
|
--name="C99 compiler in Scheme for bootstrapping the GNU system" \
|
|
|
|
|
$(<F) > $@
|
|
|
|
|
|
|
|
|
|
doc/mesar.1: scripts/mescc src/${program_prefix}mes | build
|
|
|
|
|
MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) \
|
|
|
|
|
--name="Archiver for MesCC" \
|
|
|
|
|
$(<F) > $@
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
|
|
|
|
html: doc/html/index.html
|
|
|
|
|
|
|
|
|
|
doc/html/index.html: ${srcdest}doc/mes.texi doc/version.texi doc/images/gcc-mesboot-graph.png
|
|
|
|
|
$(MAKEINFO) --html -o $(@D) -I ${srcdest}doc -I doc $<
|
|
|
|
|
|
|
|
|
|
dvi: doc/mes.dvi
|
|
|
|
|
|
|
|
|
|
doc/mes.dvi: ${srcdest}doc/mes.texi
|
|
|
|
|
$(MAKEINFO) --dvi -I ${srcdest}doc -I doc -o doc/mes.dvi $<
|
|
|
|
|
|
|
|
|
|
pdf: doc/mes.pdf
|
|
|
|
|
|
|
|
|
|
doc/mes.pdf: ${srcdest}doc/mes.texi
|
|
|
|
|
$(MAKEINFO) --pdf -I ${srcdest}doc -I doc -o doc/mes.pdf $<
|
|
|
|
|
|
|
|
|
|
ps: doc/mes.ps
|
|
|
|
|
|
|
|
|
|
doc/mes.ps: ${srcdest}doc/mes.texi
|
|
|
|
|
$(MAKEINFO) --ps -I ${srcdest}doc -I doc -o doc/mes.ps $<
|
|
|
|
|
|
2018-07-28 09:37:47 +00:00
|
|
|
|
WEB_IMAGES:=\
|
|
|
|
|
doc/images/gcc-mesboot-graph.eps\
|
|
|
|
|
doc/images/gcc-mesboot-graph.pdf\
|
|
|
|
|
doc/images/gcc-mesboot-graph.png
|
|
|
|
|
|
|
|
|
|
web: info $(WEB_IMAGES)
|
2018-08-09 09:00:10 +00:00
|
|
|
|
GENDOCS_TEMPLATE_DIR=doc build-aux/gendocs.sh -I doc -s ${srcdest}doc/mes.texi -o doc/web/manual --email bug-mes@gnu.org mes "GNU Mes manual"
|
2018-07-28 09:37:47 +00:00
|
|
|
|
|
2022-05-13 05:51:04 +00:00
|
|
|
|
SITE = /srv/mes.org
|
|
|
|
|
publish: web
|
|
|
|
|
rsync -P -v . $(SITE)/
|
|
|
|
|
rsync -P -v . $(SITE)/manual/
|
|
|
|
|
rsync -P -rvz doc/web/manual/ $(SITE)/manual/
|
|
|
|
|
|
|
|
|
|
LOCAL_SITE = $(HOME)/src/web/mes
|
|
|
|
|
publish-local: web
|
|
|
|
|
$(MAKE) publish SITE=$(LOCAL_SITE)
|
|
|
|
|
|
2018-07-25 06:14:13 +00:00
|
|
|
|
### dist
|
2018-09-03 18:09:45 +00:00
|
|
|
|
COMMIT=$(shell test -e ${srcdest}.git && (cd ${srcdir} && git describe --dirty 2>/dev/null) || cat ${srcdest}.tarball-version)
|
2018-07-25 06:14:13 +00:00
|
|
|
|
TARBALL_VERSION=$(COMMIT:v%=%)
|
|
|
|
|
TARBALL_DIR:=$(PACKAGE)-$(TARBALL_VERSION)
|
|
|
|
|
TARBALL:=$(TARBALL_DIR).tar.gz
|
2019-10-24 11:19:28 +00:00
|
|
|
|
# Be friendly to Debian; avoid using EPOCH
|
2023-09-09 11:56:01 +00:00
|
|
|
|
MTIME=$(SOURCE_DIR_EPOCH)
|
2019-10-24 11:19:28 +00:00
|
|
|
|
# Reproducible tarball
|
|
|
|
|
TAR_FLAGS=--sort=name --mtime=@$(MTIME) --owner=0 --group=0 --numeric-owner --mode=go=rX,u+rw,a-s
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
|
|
|
|
.tarball-version:
|
|
|
|
|
echo $(COMMIT) > $@
|
|
|
|
|
|
|
|
|
|
GIT_ARCHIVE_HEAD:=git archive HEAD --
|
|
|
|
|
GIT_LS_FILES:=git ls-files
|
|
|
|
|
ifeq ($(wildcard .git),)
|
|
|
|
|
GIT_ARCHIVE_HEAD:=tar -cf-
|
|
|
|
|
GIT_LS_FILES:=find
|
2019-10-24 11:19:28 +00:00
|
|
|
|
MTIME:=0
|
2018-07-25 06:14:13 +00:00
|
|
|
|
endif
|
|
|
|
|
|
2022-05-02 09:37:27 +00:00
|
|
|
|
check-signature:
|
|
|
|
|
git show HEAD --show-signature |grep 'gpg: Good signature'
|
|
|
|
|
|
|
|
|
|
dist: check-signature $(TARBALL)
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
2020-01-19 10:27:53 +00:00
|
|
|
|
sign-dist: $(TARBALL)
|
2019-11-23 21:23:33 +00:00
|
|
|
|
gpg -a --output $(TARBALL).sig --detach-sig $(TARBALL)
|
2019-09-08 09:10:45 +00:00
|
|
|
|
git checkout ChangeLog
|
2018-07-28 09:37:47 +00:00
|
|
|
|
|
2018-07-25 06:14:13 +00:00
|
|
|
|
tree-clean-p:
|
|
|
|
|
test ! -d .git || git diff --exit-code > /dev/null
|
|
|
|
|
test ! -d .git || git diff --cached --exit-code > /dev/null
|
|
|
|
|
@echo commit:$(COMMIT)
|
|
|
|
|
|
|
|
|
|
generate-ChangeLog:
|
2018-07-26 17:17:12 +00:00
|
|
|
|
$(PERL) ${srcdest}build-aux/gitlog-to-changelog --srcdir=${srcdir} > $@
|
|
|
|
|
cat ChangeLog >> generate-ChangeLog
|
|
|
|
|
mv generate-ChangeLog ChangeLog
|
2018-07-25 06:14:13 +00:00
|
|
|
|
|
|
|
|
|
$(TARBALL): .tarball-version | generate-ChangeLog
|
2019-10-24 11:19:28 +00:00
|
|
|
|
($(GIT_LS_FILES) \
|
|
|
|
|
--exclude=$(TARBALL_DIR); \
|
|
|
|
|
echo $^ | tr ' ' '\n') \
|
|
|
|
|
| tar $(TAR_FLAGS) \
|
|
|
|
|
--transform=s,^,$(TARBALL_DIR)/,S -T- -cf- \
|
|
|
|
|
| gzip -c --no-name > $@
|
2018-07-25 06:14:13 +00:00
|
|
|
|
git checkout ChangeLog
|
|
|
|
|
|
|
|
|
|
ifdef GUIX
|
|
|
|
|
update-hash: $(TARBALL)
|
|
|
|
|
$(GUIX) download file://$(PWD)/$<
|
2021-01-10 11:06:17 +00:00
|
|
|
|
sed -i \
|
|
|
|
|
-e 's,version #!mes!# "[^"]*"),version #!mes!# "$(VERSION)"),' \
|
|
|
|
|
-e 's,(base32 #!mes!# "[^"]*"),(base32 #!mes!# "$(shell $(GUIX) hash $<)"),' \
|
|
|
|
|
guix/git/mes.scm
|
2018-07-25 06:14:13 +00:00
|
|
|
|
else
|
|
|
|
|
$(warning update-hash: no guix)
|
|
|
|
|
endif
|
|
|
|
|
|
2018-07-22 14:21:50 +00:00
|
|
|
|
tag:
|
|
|
|
|
git tag -s v$(VERSION) -m "GNU Mes $(VERSION)."
|
|
|
|
|
|
|
|
|
|
# Release process
|
2020-01-19 10:27:53 +00:00
|
|
|
|
# 0. Prepare git, see history:
|
2020-12-31 12:05:41 +00:00
|
|
|
|
# - doc: Release update (NEWS, etc.)
|
|
|
|
|
# - Generate announcement
|
|
|
|
|
# + touch mes-0.23.tar.gz
|
|
|
|
|
# + make gen-announce VERSION=0.23
|
|
|
|
|
# + Update and commit doc/announce/ANNOUNCE-0.23,
|
|
|
|
|
# using xxx (32,40) for checksums
|
|
|
|
|
# - create "Release 0.23" commit (see Release 0.22).
|
|
|
|
|
# + configure
|
|
|
|
|
# + configure.sh
|
|
|
|
|
# 1. Tag for release
|
|
|
|
|
# make tag VERSION=0.23
|
|
|
|
|
# 2. Create signed tarball
|
2023-02-13 08:27:52 +00:00
|
|
|
|
# ./configure
|
2020-12-31 12:05:41 +00:00
|
|
|
|
# make sign-dist
|
|
|
|
|
# 3. Update Guix package description
|
2022-05-02 09:24:06 +00:00
|
|
|
|
# make release
|
2020-12-31 12:05:41 +00:00
|
|
|
|
# 4. Finish announcement
|
2022-05-02 09:24:06 +00:00
|
|
|
|
# - make sum-announce
|
2020-01-19 10:27:53 +00:00
|
|
|
|
# - doc: Post-release update.
|
2020-12-31 12:05:41 +00:00
|
|
|
|
# - build-aux/GNUMakefile.in: gen-announce: update previous-version
|
|
|
|
|
# 5. Verify
|
|
|
|
|
# - Update package in Guix master.
|
|
|
|
|
# - If applicable, verify bootstrap.
|
|
|
|
|
# 6. Upload to ftp.gnu.org
|
2022-05-13 05:51:04 +00:00
|
|
|
|
# 7. Update web
|
|
|
|
|
# - make publish-local
|
|
|
|
|
# - Update ~/src/web/mes/index.html
|
|
|
|
|
# - Upload: cvs ci
|
|
|
|
|
# 8. Create blog post
|
2020-12-31 12:05:41 +00:00
|
|
|
|
# cp doc/announce/ANNOUNCE-0.23 ~/src/web/joyofsource.com/posts/announce-0.23.md
|
|
|
|
|
# fix urls and all
|
2022-05-13 05:51:04 +00:00
|
|
|
|
# 9. Send mail
|
2020-12-31 12:05:41 +00:00
|
|
|
|
# To: info-gnu@gnu.org
|
2022-05-01 21:27:19 +00:00
|
|
|
|
# Cc: bug-mes@gnu.org
|
2020-12-31 12:05:41 +00:00
|
|
|
|
# Cc: guix-devel@gnu.org
|
|
|
|
|
# Cc: bootstrappable@freelists.org
|
|
|
|
|
# Cc: rb-general@lists.reproducible-builds.org
|
2018-07-22 14:21:50 +00:00
|
|
|
|
|
|
|
|
|
guix-build:
|
2018-07-25 06:14:13 +00:00
|
|
|
|
./pre-inst-env $(GUIX) build mes@$(VERSION) --with-source=$(TARBALL)
|
|
|
|
|
|
2022-05-02 09:37:27 +00:00
|
|
|
|
release: check-signature update-hash
|
2021-01-10 11:06:17 +00:00
|
|
|
|
git commit -m 'guix: mes: Update to $(VERSION).' \
|
|
|
|
|
-m '* guix/git/mes.scm (mes)[source]: Update to $(VERSION).' \
|
|
|
|
|
guix/git/mes.scm
|
2018-07-22 14:21:50 +00:00
|
|
|
|
|
2018-08-09 09:00:10 +00:00
|
|
|
|
GPG_KEY_ID:=1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
2018-12-20 06:44:18 +00:00
|
|
|
|
GEN_ANNOUNCE=$(GNULIB)/build-aux/announce-gen
|
|
|
|
|
GNULIB=../../gnulib
|
2018-08-09 09:00:10 +00:00
|
|
|
|
gen-announce:
|
2022-04-30 14:14:55 +00:00
|
|
|
|
$(GEN_ANNOUNCE) \
|
|
|
|
|
--release-type=beta \
|
|
|
|
|
--package-name=mes \
|
2023-02-13 11:11:01 +00:00
|
|
|
|
--previous-version='0.24.2' \
|
2022-04-30 14:14:55 +00:00
|
|
|
|
--current-version=$(VERSION) \
|
|
|
|
|
--gpg-key-id=$(GPG_KEY_ID) \
|
|
|
|
|
--url-directory=https://ftp.gnu.org/gnu/mes \
|
|
|
|
|
--news=NEWS \
|
2020-12-31 12:05:41 +00:00
|
|
|
|
> doc/announce/ANNOUNCE-$(VERSION)
|
2018-08-09 09:00:10 +00:00
|
|
|
|
|
2022-05-02 09:24:06 +00:00
|
|
|
|
sum-announce:
|
|
|
|
|
sed -i \
|
|
|
|
|
-e "s, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $(PACKAGE)-$(VERSION).tar.gz, $(shell sha256sum $(PACKAGE)-$(VERSION).tar.gz)," \
|
|
|
|
|
-e "s, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $(PACKAGE)-$(VERSION).tar.gz, $(shell sha1sum $(PACKAGE)-$(VERSION).tar.gz)," \
|
|
|
|
|
-e "s, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $(PACKAGE)-$(VERSION).tar.gz, $(shell md5sum $(PACKAGE)-$(VERSION).tar.gz)," \
|
|
|
|
|
doc/announce/ANNOUNCE-$(VERSION)
|
|
|
|
|
|
2018-07-25 06:14:13 +00:00
|
|
|
|
installdirs: mkinstalldirs
|
|
|
|
|
mkdir -p\
|
|
|
|
|
$(DESTDIR)$(bindir)\
|
|
|
|
|
$(DESTDIR)$(datadir)\
|
|
|
|
|
$(DESTDIR)$(libdir)\
|
|
|
|
|
$(DESTDIR)$(infodir)\
|
|
|
|
|
$(DESTDIR)$(mandir)
|
|
|
|
|
|
|
|
|
|
install-dvi: dvi
|
|
|
|
|
mkdir -p $(DESTDIR)${docdir}
|
|
|
|
|
cp doc/mes.dvi $(DESTDIR)${docdir}
|
|
|
|
|
|
|
|
|
|
install-html: html
|
|
|
|
|
mkdir -p $(DESTDIR)${docdir}
|
|
|
|
|
tar -cf- -C doc html | tar -xf- -C $(DESTDIR)${docdir}
|
|
|
|
|
|
|
|
|
|
install-pdf: pdf
|
|
|
|
|
mkdir -p $(DESTDIR)${docdir}
|
|
|
|
|
cp doc/mes.pdf $(DESTDIR)${docdir}
|
|
|
|
|
|
|
|
|
|
install-ps: ps
|
|
|
|
|
mkdir -p $(DESTDIR)${docdir}
|
|
|
|
|
cp doc/mes.ps $(DESTDIR)${docdir}
|
|
|
|
|
|
|
|
|
|
# We do not strip binaries, binutils' strip corrupts M1+hex2-generated ELFs
|
|
|
|
|
install-strip: install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define HELP_TOP
|
|
|
|
|
Usage: make [OPTION]... [TARGET]...
|
|
|
|
|
|
|
|
|
|
Main and non-standard targets:
|
|
|
|
|
all update everything
|
|
|
|
|
all-go update .go files
|
|
|
|
|
dist update $(TARBALL)
|
|
|
|
|
doc update documentation
|
|
|
|
|
check run unit tests
|
|
|
|
|
clean run git clean -dfx
|
|
|
|
|
clean-go clean .go files
|
|
|
|
|
info update info documentation
|
|
|
|
|
install install in $(prefix)
|
|
|
|
|
install-info install info docs in $(prefix)/share/info
|
|
|
|
|
release dist and tag
|
|
|
|
|
uninstall uninstall from $(prefix)
|
|
|
|
|
endef
|
|
|
|
|
export HELP_TOP
|
|
|
|
|
help:
|
|
|
|
|
@echo "$$HELP_TOP"
|
|
|
|
|
|
|
|
|
|
include ${srcdest}build-aux/export.make
|