2015-11-20 11:16:42 +01:00
|
|
|
################################################################
|
|
|
|
# make a zip for CTAN submission including the TeX directory structure.
|
|
|
|
#
|
|
|
|
# The overall procedure is to run make in this directory $(HERE) and then
|
|
|
|
# export it to a temporary directory $(EXPORTED) without all the generated
|
|
|
|
# files. On this directory we run "make ctanext" (see below) which makes a
|
|
|
|
# CTAN-compliant directory structure, and zips it up to the file
|
|
|
|
# <package>.ctan.zip which can be submitted to the CTAN maintainers.
|
|
|
|
#
|
|
|
|
# Note that part of the CTAN submission is a zip file with a TDS-compliant
|
|
|
|
# directory struture, which is generated by running "make tdsext" (see below)
|
2015-11-20 11:19:18 +01:00
|
|
|
# on $(EXPORTED).
|
|
|
|
#
|
|
|
|
# Note furthermore, that this Makefile only
|
2015-11-20 11:16:42 +01:00
|
|
|
################################################################
|
|
|
|
|
2015-01-16 09:34:15 +01:00
|
|
|
HERE = $(shell pwd)
|
2015-01-16 08:52:34 +01:00
|
|
|
TMP = /tmp
|
2015-01-15 14:30:31 +01:00
|
|
|
TDSCOLL = proposal
|
2015-01-16 08:56:06 +01:00
|
|
|
EXPORTED = $(TMP)/$(TDSCOLL).exp
|
2015-01-16 08:52:34 +01:00
|
|
|
TDSDIR = $(TMP)/$(TDSCOLL).tds
|
|
|
|
TDSZIP = $(TMP)/$(TDSCOLL).tds.zip
|
2015-01-16 08:56:06 +01:00
|
|
|
CTANDIR = $(TMP)/$(TDSCOLL)
|
2015-01-16 09:43:17 +01:00
|
|
|
CTANZIP = $(TMP)/$(TDSCOLL).ctan.zip
|
2015-11-20 10:26:54 +01:00
|
|
|
MAKE = make
|
2014-02-15 12:01:14 +01:00
|
|
|
|
|
|
|
# this target makes the file CTANZIP by creating and populating the directory
|
|
|
|
# CTANDIR and zipping it. To be current, we first make all, and update
|
|
|
|
# the filedates and the checksums. To get rid of all the junk we commit and
|
|
|
|
# export a clean copy EXPORTED, on which we run the target ctanexp below,
|
|
|
|
# which generates a directory CTANDIR, which we zip and move into place.
|
2015-11-20 11:22:29 +01:00
|
|
|
ctan: all #filedate checksum *******
|
2015-01-15 14:30:31 +01:00
|
|
|
git commit -am'draining just to be sure for CTAN distribution'
|
2015-11-20 10:13:17 +01:00
|
|
|
# git push
|
2014-02-15 12:01:14 +01:00
|
|
|
rm -Rf $(EXPORTED)
|
|
|
|
@echo "exporting a clean copy to $(EXPORTED)"
|
2015-01-16 09:37:45 +01:00
|
|
|
cd $(TMP); git clone $(HERE); mv LaTeX-proposal $(EXPORTED)
|
2015-01-15 14:37:06 +01:00
|
|
|
rm -Rf $(EXPORTED)/.git
|
2015-01-16 09:37:45 +01:00
|
|
|
rm $(EXPORTED)/.gitignore
|
|
|
|
cd $(EXPORTED); $(MAKE) -$(MAKEFLAGS) ctanext
|
|
|
|
@echo "zipping the result to $(TDSCOLL).ctan.zip"
|
2015-01-16 09:41:09 +01:00
|
|
|
cd $(TMP); zip -r -q $(CTANZIP) $(TDSCOLL); cp $(CTANZIP) $(HERE)
|
2015-11-20 10:15:08 +01:00
|
|
|
# rm -Rf $(EXPORTED) $(CTANDIR) $(CTANZIP)
|
2014-02-15 12:01:14 +01:00
|
|
|
|
|
|
|
# this target is run on EXPORTED. It first makes the target tdsext below,
|
|
|
|
# and then copies all necessary stuff into CTANDIR.
|
|
|
|
ctanext: tdsext
|
|
|
|
rm -Rf $(CTANDIR) $(CTANZIP)
|
|
|
|
@echo " preparing a copy $(CTANDIR) from $(EXPORTED)"
|
|
|
|
mkdir -p $(CTANDIR)
|
|
|
|
cp $(TDSZIP) $(CTANDIR)
|
|
|
|
@for d in $(DTXDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) lctan) done
|
|
|
|
@for d in $(SRCDIRS) $(DOCDIRS); do (cp -R $$d $(CTANDIR)) done;
|
2015-01-16 08:47:11 +01:00
|
|
|
cp $(TDSZIP) Makefile $(CTANDIR)
|
|
|
|
cp $(TDS.doc) $(CTANDIR)/README
|
2014-02-15 12:01:14 +01:00
|
|
|
rm -Rf $(TDSZIP)
|
|
|
|
|
|
|
|
# this target makes the file TDSZIP by creating and populating the directory
|
|
|
|
# TDSDIR and zipping it.
|
|
|
|
tdsext:
|
|
|
|
@echo "making a TDS compliant archive"
|
|
|
|
rm -Rf $(TDSDIR) $(TDSZIP)
|
|
|
|
@echo " enabling checksums"
|
2015-11-20 10:12:37 +01:00
|
|
|
# $(MAKE) -$(MAKEFLAGS) enablechecksum *******
|
2014-02-15 12:01:14 +01:00
|
|
|
@echo " copying over stuff to $(TDSDIR)"
|
2015-11-20 10:34:40 +01:00
|
|
|
@echo " ... from $(DTXDIRS)"
|
2014-02-15 12:01:14 +01:00
|
|
|
@for d in $(DTXDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) ltds) done
|
2015-11-20 10:34:40 +01:00
|
|
|
@echo " ... and $(SRCDIRS)"
|
2014-02-15 12:01:14 +01:00
|
|
|
@for d in $(SRCDIRS); do (cp -R $$d $(TDSDIR)/source/latex/$(TDSCOLL)) done;
|
2015-11-20 10:34:40 +01:00
|
|
|
@echo " ... and $(DOCDIRS)"
|
2014-02-15 12:01:14 +01:00
|
|
|
@for d in $(DOCDIRS); do (cp -R $$d $(TDSDIR)/doc/latex/$(TDSCOLL)) done;
|
2015-11-20 10:34:40 +01:00
|
|
|
@echo " ... and finally $(TDS.doc)"
|
2014-02-15 12:01:14 +01:00
|
|
|
cp $(TDS.doc) $(TDSDIR)/doc/latex/$(TDSCOLL)
|
|
|
|
@echo "zipping the result to $(TDSCOLL).tds.zip"
|
|
|
|
cd $(TDSDIR); zip -r -q $(TDSZIP) .; cd -
|
2015-11-20 10:32:03 +01:00
|
|
|
# rm -Rf $(TDSDIR)
|
2014-02-15 12:01:14 +01:00
|
|
|
|
2015-11-20 11:19:18 +01:00
|
|
|
echo:
|
2015-11-20 11:21:37 +01:00
|
|
|
@echo $(DTXDIRS)
|
2014-02-15 12:01:14 +01:00
|
|
|
|