-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (48 loc) · 1.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
ifeq (,$(wildcard config.mak))
$(error "config.mak is not present, run configure !")
endif
include config.mak
DISTFILE = ushare-$(VERSION).tar.bz2
EXTRADIST = AUTHORS \
ChangeLog \
configure \
COPYING \
NEWS \
README \
THANKS \
TODO \
SUBDIRS = po \
scripts \
src \
all:
for subdir in $(SUBDIRS); do \
$(MAKE) -C $$subdir $@; \
done
clean:
for subdir in $(SUBDIRS); do \
$(MAKE) -C $$subdir $@; \
done
distclean: clean
for subdir in $(SUBDIRS); do \
$(MAKE) -C $$subdir $@; \
done
-$(RM) -f config.log
-$(RM) -f config.mak
-$(RM) -f config.h
install:
for subdir in $(SUBDIRS); do \
$(MAKE) -C $$subdir $@; \
done
.PHONY: clean distclean install
dist:
-$(RM) $(DISTFILE)
dist=$(shell pwd)/ushare-$(VERSION) && \
for subdir in . $(SUBDIRS); do \
mkdir -p "$$dist/$$subdir"; \
$(MAKE) -C $$subdir dist-all DIST="$$dist/$$subdir"; \
done && \
tar cjf $(DISTFILE) ushare-$(VERSION)
-$(RM) -rf ushare-$(VERSION)
dist-all:
cp $(EXTRADIST) $(SRCS) Makefile $(DIST)
.PHONY: dist dist-all