LaTeX-proposal/lib/Makefile.ctan

76 lines
2.9 KiB
Makefile
Raw Normal View History

2014-02-15 12:01:14 +01:00
# make a zip for CTAN submission including the TeX directory structure
HERE = $(shell pwd)
TMP = /tmp
TDSCOLL = proposal
EXPORTED = $(TMP)/$(TDSCOLL).exp
TDSDIR = $(TMP)/$(TDSCOLL).tds
TDSZIP = $(TMP)/$(TDSCOLL).tds.zip
CTANDIR = $(TMP)/$(TDSCOLL)
CTANZIP = $(TMP)/$(TDSCOLL).ctan.zip
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.
ctan: all# filedate checksum *******
git commit -am'draining just to be sure for CTAN distribution'
# git push
2014-02-15 12:01:14 +01:00
rm -Rf $(EXPORTED)
@echo "exporting a clean copy to $(EXPORTED)"
cd $(TMP); git clone $(HERE); mv LaTeX-proposal $(EXPORTED)
rm -Rf $(EXPORTED)/.git
rm $(EXPORTED)/.gitignore
cd $(EXPORTED); $(MAKE) -$(MAKEFLAGS) ctanext
@echo "zipping the result to $(TDSCOLL).ctan.zip"
cd $(TMP); zip -r -q $(CTANZIP) $(TDSCOLL); cp $(CTANZIP) $(HERE)
# 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;
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"
# $(MAKE) -$(MAKEFLAGS) enablechecksum *******
2014-02-15 12:01:14 +01:00
@echo " copying over stuff to $(TDSDIR)"
@echo " ... from $(DTXDIRS)"
2014-02-15 12:01:14 +01:00
@for d in $(DTXDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) ltds) done
@echo " ... and $(SRCDIRS)"
2014-02-15 12:01:14 +01:00
@for d in $(SRCDIRS); do (cp -R $$d $(TDSDIR)/source/latex/$(TDSCOLL)) done;
@echo " ... and $(DOCDIRS)"
2014-02-15 12:01:14 +01:00
@for d in $(DOCDIRS); do (cp -R $$d $(TDSDIR)/doc/latex/$(TDSCOLL)) done;
@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 -
# rm -Rf $(TDSDIR)
2014-02-15 12:01:14 +01:00
# copy stuff around for the TDS in the DTX dirs
ltds:
@echo "copying stuff for the subdirs"
2015-09-05 10:33:49 +02:00
@for d in $(DISTDIRS); do (cd $$d; $(MAKE) -$(MAKEFLAGS) $@) done
2014-02-15 12:01:14 +01:00
cp $(TDS.tex) $(TDSDIR)/tex/latex/$(TDSCOLL)
cp $(TDS.doc) $(TDSDIR)/doc/latex/$(TDSCOLL)
# copy stuff around for a CTAN submission in the DTX dirs
lctan:
mkdir -p $(CTANDIR)/sty;
@for d in $(DISTDIRS); do (cp -R $$d $(CTANDIR)/sty) done
cp $(TDS.tex) $(TDS.doc) Makefile $(CTANDIR)/sty