From: Mark Huang Date: Thu, 12 Aug 2004 21:21:31 +0000 (+0000) Subject: - fix case where we have a tagged package, but override DATE on the X-Git-Tag: planetlab-2_0-branch-point~11 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3e060b562996eac5702a1658f529773aa6e5f095;p=build.git - fix case where we have a tagged package, but override DATE on the command line --- diff --git a/Makerules b/Makerules index 231e1638..0515def2 100644 --- a/Makerules +++ b/Makerules @@ -32,7 +32,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# $Id: Makerules,v 1.8 2004/08/11 20:47:48 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.9 2004/08/11 21:41:16 mlh-pl_rpm Exp $ # # Base cvsps and rpmbuild in the current directory @@ -164,7 +164,9 @@ endif # Build # -RPMFLAGS += $(if $(DATE),--define "date $(DATE)") +ifeq ($(TAG),HEAD) +RPMFLAGS += --define "date $(DATE)" +endif NVR := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) ARCH := $(shell rpmquery $(RPMFLAGS) --queryformat '%{ARCH}\n' --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) diff --git a/Rules.mk b/Rules.mk index 231e1638..0515def2 100644 --- a/Rules.mk +++ b/Rules.mk @@ -32,7 +32,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# $Id: Makerules,v 1.8 2004/08/11 20:47:48 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.9 2004/08/11 21:41:16 mlh-pl_rpm Exp $ # # Base cvsps and rpmbuild in the current directory @@ -164,7 +164,9 @@ endif # Build # -RPMFLAGS += $(if $(DATE),--define "date $(DATE)") +ifeq ($(TAG),HEAD) +RPMFLAGS += --define "date $(DATE)" +endif NVR := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) ARCH := $(shell rpmquery $(RPMFLAGS) --queryformat '%{ARCH}\n' --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1)