File: Makefile

package info (click to toggle)
ctdb 1.12%2Bgit20120201-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,656 kB
  • sloc: ansic: 61,736; sh: 18,367; xml: 3,887; python: 1,220; makefile: 554; perl: 319; awk: 118
file content (23 lines) | stat: -rw-r--r-- 914 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CFLAGS=-Wall -g -I../../include/ -I../../lib/talloc/ -I../../lib/tdb/include/ -I../../lib/util/
LDLIBS=-lreadline

USAGE_SOURCES := $(shell grep -l 'XML Argument' *.c)
HELP_SOURCES := $(shell grep -l 'XML Help' *.c)

ctdb-test: $(patsubst %.c,%.o,$(wildcard *.c)) generated-usage.o ../../talloc.o ../../common/check.o ../../common/error.o ../../common/freelist.o ../../common/io.o ../../common/lock.o ../../common/open.o ../../common/tdb.o ../../common/transaction.o ../../common/traverse.o

$(patsubst %.c,%.o,$(wildcard *.c)): .help-files

.PHONY: links
links:
	cd tools && ./create-links

generated-usage.o: generated-usage.c links .help-files
generated-usage.c: $(USAGE_SOURCES) tools/gen-usage links
	tools/gen-usage $(USAGE_SOURCES) >$@

.help-files: $(HELP_SOURCES) links
	set -e; for f in $(HELP_SOURCES); do tools/gen-help $$f; done; touch .help-files

clean:
	rm -f ctdb-test .help-files generated-* *.o