Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): clean up Makefile.boot
details: https://anonhg.NetBSD.org/src/rev/4b4cd32ccafe
branches: trunk
changeset: 936963:4b4cd32ccafe
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 09 15:54:13 2020 +0000
description:
make(1): clean up Makefile.boot
The previous version stopped working in 2015, when metachar.c was added.
Since then, lst.c and enum.c have been added, and the lst.lib directory
has gone.
To build bmake on Cygwin, some extra CFLAGS are necessary for some of
the files. Compilation succeeded by first building the majority of
files with "bmake -f Makefile.boot EXTRA_CFLAGS=-DMAKE_NATIVE", and the
remaining files with "-UMAKE_NATIVE".
Reorganize the file structure to put the most likely configuration into
the top paragraph, with all variable values nicely aligned.
diffstat:
usr.bin/make/Makefile.boot | 54 ++++++++++++++++++++-------------------------
1 files changed, 24 insertions(+), 30 deletions(-)
diffs (73 lines):
diff -r b170fb22239e -r 4b4cd32ccafe usr.bin/make/Makefile.boot
--- a/usr.bin/make/Makefile.boot Sun Aug 09 15:32:44 2020 +0000
+++ b/usr.bin/make/Makefile.boot Sun Aug 09 15:54:13 2020 +0000
@@ -1,45 +1,39 @@
-# $NetBSD: Makefile.boot,v 1.21 2014/02/24 07:23:44 skrll Exp $
+# $NetBSD: Makefile.boot,v 1.22 2020/08/09 15:54:13 rillig Exp $
#
-# a very simple makefile...
+# A very simple makefile...
#
# You only want to use this if you aren't running NetBSD.
#
-# modify MACHINE and MACHINE_ARCH as appropriate for your target architecture
+# Modify MACHINE and MACHINE_ARCH as appropriate for your target architecture.
+# See config.h and the various #ifdef directives for further configuration.
#
-CC=gcc -O -g
+
+PROG= bmake
+MACHINE= i386
+MACHINE_ARCH= i386
+CC= gcc
+CFLAGS= -O -g
+EXTRA_CFLAGS=
+EXTRA_LIBS=
+
+OBJS= arch.o buf.o compat.o cond.o dir.o enum.o for.o hash.o \
+ job.o lst.o main.o make.o make_malloc.o metachar.o parse.o \
+ str.o strlist.o suff.o targ.o trace.o var.o util.o
.c.o:
- ${CC} ${CFLAGS} -c $< -o $@
+ ${CC} ${CPPFLAGS} ${CFLAGS} ${EXTRA_CFLAGS} -c $< -o $@
-MACHINE=i386
-MACHINE_ARCH=i386
-# tested on HP-UX 10.20
-#MAKE_MACHINE=hppa
-#MAKE_MACHINE_ARCH=hppa
-CFLAGS= -DTARGET_MACHINE=\"${MACHINE}\" \
+CPPFLAGS= \
+ -DTARGET_MACHINE=\"${MACHINE}\" \
-DTARGET_MACHINE_ARCH=\"${MACHINE_ARCH}\" \
-DMAKE_MACHINE=\"${MACHINE}\"
-LIBS=
-OBJ=arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o main.o make.o \
- make_malloc.o parse.o str.o strlist.o suff.o targ.o trace.o var.o util.o
-
-LIBOBJ= lst.lib/lstAppend.o lst.lib/lstAtEnd.o lst.lib/lstAtFront.o \
- lst.lib/lstClose.o lst.lib/lstConcat.o lst.lib/lstDatum.o \
- lst.lib/lstDeQueue.o lst.lib/lstDestroy.o lst.lib/lstDupl.o \
- lst.lib/lstEnQueue.o lst.lib/lstFind.o lst.lib/lstFindFrom.o \
- lst.lib/lstFirst.o lst.lib/lstForEach.o lst.lib/lstForEachFrom.o \
- lst.lib/lstInit.o lst.lib/lstInsert.o lst.lib/lstIsAtEnd.o \
- lst.lib/lstIsEmpty.o lst.lib/lstLast.o lst.lib/lstMember.o \
- lst.lib/lstNext.o lst.lib/lstOpen.o lst.lib/lstRemove.o \
- lst.lib/lstReplace.o lst.lib/lstSucc.o lst.lib/lstPrev.o
-
-bmake: ${OBJ} ${LIBOBJ}
-# @echo 'make of make and make.0 started.'
- ${CC} ${CFLAGS} ${OBJ} ${LIBOBJ} -o bmake ${LIBS}
+${PROG}: ${OBJS}
+# @echo 'make of ${PROG} and make.0 started.'
+ ${CC} ${CFLAGS} ${OBJS} -o $@ ${EXTRA_LIBS}
@ls -l $@
# nroff -h -man make.1 > make.0
-# @echo 'make of make and make.0 completed.'
+# @echo 'make of ${PROG} and make.0 completed.'
clean:
- rm -f ${OBJ} ${LIBOBJ} ${PORTOBJ} bmake
+ rm -f ${OBJS} ${PROG}
Home |
Main Index |
Thread Index |
Old Index