# HG changeset patch # User Mike Becker # Date 1696010840 -7200 # Node ID 186e41b332d9c10598f8e1eff413817a71a6f825 # Parent ae763178ee1ed38637c79387ec0985b5b6f1e167 add new dist target diff -r ae763178ee1e -r 186e41b332d9 Makefile --- a/Makefile Fri Sep 22 23:26:23 2023 +0200 +++ b/Makefile Fri Sep 29 20:07:20 2023 +0200 @@ -21,13 +21,18 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +VERSION=1.4.1 all: build config.mk FORCE - @cd src && $(MAKE) -s + @cd src && $(MAKE) -s VERSION=$(VERSION) -install: build config.mk FORCE +install: @cd src && $(MAKE) -s install +dist: + tar -czf cline-$(VERSION).tar.gz -Hustar \ + README LICENSE Makefile configure make src test + build: @mkdir -p build diff -r ae763178ee1e -r 186e41b332d9 src/Makefile --- a/src/Makefile Fri Sep 22 23:26:23 2023 +0200 +++ b/src/Makefile Fri Sep 29 20:07:20 2023 +0200 @@ -41,6 +41,6 @@ $(BUILD_DIR)/%.o: %.c echo "Compiling $<" - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -c -o $@ $< -FORCE: \ No newline at end of file +FORCE: diff -r ae763178ee1e -r 186e41b332d9 src/cline.h --- a/src/cline.h Fri Sep 22 23:26:23 2023 +0200 +++ b/src/cline.h Fri Sep 29 20:07:20 2023 +0200 @@ -27,7 +27,9 @@ #ifndef CLINE_H_ #define CLINE_H_ -#define VERSION "1.4.1" +#ifndef VERSION +#error "VERSION macro must be set by build system" +#endif #include "stdinc.h" #include "settings.h"