Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup buildsys, remove config.mk

  • Loading branch information...
commit a0a6528c4f384ea86aa0107de52e1f948a6b8c86 1 parent 07f3322
@falconindy authored
Showing with 18 additions and 29 deletions.
  1. +11 −11 Makefile
  2. +5 −6 burp.c
  3. +0 −12 config.mk
  4. +1 −0  curl.c
  5. +1 −0  util.c
View
22 Makefile
@@ -1,17 +1,18 @@
# burp - seamless AUR uploading
-include config.mk
+VERSION = $(shell git describe)
+
+CFLAGS += -std=c99 -g -pedantic -Wall -Wextra -Werror ${CPPFLAGS}
+CPPFLAGS += -DVERSION=\"${VERSION}\"
+LDFLAGS += -lcurl
+
+PREFIX = /local/usr
SRC = burp.c conf.c curl.c util.c
OBJ = ${SRC:.c=.o}
all: burp doc
-.c.o:
- ${CC} -c ${CFLAGS} $<
-
-${OBJ}: config.mk
-
burp: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
@@ -21,10 +22,9 @@ burp.1: README.pod
dist: clean
mkdir -p burp-${VERSION}
- cp -R ${SRC} *.h README.pod Makefile bash_completion burp-${VERSION}
- sed "s/^VERSION.*/VERSION = ${VERSION}/g" < config.mk > burp-${VERSION}/config.mk
- tar -cf burp-${VERSION}.tar burp-${VERSION}
- gzip burp-${VERSION}.tar
+ cp -R ${SRC} *.h README.pod bash_completion burp-${VERSION}
+ sed "s/^VERSION *.*/VERSION = ${VERSION}/" < Makefile > burp-${VERSION}/Makefile
+ tar -czf burp-${VERSION}.tar.gz burp-${VERSION}
${RM} -r burp-${VERSION}
clean:
@@ -36,7 +36,7 @@ strip: burp
install: burp doc
install -Dm755 burp ${DESTDIR}${PREFIX}/bin/burp
install -Dm644 bash_completion ${DESTDIR}/etc/bash_completion.d/burp
- install -Dm644 burp.1 ${DESTDIR}${MANPREFIX}/man1/burp.1
+ install -Dm644 burp.1 ${DESTDIR}/share/man/man1/burp.1
uninstall:
${RM} ${DESTDIR}${PREFIX}/bin/burp
View
11 burp.c
@@ -24,6 +24,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#define _GNU_SOURCE
#include <errno.h>
#include <getopt.h>
#include <limits.h>
@@ -53,14 +54,13 @@ static int read_config_file(void);
static void usage(void);
static void usage_categories(void);
-
/* structures */
typedef struct __category_t {
const char *name;
int num;
} category_t;
-static category_t categories[] = {
+static const category_t categories[] = {
{ "daemons", 2 }, { "devel", 3 }, { "editors", 4 },
{ "emulators", 5 }, { "games", 6 }, { "gnome", 7 },
{ "i18n", 8 }, { "kde", 9 }, { "kernels", 19 },
@@ -79,9 +79,8 @@ int category_is_valid(const char *cat) {
return res ? res->num : -1;
}
-long cookie_expire_time(const char *cookie_file,
- const char *domain,
- const char *name) {
+long cookie_expire_time(const char *cookie_file, const char *domain,
+ const char *name) {
FILE *fp;
long expire;
char cdomain[256], cname[256];
@@ -122,7 +121,7 @@ long cookie_expire_time(const char *cookie_file,
return expire;
}
-int fn_cmp_cat (const void *c1, const void *c2) {
+int fn_cmp_cat(const void *c1, const void *c2) {
category_t *cat1 = (category_t*)c1;
category_t *cat2 = (category_t*)c2;
View
12 config.mk
@@ -1,12 +0,0 @@
-# burp version
-VERSION = $(shell git describe)
-
-# paths
-PREFIX = /usr
-MANPREFIX = ${PREFIX}/share/man
-
-CC ?= gcc
-CFLAGS += -std=c99 -g -pedantic -Wall -Wextra -Werror ${CPPFLAGS}
-CPPFLAGS += -D_GNU_SOURCE -DVERSION=\"${VERSION}\"
-LDFLAGS += -lcurl
-
View
1  curl.c
@@ -24,6 +24,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
View
1  util.c
@@ -24,6 +24,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#define _GNU_SOURCE
#include <ctype.h>
#include <fcntl.h>
#include <limits.h>
Please sign in to comment.
Something went wrong with that request. Please try again.