]> Dogcows Code - chaz/yoink/blobdiff - Makefile
archiving support for releases
[chaz/yoink] / Makefile
index 9a0099550635212f5db05199854b86d741e2ab1a..caf10e3daf15bdb421f14dba85d0536f7948c48e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 # Use this file with make to compile and install Yoink.
 #
 # This makefile supports these targets:
-#   all, install, clean, cleandist, run, debug
+#   all, install, clean, distclean, run, debug, dist, dist-gzip, dist-bzip2
 #
 # This build system incorporates the ideas written by Emile van Bergen:
 # http://www.xs4all.nl/~evbergen/nonrecursive-make.html
@@ -24,8 +24,7 @@ have_config := $(wildcard config.mk)
 ifneq ($(strip $(have_config)),)
 include config.mk
 else
-no_config:
-       $(error You must run the configure script before you can make anything)
+$(error You must run the configure script before you can make anything)
 endif
 
 
@@ -67,7 +66,7 @@ include $(dir)/rules.mk
 #
 
 ifeq ($(DEP_TRACKING),true)
-COMPILE = ./build/compile.lua
+COMPILE = ./tools/compile.lua
 endif
 
 COMMAND_CC         = $(COMPILE) $(CC)  $(CFLAGS)    $(CF_TGT) -o $@ -c $<
@@ -78,7 +77,7 @@ COMMAND_CCLD       = $(COMPILE) $(CC)  $(CFLAGS)    $(CF_TGT) $(LDFLAGS) $(LF_TG
 COMMAND_CXXLD      = $(COMPILE) $(CXX) $(CXXFLAGS)  $(CF_TGT) $(LDFLAGS) $(LF_TGT) -o $@ $< $(LL_TGT) $(LIBS)
 COMMAND_AR         = $(AR) rcs $@ $^;  $(RANLIB)    $@
 COMMAND_RC         = $(WINDRES)        $(DDEFINES)  $(DF_TGT) -o $@ -i $<
-COMMAND_INSTALL    = ./build/install.sh -m $1 $2 -d $3
+COMMAND_INSTALL    = ./tools/install.sh -m $1 $2 -d $3
 COMMAND_RM         = rm -f $1
 COMMAND_IN         = sed -f config.sed <"$1" >"$2"
 
@@ -150,7 +149,9 @@ clean:
 
 .PHONY: distclean
 distclean: clean
+       $(call DO_RM,config.h)
        $(call DO_RM,config.mk)
+       $(call DO_RM,config.sed)
 
 .PHONY: all_
 all_: $(BINARIES) $(MANPAGES)
@@ -186,6 +187,17 @@ uninstall:
                $(call remove_silencer,$(call DO_RM,$(DESTDIR)$(datadir)$$base)); \
        done
 
+.PHONY: dist-bzip2
+dist-bzip2:
+       $(SHELL_LINE_PREFIX)git archive HEAD --prefix='$(TARNAME)/' | bzip2 > "$(TARNAME).tar.bz2"
+
+.PHONY: dist-gzip
+dist-gzip:
+       $(SHELL_LINE_PREFIX)git archive HEAD --prefix='$(TARNAME)/' | gzip > "$(TARNAME).tar.gz"
+
+.PHONY: dist
+dist: dist-bzip2
+
 
 #
 # Prevent make from removing any build targets.
This page took 0.022941 seconds and 4 git commands to generate.