Improve how Makefiles are formed, updated related doc

This commit is contained in:
Landon Curt Noll
2021-12-13 16:54:45 -08:00
parent 22e123140c
commit f7dadbf1f8
6 changed files with 20 additions and 38 deletions

15
BUGS
View File

@@ -15,12 +15,21 @@ Look at the end of the output, it should say something like:
If it does not, then something is really broken! If it does not, then something is really broken!
To be sure that your version of calc is up to date, check out: To be sure that your version of calc is up to date.
Look for the latest release on GitHub:
http://www.isthe.com/chongo/tech/comp/calc/calc-mirror.html https://github.com/lcn2/calc/releases
Just below latest GitHub release sectiop is something called:
> Assets
Click in the triangle to open up the Assets then click on
the approptiate package to download.
If you made and modifications to calc beyond the simple Makefile If you made and modifications to calc beyond the simple Makefile
configuration, try backing them out and see if things get better. configuration, try backing those changges out and see if things get
better.
If you have tried all of the above and things still are not right, If you have tried all of the above and things still are not right,
then it may be time to send in a bug report. then it may be time to send in a bug report.

View File

@@ -322,16 +322,9 @@ Makefile
... ...
#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 between custom/Makefile.head and custom/Makefile.tail
# end of host target cut
Makefile.simple Makefile.simple
# SRC: non-GNU Makefile via make -f Makefile.ship Makefile.simple # SRC: Makefile.simple - non-GNU version
This is a non-GNU or simple Makefile designed for environments This is a non-GNU or simple Makefile designed for environments
that do not have a modern make command. that do not have a modern make command.
@@ -358,36 +351,15 @@ Makefile.simple
http://www.isthe.com/chongo/tech/comp/calc/calc-mirror.html 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 custom/Makefile
# SRC: Makefile via make -f Makefile custom/Makefile # SRC: Makefile via make -f Makefile custom/Makefile
This is the custom directory 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 in between custom/Makefile.head and custom/Makefile.tail
# end of host target cut
NOTE: The clobber rule does not remove this file. - XXX
custom/Makefile.simple custom/Makefile.simple
# SRC: non-GNU Makefile via make -f Makefile custom/Makefile.simple # SRC: custom/Makefile.simple - non-GNU version
This is a non-GNU or simple Makefile for the custom directory This is a non-GNU or simple Makefile for the custom directory
that is designed for environments that do not have a modern make that is designed for environments that do not have a modern make

View File

@@ -4606,7 +4606,7 @@ Makefile.simple: Makefile custom/Makefile.simple
${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}' \
Makefile | \ Makefile | \
${SED} -e 's/cd custom; $${MAKE} -f Makefile/&.simple/' \ ${SED} -e 's/cd custom; $${MAKE} -f Makefile/&.simple/' \
-e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \ -e 's;^# SRC:.*;# SRC: $@ - non-GNU version;' \
-e '/^ifeq /d' \ -e '/^ifeq /d' \
-e '/^ifneq /d' \ -e '/^ifneq /d' \
-e '/^ifdef /d' \ -e '/^ifdef /d' \

View File

@@ -4,7 +4,7 @@
# #
# Copyright (C) 1999-2018,2021 Landon Curt Noll # Copyright (C) 1999-2018,2021 Landon Curt Noll
# #
# SRC: non-GNU Makefile via # SRC: Makefile.simple - non-GNU version
# #
# The "# SRC: ... - ..." comment line above indicates # The "# SRC: ... - ..." comment line above indicates
# the origin of this file. # the origin of this file.
@@ -3911,7 +3911,7 @@ Makefile.simple: Makefile custom/Makefile.simple
${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}' \
Makefile | \ Makefile | \
${SED} -e 's/cd custom; $${MAKE} -f Makefile/&.simple/' \ ${SED} -e 's/cd custom; $${MAKE} -f Makefile/&.simple/' \
-e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \ -e 's;^# SRC:.*;# SRC: $@ - non-GNU version;' \
-e '/^ifeq /d' \ -e '/^ifeq /d' \
-e '/^ifneq /d' \ -e '/^ifneq /d' \
-e '/^ifdef /d' \ -e '/^ifdef /d' \

View File

@@ -735,6 +735,7 @@ Makefile.simple: Makefile ../Makefile
${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}' \
Makefile | \ Makefile | \
${SED} -e '/^# include start from top Makefile - keep /,$$d' \ ${SED} -e '/^# include start from top Makefile - keep /,$$d' \
-e 's;^# SRC:.*;# SRC: custom/$@ - non-GNU version;' \
-e '/^ifeq /d' \ -e '/^ifeq /d' \
-e '/^ifneq /d' \ -e '/^ifneq /d' \
-e '/^ifdef /d' \ -e '/^ifdef /d' \
@@ -747,7 +748,7 @@ Makefile.simple: Makefile ../Makefile
${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}' \
../Makefile | \ ../Makefile | \
${SED} -e '1,/^# include start from top Makefile - keep /d' \ ${SED} -e '1,/^# include start from top Makefile - keep /d' \
-e '/^# include end from top Makefile - keep /,$$d' \ -e '/^# include end from top Makefile - keep /,$$d' \
-e '/^ifeq /d' \ -e '/^ifeq /d' \
-e '/^ifneq /d' \ -e '/^ifneq /d' \
-e '/^ifdef /d' \ -e '/^ifdef /d' \

View File

@@ -4,7 +4,7 @@
# #
# 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 # SRC: custom/Makefile.simple - non-GNU version
# #
# The "# SRC: ... - ..." comment line above indicates # The "# SRC: ... - ..." comment line above indicates
# the origin of this file. # the origin of this file.