aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-03-08 20:32:00 +0100
committerDuncaen <mail@duncano.de>2017-03-08 20:32:00 +0100
commit5b3d69ca765c9251f60b29dfc4a12c83ba7a23f7 (patch)
treea1b41b82c0d1014f76e2b31456f98b013aff3c69
parentaa56f5a57a246125f4d438c753b47b93f8ddab2c (diff)
downloadlobase-5b3d69ca765c9251f60b29dfc4a12c83ba7a23f7.tar.gz
mk: cleanup build log
-rw-r--r--config.mk.in3
-rw-r--r--lib/libopenbsd/Makefile2
-rw-r--r--lib/libopenbsd/Makefile.inc4
-rw-r--r--lib/libopenbsd/net/Makefile.inc2
-rw-r--r--mk/bsd.lib.mk21
-rw-r--r--mk/bsd.prog.mk16
-rw-r--r--usr.bin/awk/Makefile10
-rw-r--r--usr.bin/tsort/Makefile3
8 files changed, 37 insertions, 24 deletions
diff --git a/config.mk.in b/config.mk.in
index 7512b30..4e8c820 100644
--- 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
index d24b4a3..cdd1d8d 100644
--- 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
index c4b6a38..eeca0e4 100644
--- 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
index 92ecca5..34efb61 100644
--- 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
index b72d0e1..2b9c922 100644
--- 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
index 099c84a..8ed90b5 100644
--- 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
index ca0a97a..b6f5eff 100644
--- 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
index dfd639c..f217002 100644
--- 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