diff --git a/AUTHORS b/AUTHORS index 503d87d..cc293bc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -15,4 +15,9 @@ Nelson Beebe (assigned to the FSF) Original authors. Ineiev - Add AUTHORS, THANKS, NEWS, README, ChangeLog. + Add AUTHORS, THANKS, NEWS, README, ChangeLog, Makefile.am, + configure.ac, version.texi. + + Tiny changes in c.texi. + + Cleanup in Makefile. diff --git a/ChangeLog b/ChangeLog index 9110837..65b6e18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ GNU C Intro and Reference - ChangeLog +2023-09-25 Ineiev + + Add Autotools system in parallel with Makefile. + + * Makefile.am: + * version.texi: + * configure.ac: New files. + * c.texi: Include version.texi. + * Makefile: Add copyright and license notices, + gather common dependencies in $(SOURCES), use $< and $@ in rules. + ----- diff --git a/Makefile b/Makefile index 130d2c5..ab5e18f 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,35 @@ -c-manual.tgz: c.texi cpp.texi fp.texi fdl.texi - mkdir c-manual - ln Makefile c.texi cpp.texi fp.texi fdl.texi c-manual - tar czf c-manual.tgz c-manual - rm -rf c-manual +# Simple Makefile to build the manual from Git checkout without +# the need to bootstrap the build system. +# +# Copyright (C) 2023 Richard Stallman +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. -c.info: c.texi cpp.texi fp.texi fdl.texi +SOURCES = c.texi cpp.texi fp.texi gpl.texi fdl.texi version.texi + +c.info: $(SOURCES) makeinfo c.texi c.pdf: c.dvi - dvipdf c.dvi + dvipdf $< -c.dvi: c.texi cpp.texi fp.texi fdl.texi - texi2dvi c.texi +c.dvi: $(SOURCES) + texi2dvi $< -c.doc: c.texi cpp.texi fp.texi fdl.texi - makeinfo --docbook c.texi -o $@ -c.html: c.texi cpp.texi fp.texi fdl.texi - makeinfo --html --no-split c.texi -o $@ -c.html.d: c.texi cpp.texi fp.texi fdl.texi - makeinfo --html c.texi -o $@ -c.txt: c.texi cpp.texi fp.texi fdl.texi - makeinfo --plaintext c.texi > $@ +c.doc: $(SOURCES) + makeinfo --docbook $< -o $@ +c.html: $(SOURCES) + makeinfo --html --no-split $< -o $@ +c.html.d: $(SOURCES) + makeinfo --html $< -o $@ +c.txt: $(SOURCES) + makeinfo --plaintext $< > $@ clean: - rm -f c-manual.tgz c.dvi c.pdf c.info c.info-* c.doc c.txt - rm -rf c.html + rm -f c.dvi c.pdf c.info c.info-* c.doc c.txt c.html + rm -rf c.html.d rm -f c.aux c.cp c.fn c.ky c.log c.pg c.tmp c.toc c.tp c.vr rm -f c.cps c.fns diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..7b9a3f5 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,3 @@ +info_TEXINFOS = c.texi +c_TEXINFOS = cpp.texi fp.texi fdl.texi gpl.texi +dist_doc_DATA = c.pdf diff --git a/c.texi b/c.texi index b37b251..609bd6c 100644 --- a/c.texi +++ b/c.texi @@ -9,6 +9,7 @@ @c ??? alloca @setfilename ./c.info +@include version.texi @settitle GNU C Language Manual @documentencoding UTF-8 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..7560a8b --- /dev/null +++ b/configure.ac @@ -0,0 +1,11 @@ +# Process this file with autoconf to produce a configure script: +# autoreconf -vi +# Public domain. Originally written by Ineiev, 2023. +AC_INIT([GNU C Intro And Reference], [0.0-rc4], [c-manual@gnu.org], + [c-intro-and-ref], [https://www.gnu.org/software/c-intro-and-ref/]) + +AC_PREREQ([2.65]) +AC_CONFIG_SRCDIR([c.texi]) +AM_INIT_AUTOMAKE([1.11]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/version.texi b/version.texi new file mode 100644 index 0000000..36b94e0 --- /dev/null +++ b/version.texi @@ -0,0 +1 @@ +@set EDITION 0.0-rc4