Version 0.25
[automake.git] / dist.am
blob02480b6adc69c1e54e71b78d419bac8537e60b17
1 ## See dist-subd-top.am to understand this file.
2 distdir = $(PACKAGE)-$(VERSION)
3 dist: $(DISTFILES)
4         rm -rf $(distdir)
5         mkdir $(distdir)
6         (cd $(srcdir) && automake --include-deps --output-dir=$(distdir))
7         @for file in $(DISTFILES); do           \
8           test -f $(distdir)/$$file || {        \
9             echo linking $$file;                \
10             ln $(srcdir)/$$file $(distdir)/$$file; \
11           } || {                                \
12             echo copying $$file instead;        \
13             cp -p $(srcdir)/$$file $(distdir)/$$file; \
14           };                                    \
15         done
16         @sublist="$(DIST_SUBDIRS)";             \
17         for dir in $$sublist; do                \
18           echo copying directory $$dir;         \
19           tar -chof - $$dir | (cd $(distdir) && tar -xBpf -); \
20         done
21         chmod -R a+r $(distdir)
22         tar -chozf $(distdir).tar.gz $(distdir)
23         rm -rf $(distdir)