1
# dist.mk -- making distribution tar files.
2
@MAINT@top_distdir = $(distname)-$(version)
3
@MAINT@top_files = RELNOTES Makefile.in configure.in configure selfautofix
4
@MAINT@libs_distdir = $(top_distdir)/libs
5
@MAINT@libs_files = EXTRA.LIB configure.in configure
6
@MAINT@texk_distdir = $(top_distdir)/texk
7
@MAINT@texk_files = ChangeLog Makefile.in README configure.in configure \
8
@MAINT@ install.sh libtool.m4 config.guess config.sub ltmain.sh \
9
@MAINT@ mkinstalldirs add-info-toc rename unbackslsh.awk withenable.ac
10
@MAINT@distdir = $(texk_distdir)/$(distname)
11
@MAINT@kpathsea_distdir = ../$(distname)/$(texk_distdir)/kpathsea
12
@MAINT@ln_files = AUTHORS ChangeLog INSTALL NEWS README *.in *.h *.c \
13
@MAINT@ configure *.mk
15
@MAINT@dist_rm_predicate = -name Makefile
16
@MAINT@dist: all depend pre-dist-$(distname)
17
@MAINT@ rm -rf $(top_distdir)*
18
@MAINT@ mkdir -p $(distdir)
19
@MAINT@ top_files="$(top_files)"; \
20
@MAINT@ for f in $$top_files; do \
21
@MAINT@ ln $(top_srcdir)/../../$$f $(top_distdir); done
22
@MAINT@ cp -pr $(top_srcdir)/../../config $(top_distdir)
23
@MAINT@ mkdir -p $(libs_distdir)
24
@MAINT@ libs_files="$(libs_files)"; \
25
@MAINT@ for f in $$libs_files; do \
26
@MAINT@ ln $(top_srcdir)/../../libs/$$f $(libs_distdir); done
27
@MAINT@ cd .. && $(MAKE) Makefile ./configure
28
@MAINT@ cd .. && ln $(texk_files) $(distname)/$(texk_distdir)
29
@MAINT@ cp -p $(top_srcdir)/../dir $(texk_distdir)
30
@MAINT@ -ln $(ln_files) $(distdir)
31
@MAINT@ ln $(program_files) $(distdir)
32
@MAINT@ cd $(kpathsea_dir); $(MAKE) distdir=$(kpathsea_distdir) \
33
@MAINT@ ln_files='$(ln_files)' distdir
34
@MAINT@ cp -pr ../make ../etc ../djgpp $(texk_distdir)
35
@MAINT@ rm -rf $(texk_distdir)/make/CVS
36
@MAINT@ rm -rf $(texk_distdir)/etc/CVS
37
@MAINT@ rm -rf $(texk_distdir)/etc/autoconf/CVS
38
@MAINT@ rm -rf $(texk_distdir)/djgpp/CVS
39
@MAINT@# Remove the extra files our patterns got us.
40
@MAINT@ cd $(texk_distdir); rm -f */c-auto.h
41
@MAINT@ find $(top_distdir) \( $(dist_rm_predicate) \) -exec rm '{}' \;
42
@MAINT@ find $(top_distdir) -name \.*texi -exec egrep -ni ' | ::|xx[^}]' \;
43
@MAINT@# Now handle the contrib dir.
44
@MAINT@ mkdir -p $(texk_distdir)/contrib && \
45
@MAINT@ cp -p ../contrib/{ChangeLog,INSTALL,README,*.c,*.h} \
46
@MAINT@ $(texk_distdir)/contrib
47
@MAINT@ $(MAKE) post-dist-$(distname)
48
@MAINT@ cd $(distdir); test ! -r *.info || touch *.info*
49
@MAINT@ chmod -R a+rX,u+w $(top_distdir)
50
@MAINT@ GZIP=-9 tar chzf $(top_distdir).tar.gz $(top_distdir)
51
@MAINT@ rm -rf $(top_distdir)