- # Remove Halibut output files in the source directory (may
- # have been created by running, for example, `build/halibut
- # inputs/test.but').
- rm -f *.html output.*
+ rm -f *.html output.* *.tar.gz
+
+# Make a release archive. If $(VERSION) is specified, this will
+# also contain a `manifest' file which will be used to decide the
+# version number automatically.
+release:
+ find . -name CVS -prune -o -name build -prune -o -name reltmp -prune \
+ -o -type d -exec mkdir -p reltmp/$(RELDIR)/{} \;
+ find . -name CVS -prune -o -name build -prune -o -name reltmp -prune \
+ -o -name '*.orig' -prune -o -name '*.rej' -prune \
+ -o -name '*.txt' -prune -o -name '*.html' -prune \
+ -o -name '*.1' -prune -o -name '.cvsignore' -prune \
+ -o -name '*.gz' -prune -o -name '.[^.]*' -prune \
+ -o -type f -exec ln -s $(PWD)/{} reltmp/$(RELDIR)/{} \;
+ if test "x$(VERSION)y" != "xy"; then \
+ (cd reltmp/$(RELDIR); \
+ find . -name '*.[ch]' -exec md5sum {} \; \
+ ) > reltmp/$(RELDIR)/manifest; \
+ echo "-DVERSION=\"$(VERSION)\"" > reltmp/$(RELDIR)/version; \
+ fi
+ tar chzvCf reltmp - $(RELDIR) > $(RELDIR).tar.gz
+ rm -rf reltmp
+