From: Marc Dionne Date: Fri, 6 Jan 2012 22:22:35 +0000 (-0500) Subject: libuafs: only rebuild h directory when needed X-Git-Tag: upstream/1.8.0_pre1^2~2850 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2caf0778ddeb6eeb854360cac20c6b3f0894f3eb;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/libuafs/Makefile.common.in b/src/libuafs/Makefile.common.in index 571aaf3e1..4bf9d77c5 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