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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.