From 2caf0778ddeb6eeb854360cac20c6b3f0894f3eb Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Fri, 6 Jan 2012 17:22:35 -0500 Subject: [PATCH] libuafs: only rebuild h directory when needed A few changes to allow a "make all ; sudo make install ; make all..." workflow to work without manually removing files in between. Make the rebuilding of the h directory dependent on the source files scanned to build it. This prevents it from being rebuilt for every "make install". While we're here, use -f when removing linktest for the clean target. This allows "make clean" to remove it without prompting when the user doesn't have write access to the file, as is the case when make install rebuilds it as root. Change-Id: I45b34ad41560ef8c905e6be4201fa438a3cc7bc3 Reviewed-on: http://gerrit.openafs.org/6519 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/libuafs/Makefile.common.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libuafs/Makefile.common.in b/src/libuafs/Makefile.common.in index 571aaf3..4bf9d77 100644 --- a/src/libuafs/Makefile.common.in +++ b/src/libuafs/Makefile.common.in @@ -2068,7 +2068,7 @@ $(PERLUAFS)/ukernel.so: $(PERLUAFS)/ukernel_swig_perl.o UAFS.pic/libuafs_pic.a clean: -$(RM) -rf UAFS* JUAFS* AFSWEB* PERLUAFS nsapi afsd afs afsint config rx -$(RM) -rf h - -$(RM) linktest $(AFS_OS_CLEAN) + -$(RM) -f linktest $(AFS_OS_CLEAN) install: UAFS/$(LIBUAFS) JUAFS/$(LIBJUAFS) UAFS.pic/libuafs_pic.a \ @LIBUAFS_BUILD_PERL@ @@ -2129,11 +2129,13 @@ JUAFS: AFSWEB: mkdir -p $@ -setup_common: - -$(RM) -f nsapi afsd +h: $(TOP_SRC_AFS)/*.c $(TOP_SRC_VNOPS)/*.c $(TOP_SRC_RX)/*.c -$(RM) -rf h @TOP_SRCDIR@/libuafs/make_h_tree.pl $(TOP_SRC_AFS) $(TOP_SRC_VNOPS) \ $(TOP_SRC_RX) + +setup_common: h + -$(RM) -f nsapi afsd -ln -s $(TOP_SRCDIR)/afsd afsd -ln -s $(NS_INCL) nsapi -- 1.9.4