add new dist target

Fri, 29 Sep 2023 20:07:20 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 29 Sep 2023 20:07:20 +0200
changeset 69
186e41b332d9
parent 68
ae763178ee1e
child 70
8de477fe19eb

add new dist target

Makefile file | annotate | diff | comparison | revisions
src/Makefile file | annotate | diff | comparison | revisions
src/cline.h file | annotate | diff | comparison | revisions
     1.1 --- a/Makefile	Fri Sep 22 23:26:23 2023 +0200
     1.2 +++ b/Makefile	Fri Sep 29 20:07:20 2023 +0200
     1.3 @@ -21,13 +21,18 @@
     1.4  # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     1.5  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     1.6  
     1.7 +VERSION=1.4.1
     1.8  
     1.9  all: build config.mk FORCE
    1.10 -	@cd src && $(MAKE) -s
    1.11 +	@cd src && $(MAKE) -s VERSION=$(VERSION)
    1.12  
    1.13 -install: build config.mk FORCE
    1.14 +install:
    1.15  	@cd src && $(MAKE) -s install
    1.16  
    1.17 +dist:
    1.18 +	tar -czf cline-$(VERSION).tar.gz -Hustar \
    1.19 +		README LICENSE Makefile configure make src test
    1.20 +
    1.21  build:
    1.22  	@mkdir -p build
    1.23  
     2.1 --- a/src/Makefile	Fri Sep 22 23:26:23 2023 +0200
     2.2 +++ b/src/Makefile	Fri Sep 29 20:07:20 2023 +0200
     2.3 @@ -41,6 +41,6 @@
     2.4  
     2.5  $(BUILD_DIR)/%.o: %.c
     2.6  	echo "Compiling $<"
     2.7 -	$(CC) $(CFLAGS) -c -o $@ $<
     2.8 +	$(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -c -o $@ $<
     2.9  
    2.10 -FORCE:
    2.11 \ No newline at end of file
    2.12 +FORCE:
     3.1 --- a/src/cline.h	Fri Sep 22 23:26:23 2023 +0200
     3.2 +++ b/src/cline.h	Fri Sep 29 20:07:20 2023 +0200
     3.3 @@ -27,7 +27,9 @@
     3.4  #ifndef CLINE_H_
     3.5  #define CLINE_H_
     3.6  
     3.7 -#define VERSION "1.4.1"
     3.8 +#ifndef VERSION
     3.9 +#error "VERSION macro must be set by build system"
    3.10 +#endif
    3.11  
    3.12  #include "stdinc.h"
    3.13  #include "settings.h"

mercurial