[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/fence/agents/apc_snmp Makefile fence_a ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	kupcevic sourceware org	2007-03-06 15:20:21

Modified files:
	fence/agents/apc_snmp: Makefile 
Removed files:
	fence/agents/apc_snmp: fence_apc_snmp 

Log message:
	Fix fence_apc_snmp build process

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/apc_snmp/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/apc_snmp/fence_apc_snmp.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.2&r2=NONE

--- cluster/fence/agents/apc_snmp/Attic/Makefile	2006/05/17 15:36:53	1.1.2.3
+++ cluster/fence/agents/apc_snmp/Attic/Makefile	2007/03/06 15:20:21	1.1.2.4
@@ -11,18 +11,33 @@
 ###############################################################################
 
 top_srcdir=../..
-
 UNINSTALL=${top_srcdir}/scripts/uninstall.pl
-
 include ${top_srcdir}/make/defines.mk
 
-RESOURCES=fence_apc_snmp powernet369.mib README_SNMP
 
-all: ${RESOURCES}
+SOURCE= fence_apc_snmp.py
+TARGET= fence_apc_snmp
+
+RESOURCES = powernet369.mib README_SNMP
+
+
+all: $(TARGET) ${RESOURCES}
+
+$(TARGET): $(SOURCE)
+	: > $(TARGET)
+	awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(SOURCE) >> $(TARGET)
+	echo "FENCE_RELEASE_NAME=\"${RELEASE}\";" >> $(TARGET)
+	${top_srcdir}/scripts/define2var ${top_srcdir}/config/copyright.cf sh REDHAT_COPYRIGHT >> $(TARGET)
+	echo "BUILD_DATE=\"(built `date`)\";" >> $(TARGET)
+	awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
+	chmod +x $(TARGET)
 
 copytobin: all
-	cp ${RESOURCES} ${top_srcdir}/bin/${TARGET}
+	for v in $(TARGET) ${RESOURCES}; do \
+		cp $${v} ${top_srcdir}/bin/$${v}; \
+	done
+
 
 .PHONY: clean
 clean:
-
+	rm -f $(TARGET)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]