![]() |
|
|||||||
| News News regarding BSD and related. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
From http://www.h-online.com/open/news/it...m-1185529.html
Quote:
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
|
As long as it's better than scons. And I don't mean in the speed department.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
|
I believe the reaction of most people on speed is: Quote:
Quote:
Credit the decision to: Pavlovian conditioning. Appeal to culture. Covetness . Greed. Impatience. |
|
|||
|
Quote:
What's so wrong about it?
|
|
||||
|
Well for the kind of way *I* like to do C/C++ builds, it's rather a pile of shiat.
I like to have a directory OUT of source tree for storing object files, a directory or two for source (depending on whether there are any external headers), plus a separate folder to place the files that need to be "Distributed" in. I also like to use the same build instructions for EACH toolkit and OS when possible. This usually leads to a tree that looks like: Code:
ProjectName/
README
HACKING
COPYING
include/
external include files to go in $PREFIX/include/ and be used like "#include <projectname/filename.ext>" in the projects own source.
source/ # or src
module name/
source and internal headers for this module
build/
config/
arch/
toolkit name/
osname/
module name/
object files created from building that module for the given configuration (e.g. release, debug, etc) for the given arch and OS.
dist/
config/
arch/
toolkit name/
osname/
everything needed to run in that environment
Trying to do that with scons took about 3 days of abuse and more than a few kludges to deal with platform specific issues it should have handled itself. By that, I mean it knowing how to compile/link stuff with the correct smarts enough that I'm not better off writing the whole thing as a perl script.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
|
If you never ran 'make' with debugging flags, you will be astonished what is been done behind the scenes.
For example, take the following simple Makefile: Code:
.SUFFIXES : .html .txt
# for the transformation of *.txt file to .html files :
.txt.html :
cat ${.IMPSRC} > ${.TARGET}
clean:
rm -f *.html
Running make with the debug all options make -dA aap.html produces the following whopping 928 lines of debugging output: Code:
1 global:.MAKEFLAGS = -d
2 global:.MAKEFLAGS = -d A
3 global:.MAKEFLAGS = -d A
4 global:.TARGETS = aap.html
5 Caching /usr/share/mk...done
6 expanding "sys.mk".../usr/share/mk/sys.mk
7 global:MAKEFILE = /usr/share/mk/sys.mk
8 global:unix = We run OpenBSD.
9 global:OSMAJOR = 4
10 global:OSMINOR = 7
11 global:OSREV = $(OSMAJOR).$(OSMINOR)
12 global:OSrev = $(OSMAJOR)$(OSMINOR)
13 global:AR = ar
14 global:ARFLAGS = rl
15 global:RANLIB = ranlib
16 global:LORDER = lorder
17 global:AS = as
18 global:AFLAGS = ${DEBUG}
19 global:COMPILE.s = ${CC} ${AFLAGS} -c
20 global:LINK.s = ${CC} ${AFLAGS} ${LDFLAGS}
21 global:COMPILE.S = ${CC} ${AFLAGS} ${CPPFLAGS} -c
22 global:LINK.S = ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
23 global:CC = cc
24 global:PIPE = -pipe
25 global:CFLAGS = -O2 ${PIPE} ${DEBUG}
26 global:COMPILE.c = ${CC} ${CFLAGS} ${CPPFLAGS} -c
27 global:LINK.c = ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
28 global:HOSTCC = cc
29 global:CXX = c++
30 global:CXXFLAGS = ${CFLAGS}
31 global:COMPILE.cc = ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
32 global:LINK.cc = ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
33 global:CPP = cpp
34 global:CPPFLAGS =
35 global:FC = f77
36 global:FFLAGS = -O2
37 global:RFLAGS =
38 global:COMPILE.f = ${FC} ${FFLAGS} -c
39 global:LINK.f = ${FC} ${FFLAGS} ${LDFLAGS}
40 global:COMPILE.F = ${FC} ${FFLAGS} ${CPPFLAGS} -c
41 global:LINK.F = ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
42 global:COMPILE.r = ${FC} ${FFLAGS} ${RFLAGS} -c
43 global:LINK.r = ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
44 global:LEX = lex
45 global:LFLAGS =
46 global:LEX.l = ${LEX} ${LFLAGS}
47 global:LD = ld
48 global:LDFLAGS = ${DEBUG}
49 global:LINT = lint
50 global:LINTFLAGS = -hx
51 global:PC = pc
52 global:PFLAGS =
53 global:COMPILE.p = ${PC} ${PFLAGS} ${CPPFLAGS} -c
54 global:LINK.p = ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
55 global:YACC = yacc
56 global:YFLAGS = -d
57 global:YACC.y = ${YACC} ${YFLAGS}
58 global:INSTALL = install
59 global:CTAGS = /usr/bin/ctags
60 defining transformation from `.c' to `'
61 defining transformation from `.c' to `.o'
62 defining transformation from `.c' to `.a'
63 defining transformation from `.c' to `.ln'
64 defining transformation from `.cc' to `'
65 defining transformation from `.cc' to `.o'
66 defining transformation from `.cc' to `.a'
67 defining transformation from `.C' to `'
68 defining transformation from `.C' to `.o'
69 defining transformation from `.C' to `.a'
70 defining transformation from `.cxx' to `'
71 defining transformation from `.cxx' to `.o'
72 defining transformation from `.cxx' to `.a'
73 defining transformation from `.f' to `'
74 defining transformation from `.f' to `.o'
75 defining transformation from `.f' to `.a'
76 defining transformation from `.F' to `'
77 defining transformation from `.F' to `.o'
78 defining transformation from `.F' to `.a'
79 defining transformation from `.r' to `'
80 defining transformation from `.r' to `.o'
81 defining transformation from `.r' to `.a'
82 defining transformation from `.p' to `'
83 defining transformation from `.p' to `.o'
84 defining transformation from `.p' to `.a'
85 defining transformation from `.s' to `'
86 defining transformation from `.s' to `.o'
87 defining transformation from `.s' to `.a'
88 defining transformation from `.S' to `'
89 defining transformation from `.S' to `.o'
90 defining transformation from `.S' to `.a'
91 defining transformation from `.l' to `'
92 defining transformation from `.l' to `.c'
93 defining transformation from `.l' to `.o'
94 defining transformation from `.l' to `.ln'
95 defining transformation from `.y' to `'
96 defining transformation from `.y' to `.c'
97 defining transformation from `.y' to `.o'
98 defining transformation from `.y' to `.ln'
99 defining transformation from `.sh' to `'
100 Searching for BSDmakefile...failed.
101 Searching for BSDmakefile.../usr/share/mk...failed.
102 Searching for makefile...failed.
103 Searching for makefile.../usr/share/mk...failed.
104 global:MAKEFILE = Makefile
105 defining transformation from `.txt' to `.html'
106 Searching for .depend...failed.
107 Searching for .depend.../usr/share/mk...failed.
108 global:MFLAGS = -d A
109 global:.INCLUDES =
110 global:.LIBS =
111 inserting .c(5)...at end of list
112 inserting .a(2)...at end of list
113 inserting .s(14)...at end of list
114 inserting .o(4)...at end of list
115 inserting .f(10)...at end of list
116 inserting .a(2)...at end of list
117 inserting .S(15)...at end of list
118 inserting .o(4)...at end of list
119 inserting .S(15)...at end of list
120 inserting .a(2)...before .o(4)
121 inserting .y(12)...before .s(14)
122 inserting .o(4)...at end of list
123 inserting .p(17)...at end of list
124 inserting (0)...at end of list
125 inserting .r(11)...before .p(17)
126 inserting (0)...at end of list
127 inserting .s(14)...before .p(17)
128 inserting (0)...before .o(4)
129 inserting .C(7)...before .y(12)
130 inserting .o(4)...at end of list
131 inserting .cc(6)...before .r(11)
132 inserting (0)...at end of list
133 inserting .C(7)...before .f(10)
134 inserting .a(2)...before .o(4)
135 inserting .l(13)...before .s(14)
136 inserting (0)...at end of list
137 inserting .p(17)...at end of list
138 inserting .a(2)...at end of list
139 inserting .p(17)...at end of list
140 inserting .o(4)...at end of list
141 inserting .txt(22)...at end of list
142 inserting .html(21)...at end of list
143 inserting .cxx(8)...before .f(10)
144 inserting .a(2)...at end of list
145 inserting .f(10)...before .y(12)
146 inserting .o(4)...at end of list
147 inserting .c(5)...before .cc(6)
148 inserting (0)...before .a(2)
149 inserting .y(12)...before .l(13)
150 inserting (0)...before .o(4)
151 inserting .f(10)...before .r(11)
152 inserting (0)...before .a(2)
153 inserting .sh(19)...at end of list
154 inserting (0)...at end of list
155 inserting .l(13)...before .s(14)
156 inserting .o(4)...at end of list
157 inserting .l(13)...at end of list
158 inserting .c(5)...at end of list
159 inserting .cc(6)...before .C(7)
160 inserting .o(4)...at end of list
161 inserting .cxx(8)...before .f(10)
162 inserting (0)...before .a(2)
163 inserting .cc(6)...before .C(7)
164 inserting .a(2)...before .o(4)
165 inserting .F(9)...before .f(10)
166 inserting .o(4)...at end of list
167 inserting .S(15)...before .p(17)
168 inserting (0)...before .a(2)
169 inserting .F(9)...before .f(10)
170 inserting .a(2)...before .o(4)
171 inserting .y(12)...before .l(13)
172 inserting .c(5)...at end of list
173 inserting .cxx(8)...before .F(9)
174 inserting .o(4)...at end of list
175 inserting .y(12)...at end of list
176 inserting .ln(3)...before .o(4)
177 inserting .c(5)...before .y(12)
178 inserting .ln(3)...at end of list
179 inserting .l(13)...at end of list
180 inserting .ln(3)...before .o(4)
181 inserting .r(11)...before .y(12)
182 inserting .o(4)...at end of list
183 inserting .s(14)...before .S(15)
184 inserting .a(2)...before .o(4)
185 inserting .r(11)...before .s(14)
186 inserting .a(2)...before .o(4)
187 inserting .C(7)...before .cxx(8)
188 inserting (0)...before .a(2)
189 inserting .c(5)...before .cc(6)
190 inserting .o(4)...at end of list
191 inserting .F(9)...before .f(10)
192 inserting (0)...before .a(2)
193 #*** Input graph:
194 #
195 .SUFFIXES :
196
197
198 #
199 .LIBS :
200
201
202 #
203 clean :
204 rm -f *.html
205
206
207
208
209 #
210 # Files that are only sources:
211 #*** Global Variables:
212 LEX.l = ${LEX} ${LFLAGS}
213 SHELL = /bin/sh
214 .MAKE = make
215 .INCLUDES =
216 .MAKEFLAGS = -d A
217 OSMAJOR = 4
218 .CURDIR = /home/j65nko/MAKE
219 .LIBS =
220 MACHINE = amd64
221 OSrev = $(OSMAJOR)$(OSMINOR)
222 PC = pc
223 CXX = c++
224 CPP = cpp
225 LINK.cc = ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
226 YACC.y = ${YACC} ${YFLAGS}
227 PFLAGS =
228 RFLAGS =
229 CC = cc
230 AR = ar
231 AS = as
232 YFLAGS = -d
233 FC = f77
234 FFLAGS = -O2
235 MAKEFILE = Makefile
236 AFLAGS = ${DEBUG}
237 CFLAGS = -O2 ${PIPE} ${DEBUG}
238 LFLAGS =
239 MFLAGS = -d A
240 LD = ld
241 LEX = lex
242 PIPE = -pipe
243 .OBJDIR = /home/j65nko/MAKE
244 MAKE = make
245 COMPILE.cc = ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
246 LINK.F = ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
247 unix = We run OpenBSD.
248 LORDER = lorder
249 COMPILE.c = ${CC} ${CFLAGS} ${CPPFLAGS} -c
250 COMPILE.f = ${FC} ${FFLAGS} -c
251 .TARGETS = aap.html
252 COMPILE.p = ${PC} ${PFLAGS} ${CPPFLAGS} -c
253 COMPILE.r = ${FC} ${FFLAGS} ${RFLAGS} -c
254 COMPILE.s = ${CC} ${AFLAGS} -c
255 LINTFLAGS = -hx
256 LINK.r = ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
257 COMPILE.F = ${FC} ${FFLAGS} ${CPPFLAGS} -c
258 COMPILE.S = ${CC} ${AFLAGS} ${CPPFLAGS} -c
259 OSMINOR = 7
260 LINK.S = ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
261 LINK.c = ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
262 LINK.f = ${FC} ${FFLAGS} ${LDFLAGS}
263 LINK.p = ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
264 CXXFLAGS = ${CFLAGS}
265 LINK.s = ${CC} ${AFLAGS} ${LDFLAGS}
266 LINT = lint
267 VPATH (D) = (none)
268 EXTRA_SYS_MK_INCLUDES(D) = (none)
269 YACC = yacc
270 MACHINE_ARCH = amd64
271 RANLIB = ranlib
272 CPPFLAGS =
273 ARFLAGS = rl
274 CTAGS = /usr/bin/ctags
275 INSTALL = install
276 LDFLAGS = ${DEBUG}
277 OSREV = $(OSMAJOR).$(OSMINOR)
278 HOSTCC = cc
279 MACHINE_CPU = amd64
280
281 #*** Suffixes:
282 # `.h' ()
283 # To:
284 # From:
285 # Search Path:
286 # `.out' ()
287 # To:
288 # From:
289 # Search Path:
290 # `.cl' ()
291 # To:
292 # From:
293 # Search Path:
294 # `.sh' ()
295 # To:
296 # From:
297 # Search Path:
298 # `.s' ()
299 # To: .a .o
300 # From:
301 # Search Path:
302 # `.r' ()
303 # To: .a .o
304 # From:
305 # Search Path:
306 # `.f' ()
307 # To: .a .o
308 # From:
309 # Search Path:
310 # `.y' ()
311 # To: .ln .o .c
312 # From:
313 # Search Path:
314 # `.o' ()
315 # To:
316 # From: .c .cc .C .cxx .F .f .r .y .l .s .S .p
317 # Search Path:
318 # `.p' ()
319 # To: .a .o
320 # From:
321 # Search Path:
322 # `.html' ()
323 # To:
324 # From: .txt
325 # Search Path:
326 # `.l' ()
327 # To: .ln .o .c
328 # From:
329 # Search Path:
330 # `.a' (LIBRARY|)
331 # To:
332 # From: .c .cc .C .cxx .F .f .r .s .S .p
333 # Search Path:
334 # `.cc' ()
335 # To: .a .o
336 # From:
337 # Search Path:
338 # `.S' ()
339 # To: .a .o
340 # From:
341 # Search Path:
342 # `.F' ()
343 # To: .a .o
344 # From:
345 # Search Path:
346 # `.C' ()
347 # To: .a .o
348 # From:
349 # Search Path:
350 # `.m4' ()
351 # To:
352 # From:
353 # Search Path:
354 # `.ln' ()
355 # To:
356 # From: .c .y .l
357 # Search Path:
358 # `.c' ()
359 # To: .a .ln .o
360 # From: .y .l
361 # Search Path:
362 # `.txt' ()
363 # To: .html
364 # From:
365 # Search Path:
366 # `.PATH' (|)
367 # To:
368 # From:
369 # Search Path:
370 # `.cxx' ()
371 # To: .a .o
372 # From:
373 # Search Path:
374 #*** Transformations:
375 .c.a :
376 ${COMPILE.c} ${.IMPSRC}
377 ${AR} ${ARFLAGS} $@ $*.o
378 rm -f $*.o
379
380 .s.o :
381 ${COMPILE.s} ${.IMPSRC}
382
383 .f.a :
384 ${COMPILE.f} ${.IMPSRC}
385 ${AR} ${ARFLAGS} $@ $*.o
386 rm -f $*.o
387
388 .S.o :
389 ${COMPILE.S} ${.IMPSRC}
390
391 .S.a :
392 ${COMPILE.S} ${.IMPSRC}
393 ${AR} ${ARFLAGS} $@ $*.o
394 rm -f $*.o
395
396 .y.o :
397 ${YACC.y} ${.IMPSRC}
398 ${COMPILE.c} -o ${.TARGET} y.tab.c
399 rm -f y.tab.c
400
401 .p :
402 ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
403
404 .r :
405 ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
406
407 .s :
408 ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
409
410 .C.o :
411 ${COMPILE.cc} ${.IMPSRC}
412
413 .cc :
414 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
415
416 .C.a :
417 ${COMPILE.cc} ${.IMPSRC}
418 ${AR} ${ARFLAGS} $@ $*.o
419 rm -f $*.o
420
421 .l :
422 ${LEX.l} ${.IMPSRC}
423 ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
424 rm -f lex.yy.c
425
426 .p.a :
427 ${COMPILE.p} ${.IMPSRC}
428 ${AR} ${ARFLAGS} $@ $*.o
429 rm -f $*.o
430
431 .p.o :
432 ${COMPILE.p} ${.IMPSRC}
433
434 .txt.html :
435 cat ${.IMPSRC} > ${.TARGET}
436
437 .cxx.a :
438 ${COMPILE.cc} ${.IMPSRC}
439 ${AR} ${ARFLAGS} $@ $*.o
440 rm -f $*.o
441
442 .f.o :
443 ${COMPILE.f} ${.IMPSRC}
444
445 .c :
446 ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
447
448 .y :
449 ${YACC.y} ${.IMPSRC}
450 ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
451 rm -f y.tab.c
452
453 .f :
454 ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
455
456 .sh :
457 rm -f ${.TARGET}
458 cp ${.IMPSRC} ${.TARGET}
459
460 .l.o :
461 ${LEX.l} ${.IMPSRC}
462 ${COMPILE.c} -o ${.TARGET} lex.yy.c
463 rm -f lex.yy.c
464
465 .l.c :
466 ${LEX.l} ${.IMPSRC}
467 mv lex.yy.c ${.TARGET}
468
469 .cc.o :
470 ${COMPILE.cc} ${.IMPSRC}
471
472 .cxx :
473 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
474
475 .cc.a :
476 ${COMPILE.cc} ${.IMPSRC}
477 ${AR} ${ARFLAGS} $@ $*.o
478 rm -f $*.o
479
480 .F.o :
481 ${COMPILE.F} ${.IMPSRC}
482
483 .S :
484 ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
485
486 .F.a :
487 ${COMPILE.F} ${.IMPSRC}
488 ${AR} ${ARFLAGS} $@ $*.o
489 rm -f $*.o
490
491 .y.c :
492 ${YACC.y} ${.IMPSRC}
493 mv y.tab.c ${.TARGET}
494
495 .cxx.o :
496 ${COMPILE.cc} ${.IMPSRC}
497
498 .y.ln :
499 ${YACC.y} ${.IMPSRC}
500 mv y.tab.c ${.TARGET:R}.c
501 ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.TARGET:R}.c
502 rm -f ${.TARGET:R}.c
503
504 .c.ln :
505 ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
506
507 .l.ln :
508 ${LEX.l} ${.IMPSRC}
509 mv lex.yy.c ${.TARGET:R}.c
510 ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.TARGET:R}.c
511 rm -f ${.TARGET:R}.c
512
513 .r.o :
514 ${COMPILE.r} ${.IMPSRC}
515
516 .s.a :
517 ${COMPILE.s} ${.IMPSRC}
518 ${AR} ${ARFLAGS} $@ $*.o
519 rm -f $*.o
520
521 .r.a :
522 ${COMPILE.r} ${.IMPSRC}
523 ${AR} ${ARFLAGS} $@ $*.o
524 rm -f $*.o
525
526 .C :
527 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
528
529 .c.o :
530 ${COMPILE.c} ${.IMPSRC}
531
532 .F :
533 ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
534
535 CompatMake(NULL, aap.html)
536 SuffFindDeps (aap.html)
537 trying aap.txt...Searching for aap.txt...in '.'
538 got it
539 applying .txt -> .html to "aap.html"
540 CompatMake(aap.html, aap.txt)
541 SuffFindDeps (aap.txt)
542 No known suffix on aap.txt. Using .NULL suffix
543 adding suffix rules
544 trying aap.txt.c...Searching for aap.txt.c...failed.
545 not there
546 trying aap.txt.cc...Searching for aap.txt.cc...failed.
547 not there
548 trying aap.txt.C...Searching for aap.txt.C...failed.
549 not there
550 trying aap.txt.cxx...Searching for aap.txt.cxx...failed.
551 not there
552 trying aap.txt.F...Searching for aap.txt.F...failed.
553 not there
554 trying aap.txt.f...Searching for aap.txt.f...failed.
555 not there
556 trying aap.txt.r...Searching for aap.txt.r...failed.
557 not there
558 trying aap.txt.y...Searching for aap.txt.y...failed.
559 not there
560 trying aap.txt.l...Searching for aap.txt.l...failed.
561 not there
562 trying aap.txt.s...Searching for aap.txt.s...failed.
563 not there
564 trying aap.txt.S...Searching for aap.txt.S...failed.
565 not there
566 trying aap.txt.p...Searching for aap.txt.p...failed.
567 not there
568 trying aap.txt.sh...Searching for aap.txt.sh...failed.
569 not there
570 trying aap.txt.y...Searching for aap.txt.y...failed.
571 not there
572 trying aap.txt.l...Searching for aap.txt.l...failed.
573 not there
574 Searching for aap.txt...in '.'
575 Examining aap.txt...modified 01:57:10 Feb 14, 2011...up-to-date.
576 Examining aap.html...non-existent...modified before source...out-of-date.
577 cat aap.txt > aap.html
578 update time: 03:27:35 Feb 14, 2011
579 #*** Input graph:
580 #
581 # 0 unmade children
582 # unmade
583 .SUFFIXES :
584
585
586 #
587 # 0 unmade children
588 # unmade
589 .LIBS :
590
591
592 #
593 # 0 unmade children
594 # unmade
595 clean :
596 rm -f *.html
597
598
599
600
601 #
602 # Files that are only sources:
603 # aap.txt [aap.txt]
604 # aap.html [aap.html]
605 #*** Global Variables:
606 LEX.l = ${LEX} ${LFLAGS}
607 SHELL = /bin/sh
608 .MAKE = make
609 .INCLUDES =
610 .MAKEFLAGS = -d A
611 OSMAJOR = 4
612 .CURDIR = /home/j65nko/MAKE
613 .LIBS =
614 MACHINE = amd64
615 OSrev = $(OSMAJOR)$(OSMINOR)
616 PC = pc
617 CXX = c++
618 CPP = cpp
619 LINK.cc = ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
620 YACC.y = ${YACC} ${YFLAGS}
621 PFLAGS =
622 RFLAGS =
623 CC = cc
624 AR = ar
625 AS = as
626 YFLAGS = -d
627 FC = f77
628 FFLAGS = -O2
629 MAKEFILE = Makefile
630 AFLAGS = ${DEBUG}
631 CFLAGS = -O2 ${PIPE} ${DEBUG}
632 LFLAGS =
633 MFLAGS = -d A
634 LD = ld
635 LEX = lex
636 PIPE = -pipe
637 .OBJDIR = /home/j65nko/MAKE
638 MAKE = make
639 COMPILE.cc = ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
640 LINK.F = ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
641 unix = We run OpenBSD.
642 LORDER = lorder
643 COMPILE.c = ${CC} ${CFLAGS} ${CPPFLAGS} -c
644 COMPILE.f = ${FC} ${FFLAGS} -c
645 .TARGETS = aap.html
646 COMPILE.p = ${PC} ${PFLAGS} ${CPPFLAGS} -c
647 COMPILE.r = ${FC} ${FFLAGS} ${RFLAGS} -c
648 COMPILE.s = ${CC} ${AFLAGS} -c
649 LINTFLAGS = -hx
650 LINK.r = ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
651 COMPILE.F = ${FC} ${FFLAGS} ${CPPFLAGS} -c
652 COMPILE.S = ${CC} ${AFLAGS} ${CPPFLAGS} -c
653 OSMINOR = 7
654 LINK.S = ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
655 LINK.c = ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
656 LINK.f = ${FC} ${FFLAGS} ${LDFLAGS}
657 LINK.p = ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
658 CXXFLAGS = ${CFLAGS}
659 LINK.s = ${CC} ${AFLAGS} ${LDFLAGS}
660 LINT = lint
661 VPATH (D) = (none)
662 EXTRA_SYS_MK_INCLUDES(D) = (none)
663 YACC = yacc
664 MACHINE_ARCH = amd64
665 RANLIB = ranlib
666 CPPFLAGS =
667 ARFLAGS = rl
668 CTAGS = /usr/bin/ctags
669 INSTALL = install
670 LDFLAGS = ${DEBUG}
671 OSREV = $(OSMAJOR).$(OSMINOR)
672 HOSTCC = cc
673 MACHINE_CPU = amd64
674
675 #*** Suffixes:
676 # `.h' ()
677 # To:
678 # From:
679 # Search Path:
680 # `.out' ()
681 # To:
682 # From:
683 # Search Path:
684 # `.cl' ()
685 # To:
686 # From:
687 # Search Path:
688 # `.sh' ()
689 # To:
690 # From:
691 # Search Path:
692 # `.s' ()
693 # To: .a .o
694 # From:
695 # Search Path:
696 # `.r' ()
697 # To: .a .o
698 # From:
699 # Search Path:
700 # `.f' ()
701 # To: .a .o
702 # From:
703 # Search Path:
704 # `.y' ()
705 # To: .ln .o .c
706 # From:
707 # Search Path:
708 # `.o' ()
709 # To:
710 # From: .c .cc .C .cxx .F .f .r .y .l .s .S .p
711 # Search Path:
712 # `.p' ()
713 # To: .a .o
714 # From:
715 # Search Path:
716 # `.html' ()
717 # To:
718 # From: .txt
719 # Search Path:
720 # `.l' ()
721 # To: .ln .o .c
722 # From:
723 # Search Path:
724 # `.a' (LIBRARY|)
725 # To:
726 # From: .c .cc .C .cxx .F .f .r .s .S .p
727 # Search Path:
728 # `.cc' ()
729 # To: .a .o
730 # From:
731 # Search Path:
732 # `.S' ()
733 # To: .a .o
734 # From:
735 # Search Path:
736 # `.F' ()
737 # To: .a .o
738 # From:
739 # Search Path:
740 # `.C' ()
741 # To: .a .o
742 # From:
743 # Search Path:
744 # `.m4' ()
745 # To:
746 # From:
747 # Search Path:
748 # `.ln' ()
749 # To:
750 # From: .c .y .l
751 # Search Path:
752 # `.c' ()
753 # To: .a .ln .o
754 # From: .y .l
755 # Search Path:
756 # `.txt' ()
757 # To: .html
758 # From:
759 # Search Path:
760 # `.PATH' (|)
761 # To:
762 # From:
763 # Search Path:
764 # `.cxx' ()
765 # To: .a .o
766 # From:
767 # Search Path:
768 #*** Transformations:
769 .c.a :
770 ${COMPILE.c} ${.IMPSRC}
771 ${AR} ${ARFLAGS} $@ $*.o
772 rm -f $*.o
773
774 .s.o :
775 ${COMPILE.s} ${.IMPSRC}
776
777 .f.a :
778 ${COMPILE.f} ${.IMPSRC}
779 ${AR} ${ARFLAGS} $@ $*.o
780 rm -f $*.o
781
782 .S.o :
783 ${COMPILE.S} ${.IMPSRC}
784
785 .S.a :
786 ${COMPILE.S} ${.IMPSRC}
787 ${AR} ${ARFLAGS} $@ $*.o
788 rm -f $*.o
789
790 .y.o :
791 ${YACC.y} ${.IMPSRC}
792 ${COMPILE.c} -o ${.TARGET} y.tab.c
793 rm -f y.tab.c
794
795 .p :
796 ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
797
798 .r :
799 ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
800
801 .s :
802 ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
803
804 .C.o :
805 ${COMPILE.cc} ${.IMPSRC}
806
807 .cc :
808 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
809
810 .C.a :
811 ${COMPILE.cc} ${.IMPSRC}
812 ${AR} ${ARFLAGS} $@ $*.o
813 rm -f $*.o
814
815 .l :
816 ${LEX.l} ${.IMPSRC}
817 ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
818 rm -f lex.yy.c
819
820 .p.a :
821 ${COMPILE.p} ${.IMPSRC}
822 ${AR} ${ARFLAGS} $@ $*.o
823 rm -f $*.o
824
825 .p.o :
826 ${COMPILE.p} ${.IMPSRC}
827
828 .txt.html :
829 cat ${.IMPSRC} > ${.TARGET}
830
831 .cxx.a :
832 ${COMPILE.cc} ${.IMPSRC}
833 ${AR} ${ARFLAGS} $@ $*.o
834 rm -f $*.o
835
836 .f.o :
837 ${COMPILE.f} ${.IMPSRC}
838
839 .c :
840 ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
841
842 .y :
843 ${YACC.y} ${.IMPSRC}
844 ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
845 rm -f y.tab.c
846
847 .f :
848 ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
849
850 .sh :
851 rm -f ${.TARGET}
852 cp ${.IMPSRC} ${.TARGET}
853
854 .l.o :
855 ${LEX.l} ${.IMPSRC}
856 ${COMPILE.c} -o ${.TARGET} lex.yy.c
857 rm -f lex.yy.c
858
859 .l.c :
860 ${LEX.l} ${.IMPSRC}
861 mv lex.yy.c ${.TARGET}
862
863 .cc.o :
864 ${COMPILE.cc} ${.IMPSRC}
865
866 .cxx :
867 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
868
869 .cc.a :
870 ${COMPILE.cc} ${.IMPSRC}
871 ${AR} ${ARFLAGS} $@ $*.o
872 rm -f $*.o
873
874 .F.o :
875 ${COMPILE.F} ${.IMPSRC}
876
877 .S :
878 ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
879
880 .F.a :
881 ${COMPILE.F} ${.IMPSRC}
882 ${AR} ${ARFLAGS} $@ $*.o
883 rm -f $*.o
884
885 .y.c :
886 ${YACC.y} ${.IMPSRC}
887 mv y.tab.c ${.TARGET}
888
889 .cxx.o :
890 ${COMPILE.cc} ${.IMPSRC}
891
892 .y.ln :
893 ${YACC.y} ${.IMPSRC}
894 mv y.tab.c ${.TARGET:R}.c
895 ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.TARGET:R}.c
896 rm -f ${.TARGET:R}.c
897
898 .c.ln :
899 ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
900
901 .l.ln :
902 ${LEX.l} ${.IMPSRC}
903 mv lex.yy.c ${.TARGET:R}.c
904 ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.TARGET:R}.c
905 rm -f ${.TARGET:R}.c
906
907 .r.o :
908 ${COMPILE.r} ${.IMPSRC}
909
910 .s.a :
911 ${COMPILE.s} ${.IMPSRC}
912 ${AR} ${ARFLAGS} $@ $*.o
913 rm -f $*.o
914
915 .r.a :
916 ${COMPILE.r} ${.IMPSRC}
917 ${AR} ${ARFLAGS} $@ $*.o
918 rm -f $*.o
919
920 .C :
921 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
922
923 .c.o :
924 ${COMPILE.c} ${.IMPSRC}
925
926 .F :
927 ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
928
This produces 134 lines of debugging output: Code:
1 global:.MAKEFLAGS = -r -d
2 global:.MAKEFLAGS = -r -d A
3 global:.MAKEFLAGS = -r -d A
4 global:.TARGETS = aap.html
5 Caching /usr/share/mk...done
6 Searching for BSDmakefile...failed.
7 Searching for BSDmakefile.../usr/share/mk...failed.
8 Searching for makefile...failed.
9 Searching for makefile.../usr/share/mk...failed.
10 global:MAKEFILE = Makefile
11 defining transformation from `.txt' to `.html'
12 Searching for .depend...failed.
13 Searching for .depend.../usr/share/mk...failed.
14 global:MFLAGS = -r -d A
15 global:.INCLUDES =
16 global:.LIBS =
17 inserting .txt(2)...at end of list
18 inserting .html(1)...at end of list
19 #*** Input graph:
20 #
21 .SUFFIXES :
22
23
24 #
25 clean :
26 rm -f *.html
27
28
29
30
31 #
32 # Files that are only sources:
33 #*** Global Variables:
34 SHELL = /bin/sh
35 .MAKE = make
36 .INCLUDES =
37 .MAKEFLAGS = -r -d A
38 .CURDIR = /home/j65nko/MAKE
39 .LIBS =
40 MACHINE = amd64
41 MAKEFILE = Makefile
42 MFLAGS = -r -d A
43 .OBJDIR = /home/j65nko/MAKE
44 MAKE = make
45 .TARGETS = aap.html
46 VPATH (D) = (none)
47 MACHINE_ARCH = amd64
48 MACHINE_CPU = amd64
49
50 #*** Suffixes:
51 # `.html' ()
52 # To:
53 # From: .txt
54 # Search Path:
55 # `.txt' ()
56 # To: .html
57 # From:
58 # Search Path:
59 # `.PATH' (|)
60 # To:
61 # From:
62 # Search Path:
63 #*** Transformations:
64 .txt.html :
65 cat ${.IMPSRC} > ${.TARGET}
66
67 CompatMake(NULL, aap.html)
68 SuffFindDeps (aap.html)
69 trying aap.txt...Searching for aap.txt...in '.'
70 got it
71 applying .txt -> .html to "aap.html"
72 CompatMake(aap.html, aap.txt)
73 SuffFindDeps (aap.txt)
74 No known suffix on aap.txt. Using .NULL suffix
75 adding suffix rules
76 Searching for aap.txt...in '.'
77 Examining aap.txt...modified 01:57:10 Feb 14, 2011...up-to-date.
78 Examining aap.html...non-existent...modified before source...out-of-date.
79 cat aap.txt > aap.html
80 update time: 03:28:33 Feb 14, 2011
81 #*** Input graph:
82 #
83 # 0 unmade children
84 # unmade
85 .SUFFIXES :
86
87
88 #
89 # 0 unmade children
90 # unmade
91 clean :
92 rm -f *.html
93
94
95
96
97 #
98 # Files that are only sources:
99 # aap.txt [aap.txt]
100 # aap.html [aap.html]
101 #*** Global Variables:
102 SHELL = /bin/sh
103 .MAKE = make
104 .INCLUDES =
105 .MAKEFLAGS = -r -d A
106 .CURDIR = /home/j65nko/MAKE
107 .LIBS =
108 MACHINE = amd64
109 MAKEFILE = Makefile
110 MFLAGS = -r -d A
111 .OBJDIR = /home/j65nko/MAKE
112 MAKE = make
113 .TARGETS = aap.html
114 VPATH (D) = (none)
115 MACHINE_ARCH = amd64
116 MACHINE_CPU = amd64
117
118 #*** Suffixes:
119 # `.html' ()
120 # To:
121 # From: .txt
122 # Search Path:
123 # `.txt' ()
124 # To: .html
125 # From:
126 # Search Path:
127 # `.PATH' (|)
128 # To:
129 # From:
130 # Search Path:
131 #*** Transformations:
132 .txt.html :
133 cat ${.IMPSRC} > ${.TARGET}
134
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
|
True. But the goal here was not to create a build system, but to create a browser. Fast turnaround time on builds is a good way to improve the development of your program. See PCC, LLVM, Google Go, and other projects who are motivated by high speed during compilation (among other things).
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remote Replacement of OS | mwatkins | FreeBSD Installation and Upgrading | 4 | 5th April 2009 04:01 AM |
| make build hangs | chill | OpenBSD Installation and Upgrading | 5 | 2nd April 2009 05:03 PM |
| Trisentry replacement? | neurosis | FreeBSD Security | 0 | 10th December 2008 03:09 PM |
| MB + CPU replacement | mururoa | FreeBSD General | 10 | 21st November 2008 07:21 PM |
| Replacement for Mail? | Bruco | FreeBSD Ports and Packages | 9 | 14th June 2008 05:15 PM |