Jump to content

Minor error in makefile


Guest Enverex

Recommended Posts

Guest Enverex

At almost the very bottom:

 

install-data-hook:
	rm -f $(bindir)/plugins/libgemrb_core.so
	mkdir -p $(bindir)/Cache 2>/dev/null
	rm -rf $(bindir)/Cache/*

 

Should be:

 

install-data-hook:
	rm -f $(bindir)/plugins/libgemrb_core.so
	mkdir -p $(DESTDIR)/$(bindir)/Cache 2>/dev/null
	rm -rf $(bindir)/Cache/*

 

The original works normally, but things that build the program strictly will barf if it tries to do what it does originally (basically writing where it shouldn't).

 

Ex.

Link to comment
At almost the very bottom:

 

install-data-hook:
	rm -f $(bindir)/plugins/libgemrb_core.so
	mkdir -p $(bindir)/Cache 2>/dev/null
	rm -rf $(bindir)/Cache/*

 

Should be:

 

install-data-hook:
	rm -f $(bindir)/plugins/libgemrb_core.so
	mkdir -p $(DESTDIR)/$(bindir)/Cache 2>/dev/null
	rm -rf $(bindir)/Cache/*

 

The original works normally, but things that build the program strictly will barf if it tries to do what it does originally (basically writing where it shouldn't).

 

Ex.

 

Shouldn't the rm work on the same directory mkdir just created?

Link to comment
Guest Guest

At almost the very bottom:

 

install-data-hook:
	rm -f $(bindir)/plugins/libgemrb_core.so
	mkdir -p $(bindir)/Cache 2>/dev/null
	rm -rf $(bindir)/Cache/*

 

Should be:

 

install-data-hook:
	rm -f $(bindir)/plugins/libgemrb_core.so
	mkdir -p $(DESTDIR)/$(bindir)/Cache 2>/dev/null
	rm -rf $(bindir)/Cache/*

 

The original works normally, but things that build the program strictly will barf if it tries to do what it does originally (basically writing where it shouldn't).

 

Ex.

 

Shouldn't the rm work on the same directory mkdir just created?

 

Yup. forgot that bit. Piping errors to /dev/null is naughty too though ;)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...