Jump to content
  • Advertisement
Sign in to follow this  

Something is wrong with my Makefile, please help?

This topic is 4951 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Something is wrong with this Makefile for an installer for an application that I am developing at work. It is supposed to, in the end, create the file located at cd/autorun.inf but every time I run make it re-builds everything from ground-zero (all dependencies are build, even if they ARE updated.) Can anyone find any obvious mistakes here? [help] Thanks.
# Makefile for installer




# autorun.inf is the last file to be created
all: cd/autorun.inf

	rm -rf final
	rm -rf cd
	rm -f eula.con
	rm -f eula.ref
	rm -f eula.pds

# Autorun file for CD
cd/autorun.inf: cd
	echo [autorun] > $@
	echo icon=install.ico >> $@

# Final CD directory
	mkdir $@
	cp --target-directory=$@ $^

# The installer executable

	mkdir $@
	cp ../client/client.exe $@
	cp -r ../client/profiles $@
	rm -rf `find $@ -name ".svn" -type d`

# TeX -> RTF
	tex2rtf $< $@

Share this post

Link to post
Share on other sites
Original post by igni ferroque
Not seeing anything immediately. Have you checked if it's a file modification date issue?


Does make take a directory as a target the same way it does as with a file?

Share this post

Link to post
Share on other sites
Can anyone tell me if make takes a directory or a file in a directory as a target? For example, is a target sutch as cd/autorun.inf legal?


Share this post

Link to post
Share on other sites
I don't know whether it accepts the directory as part of the target, but I just thought I'd point out that in order for it to work, it'd have to accept the directory as a *dependancy* too. That might be problematic: it might decide to rebuild "cd" from scratch because it doesn't see a *regular file* "cd".

If that's the real problem, you might try hacking it like this:

# Autorun file for CD
cd/autorun.inf: cd_built
# do the necessary stuff

# Final CD directory
cd_built: $(CLIENT_APP_ORIGINALFILENAME) install.ico
# Create cd directory
touch cd_built # i.e. create a *file* indicating that the dependancy is satisfied

But I'm completely guessing.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!