Hi all,

Missing install target in Makefiles is a significant gap in support of 
Unix-like systems by Premake. I'd like to fill it.

In forum discussion [1] generic API for file installation was discussed. Here 
is the version I'm considering to use for now:
-----------------------------------------------------------------------------
install {
  ["/usr/local/share"] = { "A", "B" },  -- 'A' and 'B' are files or project 
names, using default file permissions
  ["/usr/local/bin"] = { "C", "D", perms=755 }
}
-----------------------------------------------------------------------------

However, there are two issues:

1. We need to support what autotools call "DESTDIR" and some others call 
"installation prefix" or "INSTALL_ROOT" - root directory, defining base path 
for installation. In Makefile, it should probably be $(DESTDIR) variable. Is it 
OK to expose raw Makefile synatax here:
-----------------------------------------------------------------------------
install {
  ["$(DESTDIR)/share"] = { "A", "B" },  -- default perms
  ["$(DESTDIR)/bin"] = { "C", "D", perms=755 }
}
-----------------------------------------------------------------------------
or should it be some Makefile-independent pattern like
-----------------------------------------------------------------------------
install {
  ["%prefix/share"] = { "A", "B" },  -- default perms
  ["%prefix/bin"] = { "C", "D", perms=755 }
}
-----------------------------------------------------------------------------
?

2. Simplest case of installation is exactly one file (library or executable) 
per project, and it could be more easy to use. Probably something like 
installpath API with kind = "string" and scope = "config". How DESTDIR issue 
should be handled here?


P.S. Considering Premake is not a make-centric tool, I'm also planning to add 
"install" action accepting option like "--prefix" or "--destdir", doing similar 
thing as "make install" in makefile.


[1] http://industriousone.com/topic/concatenation-lists-api


-- 
Regards,
Konstantin

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Premake-users mailing list
Premake-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/premake-users

Reply via email to