annotate mk/objective.mk @ 3363:0b9ff4c95e81 trunk

mk distclean target: some changes
author William Pitcock <nenolod@atheme-project.org>
date Sat, 18 Aug 2007 14:17:39 -0500
parents 17d71f6073d6
children 05b732174e5f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
1 default: all
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
2 all: build
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
3
1695
3cf80d8a6d8d [svn] - Removed .cpp.o target since we don't have any .cpp files anymore.
js
parents: 1693
diff changeset
4 .SUFFIXES: .cxx .cc
3cf80d8a6d8d [svn] - Removed .cpp.o target since we don't have any .cpp files anymore.
js
parents: 1693
diff changeset
5
973
8279241db8b9 [svn] - compile objectives before installing them (oops)
nenolod
parents: 912
diff changeset
6 install: build
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
7 $(MAKE) install-prehook
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
8 @for i in $(BINDIR) $(LIBDIR) $(INCLUDEDIR); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
9 if [ ! -d $(DESTDIR)/$$i ]; then \
705
93c09e025180 [svn] - more intelligently handle directory creation
nenolod
parents: 699
diff changeset
10 $(INSTALL) -d -m 755 $(DESTDIR)/$$i; \
708
e4069b00b174 [svn] - fix
nenolod
parents: 705
diff changeset
11 fi; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
12 done;
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
13 @if [ "x$(OVERLAYS)" != "x" ]; then \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
14 for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
15 if [ $(VERBOSITY) -gt 0 ]; then \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
16 echo "[installing overlay: $$i]"; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
17 fi; \
2390
76745f0dd6f4 [svn] - portability fixes for solaris
nenolod
parents: 2378
diff changeset
18 cd $$i; OVERLAYS="" $(MAKE) install || exit; cd ..; \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
19 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
20 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
21 @if [ "x$(SUBDIRS)" != "x" ]; then \
593
81a746ef39d0 [svn] install subobjectives
nenolod
parents: 581
diff changeset
22 for i in $(SUBDIRS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
23 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
24 echo "[installing subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
25 fi; \
2390
76745f0dd6f4 [svn] - portability fixes for solaris
nenolod
parents: 2378
diff changeset
26 cd $$i; OVERLAYS="" $(MAKE) install || exit; cd ..; \
593
81a746ef39d0 [svn] install subobjectives
nenolod
parents: 581
diff changeset
27 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
28 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
29 @if [ "x$(OBJECTIVE_DIRECTORIES)" != "x" ]; then \
578
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
30 for i in $(OBJECTIVE_DIRECTORIES); do \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
31 printf "%10s %-20s\n" MKDIR $$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
32 $(INSTALL) -d -m 755 $(DESTDIR)/$$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
33 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
34 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
35 @if [ "x$(HEADERS)" != "x" ]; then \
658
a019c0e28b28 [svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents: 626
diff changeset
36 for i in $(HEADERS); do \
a019c0e28b28 [svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents: 626
diff changeset
37 printf "%10s %-20s\n" INSTALL $$i; \
671
3e03da73a514 [svn] install HEADERS properly (oops)
nenolod
parents: 660
diff changeset
38 $(INSTALL_DATA) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(INCLUDEDIR)/$$i; \
658
a019c0e28b28 [svn] If the makefile has a HEADERS variable, then install them to the
nenolod
parents: 626
diff changeset
39 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
40 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
41 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
578
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
42 for i in $(OBJECTIVE_LIBS); do \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
43 printf "%10s %-20s\n" INSTALL $$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
44 $(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(LIBDIR)/$$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
45 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
46 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
47 @if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
578
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
48 for i in $(OBJECTIVE_BINS); do \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
49 printf "%10s %-20s\n" INSTALL $$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
50 $(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(BINDIR)/$$i; \
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
51 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
52 fi;
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
53 @if [ "x$(OBJECTIVE_DATA)" != "x" ]; then \
713
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
54 for i in $(OBJECTIVE_DATA); do \
715
840c49684e2c [svn] - fix data rule (whitespace)
nenolod
parents: 713
diff changeset
55 source=`echo $$i | cut -d ":" -f1`; \
840c49684e2c [svn] - fix data rule (whitespace)
nenolod
parents: 713
diff changeset
56 destination=`echo $$i | cut -d ":" -f2`; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
57 if [ ! -d $(DESTDIR)/$$destination ]; then \
723
d108cc745b64 [svn] - create directories that aren't there in the install phase
nenolod
parents: 715
diff changeset
58 $(INSTALL) -d -m 755 $(DESTDIR)/$$destination; \
d108cc745b64 [svn] - create directories that aren't there in the install phase
nenolod
parents: 715
diff changeset
59 fi; \
713
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
60 printf "%10s %-20s\n" INSTALL $$source; \
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
61 $(INSTALL_DATA) $(INSTALL_OVERRIDE) $$source $(DESTDIR)/$$destination; \
cf7b5a288564 [svn] rule for installing data
nenolod
parents: 712
diff changeset
62 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
63 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
64 $(MAKE) install-posthook
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
65 @if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
66 echo "[all objectives installed]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
67 fi
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
68
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
69 clean:
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
70 $(MAKE) clean-prehook
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
71 @if [ "x$(OVERLAYS)" != "x" ]; then \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
72 for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
73 if [ $(VERBOSITY) -gt 0 ]; then \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
74 echo "[cleaning overlay: $$i]"; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
75 fi; \
2390
76745f0dd6f4 [svn] - portability fixes for solaris
nenolod
parents: 2378
diff changeset
76 cd $$i; OVERLAYS="" $(MAKE) clean || exit; cd ..; \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
77 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
78 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
79 @if [ "x$(SUBDIRS)" != "x" ]; then \
567
2ed2993cd920 [svn] fix make clean
nenolod
parents: 566
diff changeset
80 for i in $(SUBDIRS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
81 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
82 echo "[cleaning subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
83 fi; \
2390
76745f0dd6f4 [svn] - portability fixes for solaris
nenolod
parents: 2378
diff changeset
84 cd $$i; OVERLAYS="" $(MAKE) clean || exit; cd ..; \
567
2ed2993cd920 [svn] fix make clean
nenolod
parents: 566
diff changeset
85 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
86 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
87 $(MAKE) clean-posthook
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
88 rm -f *.o *.lo *.so *.a *.sl .depend-done .depend
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
89 touch .depend
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
90 @if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
912
1dd2afe391ec [svn] binaries (audacious,audacious-arts-helper) should be deleted on clean requests
giacomo
parents: 876
diff changeset
91 for i in $(OBJECTIVE_BINS); do \
1215
f22bd1fa1579 [svn] - improvements
nenolod
parents: 1214
diff changeset
92 rm -f $$i; \
912
1dd2afe391ec [svn] binaries (audacious,audacious-arts-helper) should be deleted on clean requests
giacomo
parents: 876
diff changeset
93 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
94 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
95 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
96 for i in $(OBJECTIVE_LIBS); do \
1215
f22bd1fa1579 [svn] - improvements
nenolod
parents: 1214
diff changeset
97 rm -f $$i; \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
98 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
99 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
100 @if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
101 for i in $(OBJECTIVE_LIBS_NOINST); do \
1215
f22bd1fa1579 [svn] - improvements
nenolod
parents: 1214
diff changeset
102 rm -f $$i; \
1057
4dfe83e30bfa [svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian
nenolod
parents: 973
diff changeset
103 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
104 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
105 @if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
106 echo "[all objectives cleaned]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
107 fi
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
108
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
109 distclean: clean
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
110 @if [ "x$(OVERLAYS)" != "x" ]; then \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
111 for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
112 if [ $(VERBOSITY) -gt 0 ]; then \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
113 echo "[distcleaning overlay: $$i]"; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
114 fi; \
2390
76745f0dd6f4 [svn] - portability fixes for solaris
nenolod
parents: 2378
diff changeset
115 cd $$i; OVERLAYS="" $(MAKE) distclean || exit; cd ..; \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
116 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
117 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
118 @if [ "x$(SUBDIRS)" != "x" ]; then \
712
430419abf723 [svn] - distclean enhancements
nenolod
parents: 708
diff changeset
119 for i in $(SUBDIRS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
120 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
121 echo "[distcleaning subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
122 fi; \
2390
76745f0dd6f4 [svn] - portability fixes for solaris
nenolod
parents: 2378
diff changeset
123 cd $$i; OVERLAYS="" $(MAKE) distclean || exit; cd ..; \
712
430419abf723 [svn] - distclean enhancements
nenolod
parents: 708
diff changeset
124 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
125 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
126 @if [ -f Makefile.in ]; then \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
127 rm -f Makefile; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
128 fi
3363
0b9ff4c95e81 mk distclean target: some changes
William Pitcock <nenolod@atheme-project.org>
parents: 2817
diff changeset
129 @if [ -f mk/rules.mk.in ]; then \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
130 rm -f mk/rules.mk; \
712
430419abf723 [svn] - distclean enhancements
nenolod
parents: 708
diff changeset
131 fi
3363
0b9ff4c95e81 mk distclean target: some changes
William Pitcock <nenolod@atheme-project.org>
parents: 2817
diff changeset
132 rm -f config.log config.status
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
133
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
134 build: depend
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
135 $(MAKE) build-prehook
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
136 @if [ "x$(OVERLAYS)" != "x" ]; then \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
137 for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
138 if [ $(VERBOSITY) -gt 0 ]; then \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
139 echo "[building overlay: $$i]"; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
140 fi; \
2390
76745f0dd6f4 [svn] - portability fixes for solaris
nenolod
parents: 2378
diff changeset
141 cd $$i; OVERLAYS="" $(MAKE) || exit; cd ..; \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
142 if [ $(VERBOSITY) -gt 0 ]; then \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
143 echo "[finished overlay: $$i]"; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
144 fi; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
145 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
146 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
147 @if [ "x$(SUBDIRS)" != "x" ]; then \
566
ab7027a06ca9 [svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents: 564
diff changeset
148 for i in $(SUBDIRS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
149 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
150 echo "[building subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
151 fi; \
2390
76745f0dd6f4 [svn] - portability fixes for solaris
nenolod
parents: 2378
diff changeset
152 cd $$i; OVERLAYS="" $(MAKE) || exit; cd ..; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
153 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
154 echo "[finished subobjective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
155 fi; \
566
ab7027a06ca9 [svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of
nenolod
parents: 564
diff changeset
156 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
157 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
158 @if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
159 for i in $(OBJECTIVE_LIBS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
160 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
161 echo "[building library objective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
162 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
163 $(MAKE) $$i || exit; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
164 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
165 echo "[finished library objective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
166 fi; \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
167 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
168 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
169 @if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
170 for i in $(OBJECTIVE_LIBS_NOINST); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
171 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
172 echo "[building library dependency: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
173 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
174 $(MAKE) $$i || exit; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
175 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
176 echo "[finished library dependency: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
177 fi; \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
178 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
179 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
180 @if test "x$(OBJECTIVE_BINS)" != "x"; then \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
181 for i in $(OBJECTIVE_BINS); do \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
182 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
183 echo "[building binary objective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
184 fi; \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
185 $(MAKE) $$i || exit; \
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
186 if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
187 echo "[finished binary objective: $$i]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
188 fi; \
581
572cbb4c25ba [svn] more fixes
nenolod
parents: 580
diff changeset
189 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
190 fi
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
191 $(MAKE) build-posthook
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
192 @if [ $(VERBOSITY) -gt 0 ]; then \
873
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
193 echo "[all objectives built]"; \
44782ab84dcd [svn] - do not show OMK debugging notices unless we use 'make VERBOSITY=1'
nenolod
parents: 872
diff changeset
194 fi
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
195
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
196 .c.o:
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
197 @if [ $(SHOW_CFLAGS) -eq 1 ]; then \
876
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
198 printf "%10s %-20s (%s)\n" CC $< "${CFLAGS}"; \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
199 else \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
200 printf "%10s %-20s\n" CC $<; \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
201 fi;
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
202 $(CC) $(CFLAGS) -c $< -o $@
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
203
1695
3cf80d8a6d8d [svn] - Removed .cpp.o target since we don't have any .cpp files anymore.
js
parents: 1693
diff changeset
204 .cc.o .cxx.o:
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
205 @if [ $(SHOW_CFLAGS) -eq 1 ]; then \
876
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
206 printf "%10s %-20s (%s)\n" CXX $< "${CXXFLAGS}"; \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
207 else \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
208 printf "%10s %-20s\n" CXX $<; \
fa0dd2f5cda5 [svn] - rule reduction
nenolod
parents: 873
diff changeset
209 fi;
562
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
210 $(CXX) $(CXXFLAGS) -c $< -o $@
5cdadcf74ec3 [svn] needed requirements for objective-based buildsystem (automake replacement)
nenolod
parents:
diff changeset
211
1615
e402e0217870 [svn] - fix for the long-standing dependency oddness in our build system. now make tool surely picks up changed source files and builds required objectives.
yaz
parents: 1323
diff changeset
212 $(OBJECTIVE_LIBS): $(OBJECTS)
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
213 if [ "x$(OBJECTS)" != "x" ]; then \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
214 $(MAKE) $(OBJECTS) || exit; \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
215 printf "%10s %-20s\n" LINK $@; \
1749
2d84f6a3ca23 [svn] - soname fix
nenolod
parents: 1695
diff changeset
216 (if [ "x$(SHARED_SUFFIX)" = "x.so" ]; then \
1627
b8c28d7e23cd [svn] - handle OS X linking command
nenolod
parents: 1625
diff changeset
217 (if [ "x$(OBJECTIVE_SONAME_SUFFIX)" != "x" ]; then \
2286
861e6e6edd59 [svn] - use -Wl,-h for defining the SONAME for POSIX compatibility
nenolod
parents: 2116
diff changeset
218 $(CC) $(PICLDFLAGS) -o $@ -Wl,-h$@.$(OBJECTIVE_SONAME_SUFFIX) $(OBJECTS) $(LDFLAGS) $(LIBADD); \
1627
b8c28d7e23cd [svn] - handle OS X linking command
nenolod
parents: 1625
diff changeset
219 else \
2286
861e6e6edd59 [svn] - use -Wl,-h for defining the SONAME for POSIX compatibility
nenolod
parents: 2116
diff changeset
220 $(CC) $(PICLDFLAGS) -o $@ -Wl,-h$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
1627
b8c28d7e23cd [svn] - handle OS X linking command
nenolod
parents: 1625
diff changeset
221 fi;) \
b8c28d7e23cd [svn] - handle OS X linking command
nenolod
parents: 1625
diff changeset
222 else \
b8c28d7e23cd [svn] - handle OS X linking command
nenolod
parents: 1625
diff changeset
223 $(CC) $(PICLDFLAGS) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
b8c28d7e23cd [svn] - handle OS X linking command
nenolod
parents: 1625
diff changeset
224 fi;) \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
225 fi
578
d89a7b85528d [svn] buildsystem improvements
nenolod
parents: 570
diff changeset
226
2691
ecfb79d60c3a [svn] maintenance of build system:
yaz
parents: 2409
diff changeset
227 $(OBJECTIVE_LIBS_NOINST): $(OBJECTS)
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
228 if [ "x$(OBJECTS)" != "x" ]; then \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
229 $(MAKE) $(OBJECTS) || exit; \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
230 printf "%10s %-20s\n" LINK $@; \
2116
8aaa6f29c3ca [svn] - ar should pick changes
yaz
parents: 1749
diff changeset
231 $(AR) cr $@ $(OBJECTS); \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
232 fi
580
07e77b804697 [svn] ditto for static libraries
nenolod
parents: 579
diff changeset
233
579
785ec2ad4ea4 [svn] try to add a "default" make rule for $(OBJECTIVE_BINS)
nenolod
parents: 578
diff changeset
234 $(OBJECTIVE_BINS): $(OBJECTS)
1322
dfa4ef2e8c79 [svn] - avoid system /bin/test in Makefiles as it may not behave as expected
nenolod
parents: 1219
diff changeset
235 if [ "x$(OBJECTS)" != "x" ]; then \
870
c7dca48d8178 [svn] - properly recurse build errors
nenolod
parents: 829
diff changeset
236 $(MAKE) $(OBJECTS) || exit; \
626
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
237 printf "%10s %-20s\n" LINK $@; \
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
238 $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
eb0c533e7c48 [svn] do not forkbomb if we have a malformed makefile
nenolod
parents: 595
diff changeset
239 fi
579
785ec2ad4ea4 [svn] try to add a "default" make rule for $(OBJECTIVE_BINS)
nenolod
parents: 578
diff changeset
240
563
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
241 clean-prehook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
242 clean-posthook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
243 build-prehook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
244 build-posthook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
245 install-prehook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
246 install-posthook:
0879e7ad85b1 [svn] some buildsystem changes... nothing notable yet
nenolod
parents: 562
diff changeset
247
1209
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
248 mk/rules.mk:
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
249 @if [ -f "configure" ]; then \
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
250 echo "[building rules.mk for posix target, run configure manually if you do not want this]"; \
1219
aa693b651fee [svn] make CONFIG_OPTS="<configure options>"
nenolod
parents: 1217
diff changeset
251 sh configure $(CONFIG_OPTS); \
1209
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
252 echo "[complete]"; \
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
253 fi
e67fad649f58 [svn] - make it prettier
nenolod
parents: 1161
diff changeset
254
2768
4a5cdf975bb3 [svn] Added a hook when building dependencies so that the dbus-bindings are created first without producing any error messages.
magma
parents: 2691
diff changeset
255 .PHONY: .depend depend depend-prehook clean distclean
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
256 .depend:
2768
4a5cdf975bb3 [svn] Added a hook when building dependencies so that the dbus-bindings are created first without producing any error messages.
magma
parents: 2691
diff changeset
257 depend-prehook:
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
258
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
259 # default depend rule. if something else is needed -- override depend target
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
260 depend:
2768
4a5cdf975bb3 [svn] Added a hook when building dependencies so that the dbus-bindings are created first without producing any error messages.
magma
parents: 2691
diff changeset
261 $(MAKE) depend-prehook
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
262 @if [ "x$(SUBDIRS)" != "x" ]; then \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
263 for i in $(SUBDIRS); do \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
264 if [ $(VERBOSITY) -gt 0 ]; then \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
265 echo "[building depend file for subobjective: $$i]"; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
266 fi; \
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents: 2287
diff changeset
267 cd $$i; touch .depend; $(MAKE) depend || exit; cd ..; \
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
268 if [ $(VERBOSITY) -gt 0 ]; then \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
269 echo "[finished subobjective: $$i]"; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
270 fi; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
271 done; \
2409
30ab29ed32d8 [svn] - back out objective-make topdir probe stuff, it doesnt work on some
nenolod
parents: 2391
diff changeset
272 fi
2287
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
273 if [ ! -f .depend-done ]; then \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
274 for i in ${SOURCES}; do \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
275 echo "[generating dependencies for objective: $$i]"; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
276 ${CC} -MM ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $$i >> .depend; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
277 done; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
278 touch .depend-done; \
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
279 fi;
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
280
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
281 # compatibility with automake follows
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
282 am--refresh:
553fba80ac58 [svn] - update to objective-make II
nenolod
parents: 2286
diff changeset
283
2817
17d71f6073d6 [svn] FreeBSD make doesn't support -include. Revert until it's fixed.
js
parents: 2816
diff changeset
284 include .depend