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 ➜ SMAUG coding ➜ Makefile missing seperator

Makefile missing seperator

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


Posted by Dralnu   USA  (277 posts)  Bio
Date Sun 15 Jan 2006 05:35 PM (UTC)
Message
CC = gcc
#PROF    = -p
#Uncomment to compile in Cygwin
#CYGWIN = -DCYGWIN
# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket
#IMC2 - Comment out to disable IMC2 support
  IMC = 1
  W_FLAGS =
  -Wall - Werror - Wshadow - Wformat - security - Wpointer - arith - Wcast - align - Wredundant - decls
  C_FLAGS = -g3 $ (W_FLAGS) $ (SOLARIS_FLAG) $ (PROF) 
  L_FLAGS = $ (PROF) $ (SOLARIS_LINK) 
  C_FILES = 
act_comm.c act_info.c act_move.c act_obj.c act_wiz.c ban.c boards.c build.c clans.c color.c comm.c comments.c const.c db.c deity.c fight.c handler.c hashstr.c
	hotboot.c imm_host.c interp.c magic.c makeobjs.c mapout.c md5.c misc.c mpxset.c mud_comm.c mud_prog.c planes.c player.c polymorph.c reset.c save.c
	services.c shops.c skills.c special.c tables.c track.c update.c 
ifdef
       IMC
   C_FILES: = imc.c $ (C_FILES) C_FLAGS: = $ (C_FLAGS) - DIMC - DIMCSMAUG endif O_FILES: = $ (patsubst %.c, o / %.o, $ (C_FILES)) H_FILES = $ (wildcard *.h) all:
$ (MAKE) - s smaug ifdef CYGWIN smaug:$ (O_FILES) rm - f smaug.exe
  $ (CC) -
  o smaug.exe
  $ (O_FILES)
  $ (L_FLAGS)
  echo "Done compiling mud.";
     chmod g + w smaug.exe chmod a + x smaug.exe chmod g + w $ (O_FILES) clean:rm - f o	/*.o smaug.exe *~
											   else
											   smaug: $(O_FILES)
											   rm -f smaug
											   $(CC) -o smaug $(O_FILES) $(L_FLAGS)
											   echo "Done compiling mud.";
											   chmod g+w smaug
											   chmod a+x smaug
											   chmod g+w $(O_FILES)

											   clean:
											   rm -f o/*.o smaug *~
											   endif

											   indent:
											   indent -ts3 -nut -nsaf -nsai -nsaw -npcs -npsl -ncs -nbc -bls -prs -bap -cbi0 -cli3 -bli0 -l125 -lp -i3 -cdb -c1 -cd1 -sc -pmt $(C_FILES)
											   indent -ts3 -nut -nsaf -nsai -nsaw -npcs -npsl -ncs -nbc -bls -prs -bap -cbi0 -cli3 -bli0 -l125 -lp -i3 -cdb -c1 -cd1 -sc -pmt $(H_FILES)

											   indentclean:
											   rm *.c~ *.h~

											   o/%.o: %.c
											   echo "  Compiling $@....";
											   $(CC) -c $(C_FLAGS) $< -o $@

											   .c.o: mud.h
											   $(CC) -c $(C_FLAGS) $<


In likes 11 and 14 I seem to be missing a seperator. Anyone got any clues? I don't mess with makefiles often unless I'm adding or removing a file (this one I havn't touched). I've tried reformating it some, had to pull all the filenames back together (indent may have done this, but I know I told it to deal with *.c), so I'm kinda clueless.
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #1 on Sun 15 Jan 2006 07:53 PM (UTC)
Message
Is this post how your Makefile actually looks?!? If so then it's no wonder it's complaining. Makefiles are very sensative to spacing and formatting. If you have spaces where tabs belong, it complains. This Makefile looks like a truck ran over it :P
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #2 on Sun 15 Jan 2006 09:34 PM (UTC)
Message
I blame the indent utility. I TOLD it *.c only, but nooooo, it has to go nutz.

But, yes, that is how it looks
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #3 on Sun 15 Jan 2006 10:31 PM (UTC)
Message
I'd strongly suggest downloading a copy of smaugfuss again (or using the one you'd previously downloaded if you've still got it) and extracting the Makefile to simply replace that one, then you can always readd in your changes without affecting the file's format by hand...

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #4 on Mon 16 Jan 2006 02:45 AM (UTC)
Message
...and keep from using indent anymore. I'll do my formating longhand -.-

Yeah, red/l seems like the best option, then keeping a backup somewhere would prolly be a good idea, too

P.S. Anyone know of a good cocurrent version system I might could use? I know there is one on SuSe, but I kind of don't know how to use it, and don't know which one it is :)
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 16 Jan 2006 04:04 AM (UTC)
Message
I have been using cvs for MUSHclient. It might not be the most modern but it works well enough for me. You can use it on both Windows and Linux.

Cvs is pretty simple to use, once you do the initial setup. Assuming you have installed cvs but never used it, you would do something like this (after setting up CVSROOT, see below):


cvs init


Once only! This creates the repository where copies of your source are stored.

You need a CVSROOT variable set up, undex Linux or Windows. For Windows use the System Properties to do this. On my Windows box, it looks like this:


CVSROOT=:pserver:nick@servername:/cvs


This is telling it to store its files on the /cvs directory, username "nick" on server "servername".

For a local directory, you would simply specify the directory, eg.


CVSROOT=/cvs


After that, I would CD to my smaug source directory, and clean up anything you don't want in cvs (eg. *.o, *.bak and so on).

Then for the first time for this directory you create the entry for it, by importing your existing files, something like this:



cd ~/SmaugFUSS/src
cvs import SmaugFUSS/src yourname INITIAL_RELEASE


This creates "SmaugFUSS/src" entry in the repository.

Now, and this is the important step, exit the directory and remove it (I am assuming you have backups in case something goes wrong).


cd ../.. # back out of the SmaugFUSS/src directory
rm -rf SmaugFUSS/src # remove the source


Now get it back out of cvs - this is important, so that cvs creates a couple of files and directories to track what you are doing. In particular, after doing this you should have a CVS subdirectory in the source directory. You don't use this yourself, it is for CVS to track what it is doing.


cvs get SmaugFUSS/src


These above steps are a once-off.

From now on you simply edit files in the src directory. When you want to "commit" the changes, do this:


cvs commit


This updates the repository to match the source in your directory.

At any time you can see what changes you made since the last commit:



cvs diff

(or)

cvs diff filename



If you add a new file to the project you can then do this:


cvs add filename
cvs commit


The other thing I do is "tag" releases, like this:


cvs rtag RELEASE_1_2 SmaugFUSS/src


In the case of MUSHclient (say) this sets a "checkpoint" of the state of every source file as at a particular release.

In my case, I can see exactly what changes I made between version 3.70 and 3.71 of MUSHclient, in one line, like this:


cvs diff -r RELEASE_3_70 -r RELEASE_3_71





Concurrent updates

Assuming you have more than one developer, this is where CVS comes into its own. All developers need access to the one server that holds the committed copy of the source.

Assuming that Dralnu makes some changes to some source files, and has committed them, then Nick can type:


cvs update


This synchronizes Nick's source directory to match the repository. Similarly Dralnu can do the same thing to get Nick's changes.

There is a lot more to cvs than that (for instance, you can delete files), however that should get you started.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #6 on Mon 16 Jan 2006 04:22 AM (UTC)

Amended on Mon 16 Jan 2006 04:33 AM (UTC) by Dralnu

Message
I don't know if that was cut + paste or what, but might want to put it somewhere along with your compile faq and whatnot. It helps.

As for backups, no. I do, though, have a fairly complete list of all the snippets I added in (I havn't done anything outside of snippets besides one skill I added in for rangers, plus area/class changes, which this shouldn't bother). Well, now I'm off to install cvs (Isn't that a drug store?)

EDIT #1:
Turns out I have a version system (svn, or subversion), and found a site with an online manual for version 1.2, along with the new version, 1.3, so I'm gonna leave a link here to the page for anyone who might be using this util instead of cvs.

http://subversion.tigris.org/

Thats the site for Subversion. They claim it to be better then CVS, so anyone else who might be interested might look into playing with it some (I've found alot of things like CVS and VI end up with something that is similar to VIM, Elvis, or in this case, so they say, SVN.
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #7 on Mon 16 Jan 2006 12:01 PM (UTC)

Amended on Mon 16 Jan 2006 12:02 PM (UTC) by Samson

Message
We've veered a bit off topic, but on the subject of version control Subversion is a nice piece of software. We use it to maintain control over the Quicksilver Forums repository and it is very easy to work with.

You can convert CVS repositories to use SVN too, but when I tried this I was unable to locate a method to access it even though the conversion script said it all worked. The documentation on this process was lacking and Google was of little help. Of course I'm pretty sure it was something simple that I just missed. :)


Oh, and on the subject of indentation, if you had typed "make indent" that would have run the indentation script on your C and H files :)
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #8 on Mon 16 Jan 2006 06:32 PM (UTC)

Amended on Mon 16 Jan 2006 06:38 PM (UTC) by Dralnu

Message
Well, the topic is kind of repaired (read my post in the FUSS forum to see what happened, lol), and I did ask about version systems. The new SVN has an oriely guide online for free, which seems to be rather good (It's O'Reily, isn't it?), so that may help

Also, the downloads don't seem to have an RPM for SVN anywhere, but Google Subversion RPM will bring something up to download (shorter d/l, as well)

EDIT #1
Ok, I misread some of the subversion docs, and now have the repository in an odd place, and don't see a way to remove that repository to move it elsewhere...
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.


32,932 views.

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.