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 <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
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@
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