All: switch version declaration using header to makefile.

makes imports a little cleaner
master
Drake 3 years ago
parent 4b3f1c5b64
commit 0a059278c7
No known key found for this signature in database
GPG Key ID: 9B83455BD94F12A3

@ -1,3 +1,4 @@
VERSION=\"0.2.1\"
ifndef CC
CC = gcc
endif
@ -22,7 +23,7 @@ ${PROGS}: %: src/%.c
@#for some idiotic reason, i can't define 2 `all` targets, one of which can make this directory
@mkdir -p bin
@echo Building $@..
@${CC} -o bin/$@ ${CC_FLAGS} $<
@${CC} -o bin/$@ -D DRAKECU_VERSION=${VERSION} ${CC_FLAGS} $<
.PHONY: debug
debug: CC_FLAGS:=-g -O0 -v ${CC_FLAGS}

@ -1 +0,0 @@
#define DRAKECU_VERSION "0.2.1"

@ -5,7 +5,6 @@
#include <pwd.h>
#include <sys/utsname.h>
#include "version.h"
/*
arch - prints the current machine's architecture

@ -5,8 +5,6 @@
#include <pwd.h>
#include <libgen.h>
#include "version.h"
/*
whoami - prints the working user's username (unless --uid is specified)
Available arguments:

@ -11,7 +11,6 @@
#include <linux/limits.h>
#include "ansi-colour.h"
#include "version.h"
/*
ls - print all files and directories in working directory

@ -4,7 +4,6 @@
#include <limits.h>
#include <pwd.h>
#include "version.h"
/*
whoami - prints the working user's username (unless --uid is specified)

@ -7,8 +7,6 @@
#include <sys/utsname.h>
#include "version.h"
/*
whoami - prints the working user's username (unless --uid is specified)
Available arguments:

@ -4,8 +4,6 @@
#include <sys/types.h>
#include <pwd.h>
#include "version.h"
/*
whoami - prints the working user's username (unless --uid is specified)
Available arguments:

@ -5,8 +5,6 @@
#include <pwd.h>
#include <stdlib.h>
#include "version.h"
/*
yes - spams a message (by default `y`) to stdout.
Available arguments:

Loading…
Cancel
Save