Added dist target
This commit is contained in:
parent
04f3bf68a0
commit
4f33260308
37
Makefile.in
37
Makefile.in
|
@ -1,6 +1,40 @@
|
|||
SCX=@SCX@
|
||||
ORION-WM=orion-wm
|
||||
|
||||
enough: $(ORION-WM)
|
||||
|
||||
# --------------------
|
||||
# Distribution...
|
||||
|
||||
distdir = /tmp
|
||||
|
||||
# DISTFILES should include all sources.
|
||||
DISTFILES = COPYING INSTALL README configure configure.in Makefile.in \
|
||||
src/*.scm doc/*.html
|
||||
|
||||
distname = $(ORION-WM)-0.1
|
||||
|
||||
.PHONY : dist
|
||||
dist:
|
||||
distname=$(distname) && \
|
||||
distfile=$(distdir)/$$distname.tar.gz && \
|
||||
if [ -d $(distdir) ] && \
|
||||
[ -w $$distfile -o -w $(distdir) ]; then \
|
||||
rm -f $$distname && \
|
||||
ln -s . $$distname && \
|
||||
files='' && \
|
||||
for i in $(DISTFILES); do \
|
||||
files="$$files $$distname/$$i"; \
|
||||
done && \
|
||||
tar -cf - $$files | \
|
||||
gzip --best >$$distfile && \
|
||||
rm $$distname; \
|
||||
else \
|
||||
echo "Can't write $$distfile" >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
|
||||
$(ORION-WM): Makefile
|
||||
script=$(ORION-WM) && \
|
||||
echo "#!$(SCX) \\" > $$script && \
|
||||
|
@ -8,3 +42,6 @@ $(ORION-WM): Makefile
|
|||
echo '!#' >> $$script && \
|
||||
echo '(start)' >> $$script && \
|
||||
chmod 755 $$script
|
||||
|
||||
clean:
|
||||
rm -f $(ORION-WM)
|
Loading…
Reference in New Issue