Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Running the server ➜ Dev port: pfiles

Dev port: pfiles

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #15 on Thu 20 Jul 2006 05:02 PM (UTC)
Message
You could get even fancier and have the same makefile for both the dev and normal port, and use some tricks to automatically determine where you are.
Quote:
[50] 12:03pm [haleyd@casqa1] ~/tmp/maketest > cat Makefile


FLAGS=`getflags.sh`

all:
        @echo $(FLAGS)



[51] DING! [haleyd@casqa1] ~/tmp/maketest > cat getflags.sh 
#!/bin/bash

if [[ `pwd` == *maketest* ]]; then
    echo "whoopee, maketest"
else
    echo "nope, not maketest"
fi


[52] 1:00pm [haleyd@casqa1] ~/tmp/maketest > gmake
whoopee, maketest
[53] 1:00pm [haleyd@casqa1] ~/tmp/maketest > cd ..
[54] 1:00pm [haleyd@casqa1] ~/tmp > cp -R maketest testmake
[55] 1:01pm [haleyd@casqa1] ~/tmp > cd testmake/
[56] 1:01pm [haleyd@casqa1] ~/tmp/testmake > make
nope, not maketest
[57] 1:01pm [haleyd@casqa1] ~/tmp/testmake >


So, you could use something quite similar to have the shell script output "-DDEVPORT" or simply "" depending on what the current directory is.

Makefiles are fun... :-)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


53,769 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.