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?



I did not test, but like a following patch?


Index: subst.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/subst.mk,v
retrieving revision 1.53
diff -u -r1.53 subst.mk
--- subst.mk    26 Jan 2008 15:23:21 -0000      1.53
+++ subst.mk    14 Sep 2009 00:44:39 -0000
@@ -136,3 +136,11 @@
        done
        ${RUN} ${TOUCH} ${TOUCH_FLAGS} ${.TARGET:Q}
 .endfor
+
+.PHONY: subst-post-install-clean
+subst-post-install-clean:
+.for _class_ in ${SUBST_CLASSES}
+.  if defined(SUBST_STAGE.${_class_}) && 
!empty(SUBST_STAGE.${_class_}:Mpost-install)
+      ${RUN} ${RM} -f ${_SUBST_COOKIE.${_class_}}
+.  endif
+.endfor
Index: install/install.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/install/install.mk,v
retrieving revision 1.54
diff -u -r1.54 install.mk
--- install/install.mk  2 Sep 2009 22:05:42 -0000       1.54
+++ install/install.mk  14 Sep 2009 00:44:39 -0000
@@ -380,5 +380,5 @@
 ### install-clean removes the state files for the "install" and
 ### later phases so that the "install" target may be re-invoked.
 ###
-install-clean: .PHONY package-clean check-clean _flavor-install-clean
+install-clean: .PHONY package-clean check-clean _flavor-install-clean 
subst-post-install-clean
        ${RUN} ${RM} -f ${PLIST} ${_COOKIE.install} ${_DEPENDS_PLIST}

--
"Of course I love NetBSD":-)
OBATA Akio / obache%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index