Added comments in calc Makefiles

Added a bunch of information to the near bottom of HOWTO.INSTALL
    on calc Makefiles.  This information discusses the various
    Makefiles found in the calc source.

    Added comments in various calc Makefiles about their origin.
    In particular, for Makefiles that are constructed such as
    Makefile.simple, custom/Makefile and custom/Makefile.simple
    there are comments about how they were made.

    For all calc Makefiles, including those in sub-directories,
    near the top there is now a line of the form:

	# SRC: ... some message about the origin ...
This commit is contained in:
Landon Curt Noll
2021-03-26 16:52:32 -07:00
parent f480c8c5df
commit 09d7080547
10 changed files with 427 additions and 81 deletions

18
CHANGES
View File

@@ -7,6 +7,24 @@ The following are the changes from calc version 2.12.9.2 to date:
Combined 2.12.9.1 changes into the 2.12.8.2 to 2.12.9.0 Combined 2.12.9.1 changes into the 2.12.8.2 to 2.12.9.0
range, and thus renamed the range to 2.12.8.2 to 2.12.9.1. range, and thus renamed the range to 2.12.8.2 to 2.12.9.1.
Fixed issues related to building Makefile.simple.
Fixed how the Makefile variable MANPATH is set for macOS.
Added a bunch of information to the near bottom of HOWTO.INSTALL
on calc Makefiles. This information discusses the various
Makefiles found in the calc source.
Added comments in various calc Makefiles about their origin.
In particular, for Makefiles that are constructed such as
Makefile.simple, custom/Makefile and custom/Makefile.simple
there are comments about how they were made.
For all calc Makefiles, including those in sub-directories,
near the top there is now a line of the form:
# SRC: ... some message about the origin ...
The following are the changes from calc version 2.12.8.2 to 2.12.9.1: The following are the changes from calc version 2.12.8.2 to 2.12.9.1:

View File

@@ -1,3 +1,7 @@
IMPORTANT: Please see the section at the bottom of this file for
some important information on Makefiles used in calc.
Installing calc from the bzip2-ed tarball in 4 easy steps: Installing calc from the bzip2-ed tarball in 4 easy steps:
0) If your platform supports i686 RPMs, you may want to go to: 0) If your platform supports i686 RPMs, you may want to go to:
@@ -198,6 +202,213 @@ Installing calc from the bzip2-ed tarball in 4 easy steps:
We suggest that you might want to read the README.FIRST file and look at We suggest that you might want to read the README.FIRST file and look at
the calc help subsystem. See also the README.md file. the calc help subsystem. See also the README.md file.
=-=
On calc Makefiles:
How to tell the origin of of a Makefile:
The "# SRC: ... - ..." comment line near the top
of the file indicates the origin of this file.
In each segment below, we indicate what the SRC
comment like will read.
SHELL= ...
On some systems, /bin/sh is a rather reduced shell with
deprecated behavor.
If your system has a up to date, bash shell, then
you may wish to edit the Makefile to use:
SHELL= /bin/bash
On some systems such as macOS, the bash shell is very
far behind to the point wehre is cannot be depended on.
On such systems, the zsh may be a much better alternative
shell for this Makefile to use:
SHELL= /bin/zsh
Makefile
# SRC: Makefile - Our calc build environment
This is our internal Makefile that drives how we build calc.
For critical rules in Makefile.ship, there is a corresponding
rule in Makefile that calls ${MAKE} -f Makefile.ship with,
additional commands, args and Makefile variables. The ${XVAR}
Makefile variable, for example, is passed on each call to
${MAKE} -f Makefile.ship so that the enviroment and parameters of
Makefile.ship may be managed for our build environment.
This Makefile is used to make the calc rpm. In addition to these
comments, this Makefile differs from the non-rpm bzip2-ed tarball
source Makefile in at least the the following ways:
CCWERR= -Werror
USE_READLINE= -DUSE_READLINE
READLINE_LIB= -lreadline -lhistory -lncurses
If the Makefile is not suitable for you, then
you may wish to replace it with Makefile.ship:
mv -f -v Makefile.ship Makefile
This Makefile assumes you have a modern make command such as
the GNU make. See Makefile.simple comment below if you do not
have such a modern make command.
In packages such as RPMs, and the tar.bz2 source tarball,
Makefile contains the contents of Makefile.ship. If Makefile.ship
is missing it has likely moved to replace Makefile.
In the calc GitHub repo, Makefile is the calc build environment
and Makefile.ship is the top level Makefile:
https://github.com/lcn2/calc
Makefile.ship
# SRC: Makefile.ship - top level Makefile
This is the main top level Makefile.
In calc packages such as RPMs, and the tar.bz2 source tarball,
Makefile.ship has been moved into Makefile.
In the calc GitHub repo, Makefile is the calc build environment
and Makefile.ship is the top level Makefile:
https://github.com/lcn2/calc
The Makefile.simple rule of Makefile.ship, when forming the
Makefile.simple file, removes lines from Makefile.ship between
pairs of '#if 0' AND '#endif':
#if 0
lines removed when forming Makefile.simple
...
lines removed when forming Makefile.simple
#endif
The '#if 0' AND '#endif' MUST be at the start of the line.
Any text after the '#if 0' OR '#endif' is ignored.
While they may look like a CPP directives, they are not. The
inlike awk scritp of the Makefile.simple rule does NOT allow
them to nest:
#if 0 /* DO NOT DO THIS */
lines removed when forming Makefile.simple
...
#if 0 /* DO NOT DO THIS */
...
#endif /* DO NOT DO THIS */
...
#endif /* DO NOT DO THIS */
The custom/Makefile rule of Makefile.ship is used to form
the custom/Makefile. In particular the Makefile.ship lines:
# start of host target cut
... these go inbetween custom/Makefile.head and custom/Makefile.tail
# end of host target cut
Makefile.simple
# SRC: non-GNU Makefile via make -f Makefile.ship Makefile.simple
This is a non-GNU or simple Makefile designed for enviroments
that do not have a modern make command.
If you have a Makefile.simple file, use these commands to
form a Makefile:
if [ -f Makefile ]; then mv -f Makefile Makefile.orig; fi
cp Makefile.simple Makefile
The Makefile.simple rule from Makefile.ship is used to construct
this file from the contents of Makefile.ship.
In calc packages such as RPMs, and the tar.bz2 source the
Makefile.simple exists. In the calc GitHub repo:
https://github.com/lcn2/calc
this file does NOT exist and must be made via the Makefile.simple
make rule. Therefore, non-GNU and simple make comands are NOT
supported by the calc GitHub repo master branch. Instead, you
need to extract Makefile.simple from one of the calc tar.bz2
source tarball source from a calc source mirror:
http://www.isthe.com/chongo/tech/comp/calc/calc-mirror.html
custom/Makefile.head
# SRC: custom/Makefile.head
This file forms the top part of the custom/Makefile.
custom/Makefile.tail
# SRC: custom/Makefile.tail
This file forms the bottom part of the custom/Makefile.
custom/Makefile
# SRC: Makefile via make -f Makefile custom/Makefile
This is the custom directory Makefile.
The custom/Makefile rule of Makefile.ship is used to form
the custom/Makefile. In particular the Makefile.ship lines:
# start of host target cut
... these go inbetween custom/Makefile.head and custom/Makefile.tail
# end of host target cut
custom/Makefile.simple
# SRC: non-GNU Makefile via make -f Makefile custom/Makefile.simple
This is a non-GNU or simple Makefile for the custom direcory
that is designed for enviroments that do not have a modern make
command.
In calc packages such as RPMs, and the tar.bz2 source the
Makefile.simple exists. In the calc GitHub repo:
https://github.com/lcn2/calc
this file does NOT exist and must be made via the
custom/Makefile.simple make rule. Therefore, non-GNU and simple
make comands are NOT supported by the calc GitHub repo master
branch. Instead, you need to extract custom/Makefile.simple
from one of the calc tar.bz2 source tarball source from a calc
source mirror:
http://www.isthe.com/chongo/tech/comp/calc/calc-mirror.html
cal/Makefile
# SRC: cal/Makefile
The Makefile for the cal sub-directory.
cscript/Makefile
# SRC: cscript/Makefile
The Makefile for the cscript sub-directory.
help/Makefile
# SRC: help/Makefile
The Makefile for the help sub-directory.
## Copyright (C) 1999-2007,2021 Landon Curt Noll ## Copyright (C) 1999-2007,2021 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## Calc is open software; you can redistribute it and/or modify it under

View File

@@ -2,33 +2,15 @@
# #
# calc - arbitrary precision calculator # calc - arbitrary precision calculator
# #
# (Linux calc rpm building makefile)
#
# NOTE: This Makefile is used to make the calc rpm. In addition to these
# comments, this Makefile differs from the non-rpm bzip2-ed tarball
# source Makefile in the following ways:
#
# CCWERR= -Werror
# USE_READLINE= -DUSE_READLINE
# READLINE_LIB= -lreadline -lhistory -lncurses
#
# Copyright (C) 1999-2018,2021 Landon Curt Noll # Copyright (C) 1999-2018,2021 Landon Curt Noll
# #
# The Makefile.ship makefile becomes the Makefile found in the # SRC: Makefile - Our calc build environment
# calc-*.tar.bz2 bzip2 source tarball.
# #
# This Makefile drives the makefile: Makefile.ship. # The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
# #
# This makefile mostly contains critical variables (such as SHELL, MAKE, etc.) # IMPORTANT: Please see the section on Makefiles near the
# as well as those which we choose to override defaults found in # bottom of the HOWTO.INSTALL file.
# Makefile.ship. Make variables unique to this Makefile start with X.
#
# This makefile contains only those critical rules (such as all, clean, etc.)
# and the common rules needed in development (such as chk, check, etc.).
# This makefile has a few special rules that are used to set the version
# string in the shipped makefiles (such as Makefile.ship).
# Copyright (C) 1999-2008,2014 Landon Curt Noll
# #
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
@@ -757,6 +739,11 @@ Makefile.simple:
${Q} ${MAKE} ${XARG} -f ${MAKE_FILE} $@ ${XVAR} ${Q} ${MAKE} ${XARG} -f ${MAKE_FILE} $@ ${XVAR}
${V} echo '=-=-=-=-= private Makefile $@ rule end =-=-=-=-=' ${V} echo '=-=-=-=-= private Makefile $@ rule end =-=-=-=-='
custom/Makefile.simple:
${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-='
${Q} ${MAKE} ${XARG} -f ${MAKE_FILE} $@ ${XVAR}
${V} echo '=-=-=-=-= private Makefile $@ rule end =-=-=-=-='
## ##
# #

View File

@@ -1,29 +1,17 @@
#!/bin/make
# #
# calc - arbitrary precision calculator # calc - arbitrary precision calculator
# #
########################################################################
# Gnu makefile: # This is a Gnu make makefile. If your make does not #
# Gnu makefile: # understand this makefile format, then edit and use #
# Gnu makefile: # Makefile.simple instead of this Makefile. #
########################################################################
#
# (Generic calc makefile)
#
# NOTE: This is NOT the calc rpm Makefile. This Makefile is a generic
# Makefile for the people who build calc from the bzip2-ed tarball.
# Without modification, it does not assume the system has readline,
# ncurses or less. It compiles with gcc -O3 -g3 as well. You can
# change all this by modifying the Makefile variables below.
#
# NOTE: You might want use the READLINE facility if your system
# has the GNU readline headers and libraries:
#
# USE_READLINE= -DUSE_READLINE
# READLINE_LIB= -lreadline
# READLINE_EXTRAS= -lhistory -lncurses
#
# Copyright (C) 1999-2018,2021 Landon Curt Noll # Copyright (C) 1999-2018,2021 Landon Curt Noll
# #
# SRC: Makefile.ship - top level Makefile
#
# The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
#
# IMPORTANT: Please see the section on Makefiles near the
# bottom of the HOWTO.INSTALL file.
#
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of version 2.1 of the GNU Lesser General Public License # the terms of version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation. # as published by the Free Software Foundation.
@@ -845,16 +833,30 @@ SCRIPTDIR= ${BINDIR}/cscript
# #
T= T=
# where man pages are installed # where man section 1 pages are installed
# #
# Select MANDIR= /dev/env/DJDIR/man/man1 for DJGPP. # Select MANDIR= /dev/env/DJDIR/man/man1 for DJGPP.
# #
# Use MANDIR= to disable installation of the calc man (source) page. # Use MANDIR= to disable installation of the calc man (source) page.
# #
# NOTE: man pages not installed by macOS must go under,
# (according to MANPATH as found in /private/etc/man.conf):
#
# MANDIR= /usr/local/share/man/man1
#
#MANDIR= #MANDIR=
#MANDIR= /usr/local/man/man1 #MANDIR= /usr/local/man/man1
#MANDIR= /usr/man/man1 #MANDIR= /usr/man/man1
#
#if 0 /* start of skip for non-Gnu makefiles */
ifeq ($(target),Darwin)
MANDIR= /usr/local/share/man/man1
else
#endif /* end of skip for non-Gnu makefiles */
MANDIR= /usr/share/man/man1 MANDIR= /usr/share/man/man1
#if 0 /* start of skip for non-Gnu makefiles */
endif
#endif /* end of skip for non-Gnu makefiles */
#MANDIR= /dev/env/DJDIR/man/man1 #MANDIR= /dev/env/DJDIR/man/man1
#MANDIR= /usr/man/u_man/man1 #MANDIR= /usr/man/u_man/man1
#MANDIR= /usr/contrib/man/man1 #MANDIR= /usr/contrib/man/man1
@@ -1248,6 +1250,11 @@ endif
COMMON_LDFLAGS= ${EXTRA_LDFLAGS} COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
# start of host target cut - Do not remove this line # start of host target cut - Do not remove this line
###########################################################
# NOTE: Start of section from the middle of Makefile.ship #
###########################################################
############################################################################## ##############################################################################
#-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-# #-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-#
############################################################################## ##############################################################################
@@ -1357,10 +1364,8 @@ LIBCUSTCALC_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1425,10 +1430,8 @@ LIBCUSTCALC_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1495,10 +1498,8 @@ LIBCUSTCALC_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1557,10 +1558,8 @@ LIBCUSTCALC_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1613,10 +1612,8 @@ LD_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1667,10 +1664,8 @@ LD_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1824,10 +1819,8 @@ LD_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1872,6 +1865,11 @@ LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
####################################################################### #######################################################################
#-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-# #-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-#
####################################################################### #######################################################################
#########################################################
# NOTE: End of section from the middle of Makefile.ship #
#########################################################
# end of host target cut - Do not remove this line # end of host target cut - Do not remove this line
############################################################################### ###############################################################################
@@ -4269,11 +4267,15 @@ calcliblistfmt:
custom/Makefile: ${MAKE_FILE} custom/Makefile.head custom/Makefile.tail custom/Makefile: ${MAKE_FILE} custom/Makefile.head custom/Makefile.tail
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
${Q} ${RM} -f $@ ${Q} ${RM} -f $@
${Q} ${CAT} custom/Makefile.head > $@ ${Q} ${CAT} custom/Makefile.head | \
${SED} -e 's;^# SRC:.*;# SRC: Makefile via;' \
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} $@;' >> $@
${Q} ${SED} -n -e \ ${Q} ${SED} -n -e \
"/^# start of host target cut/,/^# end of host target cut/p" \ "/^# start of host target cut/,/^# end of host target cut/p" \
${MAKE_FILE} >> $@ ${MAKE_FILE} >> $@
${Q} ${CAT} custom/Makefile.tail >> $@ ${Q} ${CAT} custom/Makefile.tail | \
${SED} -e 's;^# SRC:.*;# SRC: Makefile via;' \
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} $@;' >> $@
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
Makefile.simple: ${MAKE_FILE} custom/Makefile.simple Makefile.simple: ${MAKE_FILE} custom/Makefile.simple
@@ -4281,7 +4283,9 @@ Makefile.simple: ${MAKE_FILE} custom/Makefile.simple
${Q} ${RM} -f $@ ${Q} ${RM} -f $@
${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \ ${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \
${MAKE_FILE} | \ ${MAKE_FILE} | \
${SED} -e 's/cd custom; $${MAKE} -f Makefile/&.simple/g' > $@ ${SED} -e 's;cd custom; $${MAKE} -f Makefile/&.simple;g' \
-e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} $@;' > $@
${Q} echo >> $@ ${Q} echo >> $@
${Q} echo 'Makefile.simple:' >> $@ ${Q} echo 'Makefile.simple:' >> $@
${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@ ${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@

View File

@@ -4,6 +4,14 @@
# #
# Copyright (C) 1999-2006,2017,2021 Landon Curt Noll # Copyright (C) 1999-2006,2017,2021 Landon Curt Noll
# #
# SRC: cal/Makefile
#
# The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
#
# IMPORTANT: Please see the section on Makefiles near the
# bottom of the HOWTO.INSTALL file.
#
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation. # as published by the Free Software Foundation.

View File

@@ -3,6 +3,14 @@
# #
# Copyright (C) 1999-2006,2014,2017,2021 Landon Curt Noll # Copyright (C) 1999-2006,2014,2017,2021 Landon Curt Noll
# #
# SRC: cscript/Makefile
#
# The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
#
# IMPORTANT: Please see the section on Makefiles near the
# bottom of the HOWTO.INSTALL file.
#
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation. # as published by the Free Software Foundation.

View File

@@ -4,6 +4,14 @@
# #
# Copyright (C) 1999-2006,2014,2017-2018,2021 Landon Curt Noll # Copyright (C) 1999-2006,2014,2017-2018,2021 Landon Curt Noll
# #
# SRC: Makefile via make -f Makefile.ship custom/Makefile
#
# The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
#
# IMPORTANT: Please see the section on Makefiles near the
# bottom of the HOWTO.INSTALL file.
#
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation. # as published by the Free Software Foundation.
@@ -27,6 +35,25 @@
# calculator by David I. Bell with help/mods from others # calculator by David I. Bell with help/mods from others
# Makefile by Landon Curt Noll # Makefile by Landon Curt Noll
####################################################
# NOTE: Start of section from custom/Makefile.head #
####################################################
#.###############################################################.#
#.# #.#
#.# WARNING: This Makefile is generated from a combination of #.#
#.# custom/Makefile.head, Makefile.ship, and #.#
#.# custom/Makefile.tail. We recommend that you NOT #.#
#.# edit this file, but instead edit the proper source #.#
#.# file and then make custom/Makefile: #.#
#.# #.#
#.# make custom/Makefile #.#
#.# #.#
#.# See the '# NOTE .. section from ..' lines for #.#
#.# where the source file for the lines are from. #.#
#.# #.#
#.###############################################################.#
# The shell used by this Makefile # The shell used by this Makefile
# #
@@ -517,7 +544,16 @@ ILDFLAGS= ${COMMON_LDFLAGS}
LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
#endif /* end of skip for non-Gnu makefiles */ #endif /* end of skip for non-Gnu makefiles */
##################################################
# NOTE: End of section from custom/Makefile.head #
##################################################
# start of host target cut - Do not remove this line # start of host target cut - Do not remove this line
###########################################################
# NOTE: Start of section from the middle of Makefile.ship #
###########################################################
############################################################################## ##############################################################################
#-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-# #-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-#
############################################################################## ##############################################################################
@@ -627,10 +663,8 @@ LIBCUSTCALC_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -645,9 +679,9 @@ CC= ${PURIFY} ${LCC} ${CCWERR}
# #
endif endif
############################## ###############################
# Apple OS X / Darwin target # # Apple macOS / Darwin target #
############################## ###############################
ifeq ($(target),Darwin) ifeq ($(target),Darwin)
# #
@@ -695,10 +729,8 @@ LIBCUSTCALC_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -765,10 +797,8 @@ LIBCUSTCALC_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -827,10 +857,8 @@ LIBCUSTCALC_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -883,10 +911,8 @@ LD_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -937,10 +963,8 @@ LD_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1094,10 +1118,8 @@ LD_STATIC=
# This facility requires a Gnu Makefile, or a make command # This facility requires a Gnu Makefile, or a make command
# that understands the += make operand. # that understands the += make operand.
# #
#if 0 /* start of skip for non-Gnu makefiles */
COMMON_CFLAGS+= ${COMMON_ADD} COMMON_CFLAGS+= ${COMMON_ADD}
COMMON_LDFLAGS+= ${COMMON_ADD} COMMON_LDFLAGS+= ${COMMON_ADD}
#endif /* end of skip for non-Gnu makefiles */
# #
CCWARN= -Wall CCWARN= -Wall
WNO_IMPLICT= -Wno-implicit WNO_IMPLICT= -Wno-implicit
@@ -1142,7 +1164,27 @@ LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
####################################################################### #######################################################################
#-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-# #-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-#
####################################################################### #######################################################################
#########################################################
# NOTE: End of section from the middle of Makefile.ship #
#########################################################
# end of host target cut - Do not remove this line # end of host target cut - Do not remove this line
#
# Copyright (C) 1999-2006,2014,2017-2018,2021 Landon Curt Noll
#
# SRC: Makefile via make -f Makefile.ship custom/Makefile
#
# The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
#
# IMPORTANT: Please see the section on Makefiles near the
# bottom of the HOWTO.INSTALL file.
####################################################
# NOTE: Start of section from custom/Makefile.tail #
####################################################
############################################################################## ##############################################################################
#-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-# #-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-#
############################################################################## ##############################################################################
@@ -1293,7 +1335,10 @@ Makefile.simple: ${MAKE_FILE}
${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-='
${Q} ${RM} -f $@ ${Q} ${RM} -f $@
${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \ ${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \
${MAKE_FILE} > $@ ${MAKE_FILE} | \
${GREP} -v '#\.#' | \
${SED} -e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} custom/$@;' > $@
${Q} echo >> $@ ${Q} echo >> $@
${Q} echo 'Makefile.simple:' >> $@ ${Q} echo 'Makefile.simple:' >> $@
${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@ ${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@
@@ -1894,3 +1939,7 @@ custtbl.o: ../str.h
custtbl.o: ../value.h custtbl.o: ../value.h
custtbl.o: ../zmath.h custtbl.o: ../zmath.h
custtbl.o: custtbl.c custtbl.o: custtbl.c
##################################################
# NOTE: End of section from custom/Makefile.tail #
##################################################

View File

@@ -4,6 +4,14 @@
# #
# Copyright (C) 1999-2006,2014,2017-2018,2021 Landon Curt Noll # Copyright (C) 1999-2006,2014,2017-2018,2021 Landon Curt Noll
# #
# SRC: custom/Makefile.head
#
# The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
#
# IMPORTANT: Please see the section on Makefiles near the
# bottom of the HOWTO.INSTALL file.
#
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation. # as published by the Free Software Foundation.
@@ -27,6 +35,25 @@
# calculator by David I. Bell with help/mods from others # calculator by David I. Bell with help/mods from others
# Makefile by Landon Curt Noll # Makefile by Landon Curt Noll
####################################################
# NOTE: Start of section from custom/Makefile.head #
####################################################
#.###############################################################.#
#.# #.#
#.# WARNING: This Makefile is generated from a combination of #.#
#.# custom/Makefile.head, Makefile.ship, and #.#
#.# custom/Makefile.tail. We recommend that you NOT #.#
#.# edit this file, but instead edit the proper source #.#
#.# file and then make custom/Makefile: #.#
#.# #.#
#.# make custom/Makefile #.#
#.# #.#
#.# See the '# NOTE .. section from ..' lines for #.#
#.# where the source file for the lines are from. #.#
#.# #.#
#.###############################################################.#
# The shell used by this Makefile # The shell used by this Makefile
# #
@@ -517,3 +544,7 @@ ILDFLAGS= ${COMMON_LDFLAGS}
LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
#endif /* end of skip for non-Gnu makefiles */ #endif /* end of skip for non-Gnu makefiles */
##################################################
# NOTE: End of section from custom/Makefile.head #
##################################################

View File

@@ -1,3 +1,18 @@
#
# Copyright (C) 1999-2006,2014,2017-2018,2021 Landon Curt Noll
#
# SRC: custom/Makefile.tail
#
# The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
#
# IMPORTANT: Please see the section on Makefiles near the
# bottom of the HOWTO.INSTALL file.
####################################################
# NOTE: Start of section from custom/Makefile.tail #
####################################################
############################################################################## ##############################################################################
#-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-# #-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-#
############################################################################## ##############################################################################
@@ -148,7 +163,10 @@ Makefile.simple: ${MAKE_FILE}
${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-='
${Q} ${RM} -f $@ ${Q} ${RM} -f $@
${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \ ${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \
${MAKE_FILE} > $@ ${MAKE_FILE} | \
${GREP} -v '#\.#' | \
${SED} -e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} custom/$@;' > $@
${Q} echo >> $@ ${Q} echo >> $@
${Q} echo 'Makefile.simple:' >> $@ ${Q} echo 'Makefile.simple:' >> $@
${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@ ${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@
@@ -749,3 +767,7 @@ custtbl.o: ../str.h
custtbl.o: ../value.h custtbl.o: ../value.h
custtbl.o: ../zmath.h custtbl.o: ../zmath.h
custtbl.o: custtbl.c custtbl.o: custtbl.c
##################################################
# NOTE: End of section from custom/Makefile.tail #
##################################################

View File

@@ -4,6 +4,14 @@
# #
# Copyright (C) 1999-2006,2017,2021 Landon Curt Noll # Copyright (C) 1999-2006,2017,2021 Landon Curt Noll
# #
# SRC: help/Makefile
#
# The "# SRC: ... - ..." comment line above indicates
# the origin of this file.
#
# IMPORTANT: Please see the section on Makefiles near the
# bottom of the HOWTO.INSTALL file.
#
# Calc is open software; you can redistribute it and/or modify it under # Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License # the terms of the version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation. # as published by the Free Software Foundation.