tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: design of SUBST_STAGE=post-install behavior?



 >>  > Try make reinstall.
 >> 
 >> Does this do something other than 'make deinstall; make install'?

> Yes, it cleans up the cookie and e.g. makes sure that the PLIST is
> rebuilt.

How about "rebuild" target for the same purpose but for build phase?

The following patch works fine for pkgsrc-2009Q2.
For pkgsrc-current additional change is needed
("rebuild" target is not visible).

Index: build/build.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/build/build.mk,v
retrieving revision 1.19
diff -u -r1.19 build.mk
--- build/build.mk      10 Jan 2009 15:59:29 -0000      1.19
+++ build/build.mk      15 Sep 2009 19:21:32 -0000
@@ -93,6 +93,26 @@
 .endif
 
 ######################################################################
+### rebuild (PUBLIC)
+######################################################################
+### rebuild is a special target to re-run the build target.
+###
+
+.PHONY: rebuild
+.if !target(rebuild)
+rebuild: build-clean build
+.endif
+
+######################################################################
+### build-clean (PRIVATE)
+######################################################################
+### build-clean removes the state files for the "build" and
+### later phases so that the "build" target may be re-invoked.
+###
+build-clean: .PHONY install-clean
+       ${RUN} ${RM} -f ${PLIST} ${_COOKIE.build}
+
+######################################################################
 ### real-build (PRIVATE)
 ######################################################################
 ### real-build is a helper target onto which one can hook all of the

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index