-
Notifications
You must be signed in to change notification settings - Fork 11
/
rules
89 lines (72 loc) · 2.62 KB
/
rules
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# These are some standard rules common to all subdirectory Makefiles.
include $(srcdir)/BINFILES
include $(srcdir)/SRCFILES
include $(srcdir)/EXTRAFILES
include $(srcdir)/MISCFILES
mkinstalldirs = $(top_srcdir)/mkinstalldirs
MOVEIFCHANGE = $(top_srcdir)/move-if-change
all: all-here all-recursive
bakclean:
rm -f *~ *# *.BAK *.bak
rm -f *.orig *.rej
clean::
rm -f *.o lib*.a *.tmp
rm -f core report nohup.out errlog
rm -rf .deps
distclean:: clean
install: all-here install-include install-lib install-man \
install-recursive
uninstall: uninstall-recursive uninstall-include uninstall-lib uninstall-man
baselibs = $(basename $(LIBS))
install-lib:
$(mkinstalldirs) $(DESTDIR)$(libdir)/$(instdir)
@list='$(LIBS) $(CRT0OBJS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL) -m 644 $$p $(libdir)/$(instdir)"; \
$(INSTALL) -m 644 $$p $(DESTDIR)$(libdir)/$(instdir); \
else :; fi; \
done
uninstall-lib:
@list='$(baselibs)'; for p in $$list; do \
r=$$p.a; \
s="$$p"_g.a; \
s2="$$p"_p.a; \
echo " rm -f $(libdir)/$(instdir)/$$r $(libdir)/$(instdir)/$$s" $(libdir)/$(instdir)/$$s2"; \
rm -f $(DESTDIR)$(libdir)/$(instdir)/$$r $(DESTDIR)$(libdir)/$(instdir)/$$s $(DESTDIR)$(libdir)/$(instdir)/$$s2; \
done
@list='$(CRT0OBJS)'; for p in $$list; do \
echo " rm -f $(DESTDIR)$(libdir)/$(instdir)/$$p"; \
rm -f $(DESTDIR)$(libdir)/$(instdir)/$$p; \
done
check: check-recursive
DISTFILES = $(MISCFILES) $(SRCFILES) $(RPCSVCCFILES) $(RPCGENSRCFILES) $(RPCINFOSRCFILES)
distdir = $(top_builddir)/MiNTLib-$(VERSION)/$(subdir)
distdir: $(DISTFILES) distdir-local
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -d $$d/$$file \
|| test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2>/dev/null \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
done
distdir-local:
all-recursive clean-recursive bakclean-recursive check-recursive \
install-recursive uninstall-recursive \
install-include-recursive install-man-recursive \
uninstall-include-recursive uninstall-man-recursive dist-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
list='$(SUBDIRS)'; for subdir in $$list; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) -r $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"