Commits

Martin Scharrer committed 403fc21

Updated Makefile to determine version automatically.

Comments (0)

Files changed (1)

 export CONTRIBUTION VERSION NAME EMAIL SUMMARY DIRECTORY DONOTANNOUNCE ANNOUNCE NOTES LICENSE FREEVERSION FILE
 
 
+MAINDTX    = ${CONTRIBUTION}.dtx
+DTXFILES   = ${MAINDTX}
+INSFILES   = ${CONTRIBUTION}.ins
 SRCFILES   = ${CONTRIBUTION}.sty filemod-expmin.sty
 DOCFILES   = ${CONTRIBUTION}.pdf README
 PLAINFILES = ${CONTRIBUTION}.tex filemod-expmin.tex
 SCRIPTS    =
-CTANFILES  = ${SRCFILES} ${DOCFILES} \
+CTANFILES  = ${DTXFILES} ${INSFILES} ${DOCFILES} \
 			 $(addsuffix =tex/generic/${CONTRIBUTION}/, ${PLAINFILES}) \
 			 $(addsuffix =scripts/${CONTRIBUTION}/, ${SCRIPTS})
 	
 
 all: doc
 
-${FILE}: ${CONTRIBUTION}.dtx ${CONTRIBUTION}.ins ${CONTRIBUTION}.sty README ${CONTRIBUTION}.pdf
+${FILE}: ${CTANFILES}
 	${MAKE} --no-print-directory build
 
+
+upload: VERSION = $(strip $(shell grep '=\*VERSION' -A1 ${MAINDTX} | tail -n1))
+
 upload: ${FILE}
 	ctanupload -p
 
+
 doc: ${CONTRIBUTION}.pdf
 
 ${CONTRIBUTION}.pdf: ${CONTRIBUTION}.dtx ${SRCFILES} ${CONTRIBUTION}.ins