Vanilla Netrek Server Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VANILLA-L:51] system.mk



Before I got hog-wild (or maybe feral pig) on the Makefiles. I got a
couple of questions.

First, do any of you mess with the system.mk file as you tweak/debug
your server? I ask be cause I really find following the logic of the
current Makefiles irritating.

For instance, I am in robots/Makefile, I see this:

CFLAGS = $(OPT) $(EXTRAINCS) $(DIRS) $(FLAGS) -DROBOT

  A) This sucks, especially for us who like to do make CFLAGS="-g"
      to do a quick compile for debugging. 
  B) It sucks again, when I want to figure out what EXTRAINCS does. I
     usually look in the current Makefile, don't find it, then look in
     system.mk, find it, then go back to robots/Makefile to fix what I 
     was looking at in the first place.

So, any objects to moving the system.mk functionality into the
Makefiles in each subdirectory? I'd do it all with autoconf, so I'd
make a robots/Makefile.in with pretty much the same info in the
system.mk.in. 

Yes, duplicity all over, but to me it makes the code (esp Makefiles)
easier to read.

What we loose is the ability to make a change in the system.mk file
and have all subdirs Makefiles pick that change up on a recompile.
What we can is more readable (IMHO) Makefiles.

Second, I'd like to make changes to some of the key Makefile
variables. Like CFLAGS, LDFLAGS, etc for the reason mentioned above.
Something like this:

     CFLAGS = -g
     ALL_CFLAGS = -I. $(CFLAGS)
     .c.o:
             $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<

This allow us to make simple command-line changes to make vars with
loosing "mandatory" make values, like -DROBOT for instance.

Comments please.

-- 
Bob Tanner <tanner@real-time.com>       | Phone : (612)943-8700
http://www.real-time.com                | Fax   : (612)943-8500
Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 

+
++ Vanilla-l Mailing List ++
To unsubscribe: send "unsubscribe vanilla-l" to majordomo@real-time.com
For more information: http://archives.real-time.com


Follow-Ups: