Allow the build to be chatty or not. By default we're quiet. Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx> --- Makefile.in | 120 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 70 insertions(+), 50 deletions(-) diff --git a/Makefile.in b/Makefile.in index f8e1f58..eb84399 100644 --- a/Makefile.in +++ b/Makefile.in @@ -28,99 +28,119 @@ LIBNFS_OBJ = libnfs.o mount_client.o nfs_client.o mount_xdr.o nfs_xdr.o DB_OBJS = fileio.o util.o dbench.o child.o system.o snprintf.o sockio.o nfsio.o libnfs.a socklib.o @LINUXSCSI@ iscsi.o libiscsi.o @SMBO@ SRV_OBJS = util.o tbench_srv.o socklib.o +ifeq ($(V),1) + export Q= + export NQ=true +else + export Q=@ + export NQ=@echo +endif + all: dbench doc +%.o: %.c dbench.h + $(NQ) ' CC ' $@ + $(Q)$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< + dbench: $(DB_OBJS) - $(CC) $(CFLAGS) -o $@ $(DB_OBJS) $(LIBS) + $(NQ) ' LD ' $@ + $(Q)$(CC) $(CFLAGS) -o $@ $(DB_OBJS) $(LIBS) tbench_srv: $(SRV_OBJS) - $(CC) -o $@ $(SRV_OBJS) $(LIBS) + $(NQ) ' CC ' $@ + $(Q)$(CC) -o $@ $(SRV_OBJS) $(LIBS) tbench: dbench - ln -sf dbench tbench + $(NQ) ' LN ' $@ + $(Q)ln -sf dbench tbench libnfs.a: $(LIBNFS_OBJ) - @echo Creating library $@ - ar r libnfs.a $(LIBNFS_OBJ) - ranlib libnfs.a + $(NQ) ' AR ' $@ + $(Q)ar r libnfs.a $(LIBNFS_OBJ) + $(Q)ranlib libnfs.a nfsio.o: nfsio.c mount.h nfs.h - @echo Compiling $@ - gcc -g $(CFLAGS) -c nfsio.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) -c nfsio.c -o $@ libnfs.o: libnfs.c libnfs.h mount.h nfs.h - @echo Compiling $@ - gcc -g $(CFLAGS) -c libnfs.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) -c libnfs.c -o $@ mount.h: mount.x - @echo Generating $@ - rpcgen -h mount.x > mount.h + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -h mount.x > mount.h nfs.h: nfs.x - @echo Generating $@ - rpcgen -h nfs.x > nfs.h + $(NQ) ' CC ' $@ + $(Q)rpcgen -h nfs.x > nfs.h mount_xdr.o: mount_xdr.c mount.h - @echo Compiling $@ - gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_xdr.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_xdr.c -o $@ mount_xdr.c: mount.x - @echo Generating $@ - rpcgen -c mount.x > mount_xdr.c + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -c mount.x > mount_xdr.c mount_client.o: mount_client.c mount.h - @echo Compiling $@ - gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_client.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_client.c -o $@ mount_client.c: mount.x - @echo Generating $@ - rpcgen -l mount.x > mount_client.c + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -l mount.x > mount_client.c nfs_xdr.o: nfs_xdr.c nfs.h - @echo Compiling $@ - gcc $(CFLAGS) $(CFLAGS_RPCGEN) -g -c nfs_xdr.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc $(CFLAGS) $(CFLAGS_RPCGEN) -g -c nfs_xdr.c -o $@ nfs_xdr.c: nfs.x - @echo Generating $@ - rpcgen -c nfs.x > nfs_xdr.c + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -c nfs.x > nfs_xdr.c nfs_client.o: nfs_client.c nfs.h - @echo Compiling $@ - gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c nfs_client.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c nfs_client.c -o $@ nfs_client.c: nfs.x - @echo Generating $@ - rpcgen -l nfs.x > nfs_client.c + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -l nfs.x > nfs_client.c doc/dbench.1.html: doc/dbench.1.xml - -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< + $(NQ) 'GEN-HTML ' $@ + $(Q)-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< doc/dbench.1: doc/dbench.1.xml - -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + $(NQ) 'GEN-MAN ' $@ + $(Q)-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< doc: doc/dbench.1 doc/dbench.1.html # Careful here: don't install client.txt over itself. install: all - mkdir -p $(DESTDIR)$(bindir) - mkdir -p $(DESTDIR)$(docdir)/loadfiles - mkdir -p $(DESTDIR)$(mandir)/man1 - ${INSTALLCMD} dbench $(DESTDIR)$(bindir) - ${INSTALLCMD} loadfiles/client.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/nfs.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/nfs_2.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/smb.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/smb_1.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/smb_2.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/smb_3.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/iscsi.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/scsi.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} -m644 dbench.1 $(DESTDIR)$(mandir)/man1 + $(NQ) ' INSTALL ' $@ + $(Q)mkdir -p $(DESTDIR)$(bindir) + $(Q)mkdir -p $(DESTDIR)$(docdir)/loadfiles + $(Q)(mkdir -p $(DESTDIR)$(mandir)/man1 + $(Q)${INSTALLCMD} dbench $(DESTDIR)$(bindir) + $(Q)${INSTALLCMD} loadfiles/client.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/nfs.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/nfs_2.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/smb.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/smb_1.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/smb_2.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/smb_3.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/iscsi.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/scsi.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} -m644 dbench.1 $(DESTDIR)$(mandir)/man1 clean: - rm -f *.[ao] *~ dbench tbench_srv - rm -f mount.h mount_xdr.c mount_client.c - rm -f nfs.h nfs_xdr.c nfs_client.c + $(NQ) ' CLEAN ' $@ + $(Q)rm -f *.[ao] *~ dbench tbench_srv + $(Q)rm -f mount.h mount_xdr.c mount_client.c + $(Q)rm -f nfs.h nfs_xdr.c nfs_client.c proto: - ./mkproto.pl *.c > proto.h + $(NQ) ' MKPROTO ' $@ + $(Q)./mkproto.pl *.c > proto.h -- 2.34.1