Ship with Makefile.simple & custom/Makefile.simple

This commit is contained in:
Landon Curt Noll
2021-12-08 14:55:23 -08:00
parent 265713778f
commit e5c8f00adc
8 changed files with 7958 additions and 24 deletions

2
.gitignore vendored
View File

@@ -6,7 +6,6 @@
# #
.dynamic .dynamic
.hsrc .hsrc
Makefile.simple
NOTES NOTES
align32.h align32.h
args.h args.h
@@ -29,7 +28,6 @@ cscript/powerterm
cscript/simple cscript/simple
cscript/square cscript/square
custom/.all custom/.all
custom/Makefile.simple
custom/libcustcalc* custom/libcustcalc*
endian endian
endian_calc.h endian_calc.h

View File

@@ -51,6 +51,10 @@ The following are the changes from calc version 2.14.0.11 to date:
Please also add notes to the 'Compiling calc under Windows 11' Please also add notes to the 'Compiling calc under Windows 11'
section in README.WINDOWS file. section in README.WINDOWS file.
We added Makefile.simple as part of the master branch source
to help those who may be using a make tool that does not support
GNU Make-like features such as "ifeq" and ":=".
The following are the changes from calc version 2.14.0.9 to 2.14.0.10: The following are the changes from calc version 2.14.0.9 to 2.14.0.10:

View File

@@ -784,17 +784,17 @@ calcliblistfmt:
${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: custom/Makefile: Makefile ${MAKE_FILE} custom/Makefile.head custom/Makefile.tail
${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-=' ${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-='
${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 =-=-=-=-='
Makefile.simple: Makefile.simple: Makefile ${MAKE_FILE}
${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-=' ${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-='
${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: custom/Makefile.simple: Makefile ${MAKE_FILE} custom/Makefile
${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-=' ${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-='
${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 =-=-=-=-='

View File

@@ -4469,21 +4469,42 @@ custom/Makefile: ${MAKE_FILE} custom/Makefile.head custom/Makefile.tail
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} $@;' >> $@ -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: Makefile Makefile.ship custom/Makefile.simple
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
${Q} ${RM} -f $@ ${Q} if [ -f $@.bak ]; then \
echo "$@.bak exists, remove or move it"; \
exit 1; \
else \
${TRUE}; \
fi
-${Q} if [ -f $@ ]; then \
${MV} -f $@ $@.bak; \
fi
${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} | \ Makefile.ship | \
${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 Makefile via;' \
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} $@;' > $@ -e 's;via$$;via ${MAKE} -f $@ $@;' > $@
${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 '"\\" >> $@
${Q} echo ' $${CP} -f $${MAKE_FILE} $$@; fi' >> $@ ${Q} echo ' $${CP} -f $$@ $$@; fi' >> $@
-${Q} if [ -s $@.bak ]; then \
if ${CMP} -s $@.bak $@; then \
echo 'top level $@ was already up to date'; \
echo 'restoring original $@'; \
${MV} -f $@.bak $@; \
else \
echo 'old $@ is now $@.bak'; \
echo 'updated top level $@ formed'; \
echo 'try: diff -u $@.bak $@'; \
fi; \
else \
echo 'new top level $@ formed'; \
fi
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
custom/Makefile.simple: custom/Makefile custom/Makefile.simple: Makefile Makefile.ship custom/Makefile
${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} Makefile.simple ${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} Makefile.simple
#endif /* end of skip for non-Gnu makefiles */ #endif /* end of skip for non-Gnu makefiles */
@@ -5035,7 +5056,6 @@ clobber: clean
${RM} -f no_implicit.arg ${RM} -f no_implicit.arg
${RM} -f no_implicit.c no_implicit.o no_implicit${EXT} ${RM} -f no_implicit.c no_implicit.o no_implicit${EXT}
#if 0 /* start of skip for non-Gnu makefiles */ #if 0 /* start of skip for non-Gnu makefiles */
${RM} -f Makefile.simple
${RM} -f custom/Makefile ${RM} -f custom/Makefile
-${MAKE} -f ${MAKE_FILE} custom/Makefile -${MAKE} -f ${MAKE_FILE} custom/Makefile
#endif /* end of skip for non-Gnu makefiles */ #endif /* end of skip for non-Gnu makefiles */

6460
Makefile.simple Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1273,11 +1273,19 @@ calcliblist: ${CALCLIBLIST}
done done
#if 0 /* start of skip for non-Gnu makefiles */ #if 0 /* start of skip for non-Gnu makefiles */
Makefile.simple: ${MAKE_FILE} Makefile.simple: Makefile ../Makefile ../Makefile.ship
${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-='
${Q} ${RM} -f $@ ${Q} if [ -f $@.bak ]; then \
echo "custom/$@.bak exists, remove or move it"; \
exit 1; \
else \
${TRUE}; \
fi
-${Q} if [ -f $@ ]; then \
${MV} -f $@ $@.bak; \
fi
${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} | \ Makefile | \
${GREP} -v '#\.#' | \ ${GREP} -v '#\.#' | \
${SED} -e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \ ${SED} -e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} custom/$@;' > $@ -e 's;via$$;via ${MAKE} -f ${MAKE_FILE} custom/$@;' > $@
@@ -1285,6 +1293,19 @@ Makefile.simple: ${MAKE_FILE}
${Q} echo 'Makefile.simple:' >> $@ ${Q} echo 'Makefile.simple:' >> $@
${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@ ${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@
${Q} echo ' $${CP} -f $${MAKE_FILE} $$@; fi' >> $@ ${Q} echo ' $${CP} -f $${MAKE_FILE} $$@; fi' >> $@
-${Q} if [ -s $@.bak ]; then \
if ${CMP} -s $@.bak $@; then \
echo 'custom/$@ was already up to date'; \
echo 'restoring original custom/$@'; \
${MV} -f $@.bak $@; \
else \
echo 'old custom/$@ is now custom/$@.bak'; \
echo 'updated custom/$@ formed'; \
echo 'try: diff -u custom/$@.bak custom/$@'; \
fi; \
else \
echo 'new custom/$@ formed'; \
fi
${V} echo '=-=-=-=-= custom/${MAKE_FILE} end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= custom/${MAKE_FILE} end of $@ rule =-=-=-=-='
#endif /* end of skip for non-Gnu makefiles */ #endif /* end of skip for non-Gnu makefiles */
@@ -1421,9 +1442,6 @@ clobber: clean
${RM} -f libcustcalc* ${RM} -f libcustcalc*
${RM} -rf skel ${RM} -rf skel
${V} echo remove files that are obsolete ${V} echo remove files that are obsolete
#if 0 /* start of skip for non-Gnu makefiles */
${RM} -f Makefile.simple
#endif /* end of skip for non-Gnu makefiles */
-${Q} if [ -e .DS_Store ]; then \ -${Q} if [ -e .DS_Store ]; then \
echo ${RM} -rf .DS_Store; \ echo ${RM} -rf .DS_Store; \
${RM} -rf .DS_Store; \ ${RM} -rf .DS_Store; \

1416
custom/Makefile.simple Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -159,11 +159,19 @@ calcliblist: ${CALCLIBLIST}
done done
#if 0 /* start of skip for non-Gnu makefiles */ #if 0 /* start of skip for non-Gnu makefiles */
Makefile.simple: ${MAKE_FILE} Makefile.simple: Makefile ../Makefile ../Makefile.ship
${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-='
${Q} ${RM} -f $@ ${Q} if [ -f $@.bak ]; then \
echo "custom/$@.bak exists, remove or move it"; \
exit 1; \
else \
${TRUE}; \
fi
-${Q} if [ -f $@ ]; then \
${MV} -f $@ $@.bak; \
fi
${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} | \ Makefile | \
${GREP} -v '#\.#' | \ ${GREP} -v '#\.#' | \
${SED} -e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \ ${SED} -e 's;^# SRC:.*;# SRC: non-GNU Makefile via;' \
-e 's;via$$;via ${MAKE} -f ${MAKE_FILE} custom/$@;' > $@ -e 's;via$$;via ${MAKE} -f ${MAKE_FILE} custom/$@;' > $@
@@ -171,6 +179,19 @@ Makefile.simple: ${MAKE_FILE}
${Q} echo 'Makefile.simple:' >> $@ ${Q} echo 'Makefile.simple:' >> $@
${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@ ${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@
${Q} echo ' $${CP} -f $${MAKE_FILE} $$@; fi' >> $@ ${Q} echo ' $${CP} -f $${MAKE_FILE} $$@; fi' >> $@
-${Q} if [ -s $@.bak ]; then \
if ${CMP} -s $@.bak $@; then \
echo 'custom/$@ was already up to date'; \
echo 'restoring original custom/$@'; \
${MV} -f $@.bak $@; \
else \
echo 'old custom/$@ is now custom/$@.bak'; \
echo 'updated custom/$@ formed'; \
echo 'try: diff -u custom/$@.bak custom/$@'; \
fi; \
else \
echo 'new custom/$@ formed'; \
fi
${V} echo '=-=-=-=-= custom/${MAKE_FILE} end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= custom/${MAKE_FILE} end of $@ rule =-=-=-=-='
#endif /* end of skip for non-Gnu makefiles */ #endif /* end of skip for non-Gnu makefiles */
@@ -307,9 +328,6 @@ clobber: clean
${RM} -f libcustcalc* ${RM} -f libcustcalc*
${RM} -rf skel ${RM} -rf skel
${V} echo remove files that are obsolete ${V} echo remove files that are obsolete
#if 0 /* start of skip for non-Gnu makefiles */
${RM} -f Makefile.simple
#endif /* end of skip for non-Gnu makefiles */
-${Q} if [ -e .DS_Store ]; then \ -${Q} if [ -e .DS_Store ]; then \
echo ${RM} -rf .DS_Store; \ echo ${RM} -rf .DS_Store; \
${RM} -rf .DS_Store; \ ${RM} -rf .DS_Store; \