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.
Reviewed-on: http://gerrit.openafs.org/6519
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit
2caf0778ddeb6eeb854360cac20c6b3f0894f3eb)
Change-Id: Id4ccad953669538072b834a6aa49b8beaeeeed35
Reviewed-on: http://gerrit.openafs.org/6526
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
clean:
-$(RM) -rf UAFS* JUAFS* AFSWEB* nsapi des afs afsint config rx
-$(RM) -rf h
- -$(RM) linktest $(AFS_OS_CLEAN)
+ -$(RM) -f linktest $(AFS_OS_CLEAN)
install: UAFS/$(LIBUAFS) JUAFS/$(LIBJUAFS)
${INSTALL} -d ${DESTDIR}${libdir}
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