lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit 5b3d69ca765c9251f60b29dfc4a12c83ba7a23f7
parent aa56f5a57a246125f4d438c753b47b93f8ddab2c
Author: Duncaen <mail@duncano.de>
Date:   Wed,  8 Mar 2017 20:32:00 +0100

mk: cleanup build log

Diffstat:
config.mk.in | 3+++
lib/libopenbsd/Makefile | 2--
lib/libopenbsd/Makefile.inc | 4++--
lib/libopenbsd/net/Makefile.inc | 2+-
mk/bsd.lib.mk | 21+++++++++++++--------
mk/bsd.prog.mk | 16+++++++++++-----
usr.bin/awk/Makefile | 10++++++----
usr.bin/tsort/Makefile | 3+--
8 files changed, 37 insertions(+), 24 deletions(-)

diff --git a/config.mk.in b/config.mk.in @@ -1,3 +1,5 @@ +ifndef _CONFIG_MK +_CONFIG_MK=1 prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ @@ -29,3 +31,4 @@ HAVE_FGETLN=@HAVE_FGETLN@ HAVE_GETENTROPY=@HAVE_GETENTROPY@ HAVE_EXPLICIT_BZERO=@HAVE_EXPLICIT_BZERO@ HAVE_REALLOCARRAY=@HAVE_REALLOCARRAY@ +endif diff --git a/lib/libopenbsd/Makefile b/lib/libopenbsd/Makefile @@ -3,8 +3,6 @@ LIB=openbsd -# CPPFLAGS += -include include/compat.h -include config.h - SRCS+= closefrom.c \ heapsort.c merge.c pledge-noop.c progname.c \ qsort.c radixsort.c random.c readpassphrase.c \ diff --git a/lib/libopenbsd/Makefile.inc b/lib/libopenbsd/Makefile.inc @@ -8,7 +8,7 @@ all: @echo "need to define LIBCSRCDIR" >&2; exit 1 endif -CFLAGS+=-I${LIBCSRCDIR}/include -I${LIBCSRCDIR}/hidden -D__LIBC__ \ +CPPFLAGS+=-I${LIBCSRCDIR}/include -I${LIBCSRCDIR}/hidden -D__LIBC__ \ -Werror-implicit-function-declaration -include namespace.h #.if ${COMPILER_VERSION:L} != "gcc3" @@ -16,7 +16,7 @@ CFLAGS+=-Werror=deprecated-declarations #.endif # Include link-time warnings about unsafe API uses (ie. strcpy) -CFLAGS+=-DAPIWARN +CPPCFLAGS+=-DAPIWARN include ${LIBCSRCDIR}/gen/Makefile.inc include ${LIBCSRCDIR}/crypt/Makefile.inc diff --git a/lib/libopenbsd/net/Makefile.inc b/lib/libopenbsd/net/Makefile.inc @@ -3,6 +3,6 @@ # net sources VPATH+= ${LIBCSRCDIR}/net -CFLAGS+=-DRESOLVSORT +CPPCFLAGS+=-DRESOLVSORT SRCS+= base64.c diff --git a/mk/bsd.lib.mk b/mk/bsd.lib.mk @@ -29,19 +29,24 @@ else $(STATICLIB) : % : %.o endif -y.tab.h y.tab.c: - $(YACC) -d $< +y.tab.h y.tab.c: $(YFILES) + @echo $(YACC) -d $(^F) + @$(YACC) -d $^ -%.o: %.y y.tab.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c y.tab.c -o $@ +%.c: %.l + @echo "$(LEX) $(<F) > $(@F)" + @$(LEX) -t $< > $@ %.o: %.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ + @echo $(CC) -c $(CFLAGS) $(<F) + @$(CC) -c $(CFLAGS) $(CPPFLAGS) $< $(STATICLIB): - rm -f $@ - $(AR) rc $@ $(OBJS) - $(RANLIB) $@ + @rm -f $@ + @echo $(AR) $@ $(^F) + @$(AR) rc $@ $(^F) + @echo $(RANLIB) $@ + @$(RANLIB) $@ clean: _SUBDIRUSE rm -f $(STATICLIB) $(OBJS) diff --git a/mk/bsd.prog.mk b/mk/bsd.prog.mk @@ -37,17 +37,23 @@ else $(PROG) : % : %.o endif +$(LFILES:.l=.o) : %.o : %.c + y.tab.h y.tab.c: $(YFILES) - $(YACC) -d $^ + @echo $(YACC) -d $(^F) + @$(YACC) -d $^ -%.o: %.y y.tab.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c y.tab.c -o $@ +%.c: %.l + @echo "$(LEX) -t $(LFLAGS) $(<F) > $(@F)" + $(LEX) -t $(LFLAGS) $< > $@ %.o: %.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ + @echo $(CC) -c $(CFLAGS) $(<F) + @$(CC) -c $(CFLAGS) $(CPPFLAGS) $< $(PROG): - $(CC) $^ -o $@ $(LDFLAGS) + @echo $(CC) -o $(@F) $(^F) $(LDADD) + @$(CC) -o $@ $^ $(LDPATHS) $(LDFLAGS) clean: ifdef SRCS diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile @@ -15,16 +15,18 @@ CPPFLAGS+=-D_GNU_SOURCE lex.o b.o main.o tran.o run.o parse.o lib.o : ytab.h ytab.c: awkgram.y - ${YACC} -d ${.CURDIR}/awkgram.y - mv y.tab.c ytab.c + @echo ${YACC} -d awkgram.y + @${YACC} -d ${.CURDIR}/awkgram.y + @mv y.tab.c ytab.c ytab.h: ytab.c - mv y.tab.h ytab.h + @mv y.tab.h ytab.h proctab.c: maketab ./maketab >proctab.c maketab: ytab.h maketab.c - ${HOSTCC} ${HOSTCFLAGS} ${.CURDIR}/maketab.c -o $@ + @echo ${HOSTCC} maketab.c -o $(@F) + @${HOSTCC} ${HOSTCFLAGS} ${.CURDIR}/maketab.c -o $@ include ${.TOPDIR}/mk/bsd.prog.mk diff --git a/usr.bin/tsort/Makefile b/usr.bin/tsort/Makefile @@ -7,7 +7,6 @@ SRCS = tsort.c CDIAGFLAGS = -Wall -Wno-char-subscripts -Wstrict-prototypes -pedantic -W DPADD += ${LIBUTIL} -LDADD += -L$(TOPDIR)/lib/libutil -lutil -CPPFLAGS+=-I$(TOPDIR)/lib/libutil +LDADD += -lutil include ${.TOPDIR}/mk/bsd.prog.mk