mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
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:
@@ -1,29 +1,17 @@
|
||||
#!/bin/make
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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
|
||||
# the terms of version 2.1 of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation.
|
||||
@@ -845,16 +833,30 @@ SCRIPTDIR= ${BINDIR}/cscript
|
||||
#
|
||||
T=
|
||||
|
||||
# where man pages are installed
|
||||
# where man section 1 pages are installed
|
||||
#
|
||||
# Select MANDIR= /dev/env/DJDIR/man/man1 for DJGPP.
|
||||
#
|
||||
# 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= /usr/local/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
|
||||
#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= /usr/man/u_man/man1
|
||||
#MANDIR= /usr/contrib/man/man1
|
||||
@@ -1248,6 +1250,11 @@ endif
|
||||
COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
|
||||
# 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 -=-=-=-=-=-#
|
||||
##############################################################################
|
||||
@@ -1357,10 +1364,8 @@ LIBCUSTCALC_STATIC=
|
||||
# This facility requires a Gnu Makefile, or a make command
|
||||
# that understands the += make operand.
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
COMMON_CFLAGS+= ${COMMON_ADD}
|
||||
COMMON_LDFLAGS+= ${COMMON_ADD}
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
#
|
||||
CCWARN= -Wall
|
||||
WNO_IMPLICT= -Wno-implicit
|
||||
@@ -1425,10 +1430,8 @@ LIBCUSTCALC_STATIC=
|
||||
# This facility requires a Gnu Makefile, or a make command
|
||||
# that understands the += make operand.
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
COMMON_CFLAGS+= ${COMMON_ADD}
|
||||
COMMON_LDFLAGS+= ${COMMON_ADD}
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
#
|
||||
CCWARN= -Wall
|
||||
WNO_IMPLICT= -Wno-implicit
|
||||
@@ -1495,10 +1498,8 @@ LIBCUSTCALC_STATIC=
|
||||
# This facility requires a Gnu Makefile, or a make command
|
||||
# that understands the += make operand.
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
COMMON_CFLAGS+= ${COMMON_ADD}
|
||||
COMMON_LDFLAGS+= ${COMMON_ADD}
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
#
|
||||
CCWARN= -Wall
|
||||
WNO_IMPLICT= -Wno-implicit
|
||||
@@ -1557,10 +1558,8 @@ LIBCUSTCALC_STATIC=
|
||||
# This facility requires a Gnu Makefile, or a make command
|
||||
# that understands the += make operand.
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
COMMON_CFLAGS+= ${COMMON_ADD}
|
||||
COMMON_LDFLAGS+= ${COMMON_ADD}
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
#
|
||||
CCWARN= -Wall
|
||||
WNO_IMPLICT= -Wno-implicit
|
||||
@@ -1613,10 +1612,8 @@ LD_STATIC=
|
||||
# This facility requires a Gnu Makefile, or a make command
|
||||
# that understands the += make operand.
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
COMMON_CFLAGS+= ${COMMON_ADD}
|
||||
COMMON_LDFLAGS+= ${COMMON_ADD}
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
#
|
||||
CCWARN= -Wall
|
||||
WNO_IMPLICT= -Wno-implicit
|
||||
@@ -1667,10 +1664,8 @@ LD_STATIC=
|
||||
# This facility requires a Gnu Makefile, or a make command
|
||||
# that understands the += make operand.
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
COMMON_CFLAGS+= ${COMMON_ADD}
|
||||
COMMON_LDFLAGS+= ${COMMON_ADD}
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
#
|
||||
CCWARN= -Wall
|
||||
WNO_IMPLICT= -Wno-implicit
|
||||
@@ -1824,10 +1819,8 @@ LD_STATIC=
|
||||
# This facility requires a Gnu Makefile, or a make command
|
||||
# that understands the += make operand.
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
COMMON_CFLAGS+= ${COMMON_ADD}
|
||||
COMMON_LDFLAGS+= ${COMMON_ADD}
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
#
|
||||
CCWARN= -Wall
|
||||
WNO_IMPLICT= -Wno-implicit
|
||||
@@ -1872,6 +1865,11 @@ LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
|
||||
#######################################################################
|
||||
#-=-=-=-=-=- 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
|
||||
|
||||
###############################################################################
|
||||
@@ -4269,11 +4267,15 @@ calcliblistfmt:
|
||||
custom/Makefile: ${MAKE_FILE} custom/Makefile.head custom/Makefile.tail
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
${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 \
|
||||
"/^# start of host target cut/,/^# end of host target cut/p" \
|
||||
${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 =-=-=-=-='
|
||||
|
||||
Makefile.simple: ${MAKE_FILE} custom/Makefile.simple
|
||||
@@ -4281,7 +4283,9 @@ Makefile.simple: ${MAKE_FILE} custom/Makefile.simple
|
||||
${Q} ${RM} -f $@
|
||||
${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \
|
||||
${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 'Makefile.simple:' >> $@
|
||||
${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@
|
||||
|
Reference in New Issue
Block a user