X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=mk%2Fjam%2Finstall.jam;h=a2cfefd6c425c42693f38732c86887b5c3595e21;hb=d8496f30a608d6827fefdfe33234acb6f4d8f0fe;hp=9d3553ff51c352038a5dddc3fc3ca52f834de342;hpb=6fe1f3519eecbbb75eca97c45a6697eee36b2442;p=supertux.git diff --git a/mk/jam/install.jam b/mk/jam/install.jam index 9d3553ff5..a2cfefd6c 100644 --- a/mk/jam/install.jam +++ b/mk/jam/install.jam @@ -14,6 +14,8 @@ appdatadir ?= [ ConcatDirs $(datadir) $(PACKAGE_NAME) ] ; appdocdir ?= [ ConcatDirs $(datadir) doc $(PACKAGE_NAME)-$(PACKAGE_VERSION) ] ; appconfdir ?= [ ConcatDirs $(sysconfdir) $(PACKAGE_NAME) ] ; plugindir ?= [ ConcatDirs $(libdir) $(PACKAGE_NAME) ] ; +applicationsdir ?= [ ConcatDirs $(datadir) applications ] ; +pixmapsdir ?= [ ConcatDirs $(datadir) pixmaps ] ; ## InstallHeader headername [ : subdir ] ## DoInstall a headerfile into the includedir directory. A subdirectory @@ -85,7 +87,25 @@ rule InstallMan } } -## DoInstall sourcename : directories [ : installapp ] +## InstallPixmap files [ : subdir ] +## Install a pixmap +rule InstallPixmap +{ + LOCATE on $(<:G=installpixmap) = $(SUBDIR) ; + Depends install_data + : [ DoInstall $(<:G=installpixmap) : $(pixmapsdir) $(2) ] ; +} + +## InstallDesktop files [ : subdir ] +## Install a .desktop file (menu entries for kde/gnome and others) +rule InstallDesktop +{ + LOCATE on $(<:G=installdesktop) = $(SUBDIR) ; + Depends install_bin + : [ DoInstall $(<:G=installdesktop) : $(applicationsdir) $(2) ] ; +} + +## DoInstall sourcename : directories [ : installapp ] [ : options ] ## Creates a new installtarget for the given sources. The target(s) are ## returned as function result. rule DoInstall @@ -96,7 +116,7 @@ rule DoInstall gdir = $(dir:G=dir) ; MkDir $(gdir) ; - for i in $(1) { + for i in $(<) { target = $(i:BSR=$(dir):G=install) ; targets += $(target) ; Depends $(target) : $(gdir) $(i) ; @@ -109,6 +129,11 @@ rule DoInstall } } + # We want to package all files we install + if ! [ IsElem nopackage : $(4) ] { + Package $(<) ; + } + Always $(targets) ; return $(targets) ; } @@ -127,7 +152,7 @@ Help install : "Install $(PACKAGE_NAME)" ; actions Install1 { - $(INSTALL) "$(>)" "$(<:D)" $(INSTALLFLAGS) ; + $(INSTALL) "$(>)" "$(<:D)" $(INSTALLIBS) ; } actions CopyDirs