Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

cleanup buildsys, remove config.mk

  • Loading branch information...
commit a0a6528c4f384ea86aa0107de52e1f948a6b8c86 1 parent 07f3322
Dave Reisner authored

Showing 5 changed files with 18 additions and 29 deletions. Show diff stats Hide diff stats

  1. +11 11 Makefile
  2. +5 6 burp.c
  3. +0 12 config.mk
  4. +1 0  curl.c
  5. +1 0  util.c
22 Makefile
... ... @@ -1,17 +1,18 @@
1 1 # burp - seamless AUR uploading
2 2
3   -include config.mk
  3 +VERSION = $(shell git describe)
  4 +
  5 +CFLAGS += -std=c99 -g -pedantic -Wall -Wextra -Werror ${CPPFLAGS}
  6 +CPPFLAGS += -DVERSION=\"${VERSION}\"
  7 +LDFLAGS += -lcurl
  8 +
  9 +PREFIX = /local/usr
4 10
5 11 SRC = burp.c conf.c curl.c util.c
6 12 OBJ = ${SRC:.c=.o}
7 13
8 14 all: burp doc
9 15
10   -.c.o:
11   - ${CC} -c ${CFLAGS} $<
12   -
13   -${OBJ}: config.mk
14   -
15 16 burp: ${OBJ}
16 17 ${CC} -o $@ ${OBJ} ${LDFLAGS}
17 18
@@ -21,10 +22,9 @@ burp.1: README.pod
21 22
22 23 dist: clean
23 24 mkdir -p burp-${VERSION}
24   - cp -R ${SRC} *.h README.pod Makefile bash_completion burp-${VERSION}
25   - sed "s/^VERSION.*/VERSION = ${VERSION}/g" < config.mk > burp-${VERSION}/config.mk
26   - tar -cf burp-${VERSION}.tar burp-${VERSION}
27   - gzip burp-${VERSION}.tar
  25 + cp -R ${SRC} *.h README.pod bash_completion burp-${VERSION}
  26 + sed "s/^VERSION *.*/VERSION = ${VERSION}/" < Makefile > burp-${VERSION}/Makefile
  27 + tar -czf burp-${VERSION}.tar.gz burp-${VERSION}
28 28 ${RM} -r burp-${VERSION}
29 29
30 30 clean:
@@ -36,7 +36,7 @@ strip: burp
36 36 install: burp doc
37 37 install -Dm755 burp ${DESTDIR}${PREFIX}/bin/burp
38 38 install -Dm644 bash_completion ${DESTDIR}/etc/bash_completion.d/burp
39   - install -Dm644 burp.1 ${DESTDIR}${MANPREFIX}/man1/burp.1
  39 + install -Dm644 burp.1 ${DESTDIR}/share/man/man1/burp.1
40 40
41 41 uninstall:
42 42 ${RM} ${DESTDIR}${PREFIX}/bin/burp
11 burp.c
@@ -24,6 +24,7 @@
24 24 * OTHER DEALINGS IN THE SOFTWARE.
25 25 */
26 26
  27 +#define _GNU_SOURCE
27 28 #include <errno.h>
28 29 #include <getopt.h>
29 30 #include <limits.h>
@@ -53,14 +54,13 @@ static int read_config_file(void);
53 54 static void usage(void);
54 55 static void usage_categories(void);
55 56
56   -
57 57 /* structures */
58 58 typedef struct __category_t {
59 59 const char *name;
60 60 int num;
61 61 } category_t;
62 62
63   -static category_t categories[] = {
  63 +static const category_t categories[] = {
64 64 { "daemons", 2 }, { "devel", 3 }, { "editors", 4 },
65 65 { "emulators", 5 }, { "games", 6 }, { "gnome", 7 },
66 66 { "i18n", 8 }, { "kde", 9 }, { "kernels", 19 },
@@ -79,9 +79,8 @@ int category_is_valid(const char *cat) {
79 79 return res ? res->num : -1;
80 80 }
81 81
82   -long cookie_expire_time(const char *cookie_file,
83   - const char *domain,
84   - const char *name) {
  82 +long cookie_expire_time(const char *cookie_file, const char *domain,
  83 + const char *name) {
85 84 FILE *fp;
86 85 long expire;
87 86 char cdomain[256], cname[256];
@@ -122,7 +121,7 @@ long cookie_expire_time(const char *cookie_file,
122 121 return expire;
123 122 }
124 123
125   -int fn_cmp_cat (const void *c1, const void *c2) {
  124 +int fn_cmp_cat(const void *c1, const void *c2) {
126 125 category_t *cat1 = (category_t*)c1;
127 126 category_t *cat2 = (category_t*)c2;
128 127
12 config.mk
... ... @@ -1,12 +0,0 @@
1   -# burp version
2   -VERSION = $(shell git describe)
3   -
4   -# paths
5   -PREFIX = /usr
6   -MANPREFIX = ${PREFIX}/share/man
7   -
8   -CC ?= gcc
9   -CFLAGS += -std=c99 -g -pedantic -Wall -Wextra -Werror ${CPPFLAGS}
10   -CPPFLAGS += -D_GNU_SOURCE -DVERSION=\"${VERSION}\"
11   -LDFLAGS += -lcurl
12   -
1  curl.c
@@ -24,6 +24,7 @@
24 24 * OTHER DEALINGS IN THE SOFTWARE.
25 25 */
26 26
  27 +#define _GNU_SOURCE
27 28 #include <stdio.h>
28 29 #include <stdlib.h>
29 30 #include <string.h>
1  util.c
@@ -24,6 +24,7 @@
24 24 * OTHER DEALINGS IN THE SOFTWARE.
25 25 */
26 26
  27 +#define _GNU_SOURCE
27 28 #include <ctype.h>
28 29 #include <fcntl.h>
29 30 #include <limits.h>

0 comments on commit a0a6528

Please sign in to comment.
Something went wrong with that request. Please try again.