mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Remove the hack to create most Makefile variables on Unix
I've just discovered, quite by accident, a new undocumented feature of qmake: it can write Makefile variables. So let's use this feature where we can instead of our hack. The only thing is that it prepends an "EXPORT_" prefix, so we can't use it for a variable like $(prefix) that Linux distributions are expected to try to modify during make install. I've verified that the feature remains in Qt 5.x. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
607bf47989
commit
775b4f702a
1 changed files with 17 additions and 16 deletions
|
@ -126,38 +126,39 @@ mac {
|
||||||
# We just need to drop a few files here and there
|
# We just need to drop a few files here and there
|
||||||
|
|
||||||
# This is a fake rule just to create some rules in the target file
|
# This is a fake rule just to create some rules in the target file
|
||||||
nl = $$escape_expand(\\n)
|
|
||||||
dummy.target = dummy-only-for-var-expansion
|
dummy.target = dummy-only-for-var-expansion
|
||||||
dummy.commands = $${nl}prefix = /usr$${nl}\
|
dummy.commands = $$escape_expand(\\n)prefix = /usr
|
||||||
BINDIR = $(prefix)/bin$${nl}\
|
|
||||||
DATADIR = $(prefix)/share$${nl}\
|
QMAKE_EXTRA_VARIABLES = BINDIR DATADIR DOCDIR DESKTOPDIR ICONPATH ICONDIR MANDIR
|
||||||
DOCDIR = $(DATADIR)/subsurface/Documentation$${nl}\
|
BINDIR = $(prefix)/bin
|
||||||
DESKTOPDIR = $(DATADIR)/applications$${nl}\
|
DATADIR = $(prefix)/share
|
||||||
ICONPATH = $(DATADIR)/icons/hicolor$${nl}\
|
DOCDIR = $(EXPORT_DATADIR)/subsurface/Documentation
|
||||||
ICONDIR = $(ICONPATH)/scalable/apps$${nl}\
|
DESKTOPDIR = $(EXPORT_DATADIR)/applications
|
||||||
MANDIR = $(DATADIR)/man/man1$${nl}
|
ICONPATH = $(EXPORT_DATADIR)/icons/hicolor
|
||||||
|
ICONDIR = $(EXPORT_ICONPATH)/scalable/apps
|
||||||
|
MANDIR = $(EXPORT_DATADIR)/man/man1
|
||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += dummy
|
QMAKE_EXTRA_TARGETS += dummy
|
||||||
|
|
||||||
WINDOWSSTAGING = ./packaging/windows
|
WINDOWSSTAGING = ./packaging/windows
|
||||||
|
|
||||||
target.path = /$(BINDIR)
|
target.path = /$(EXPORT_BINDIR)
|
||||||
target.files = $$TARGET
|
target.files = $$TARGET
|
||||||
|
|
||||||
desktop.path = /$(DESKTOPDIR)
|
desktop.path = /$(EXPORT_DESKTOPDIR)
|
||||||
desktop.files = $$DESKTOP_FILE
|
desktop.files = $$DESKTOP_FILE
|
||||||
manpage.path = /$(MANDIR)
|
manpage.path = /$(EXPORT_MANDIR)
|
||||||
manpage.files = $$MANPAGE
|
manpage.files = $$MANPAGE
|
||||||
|
|
||||||
icon.path = /$(ICONDIR)
|
icon.path = /$(EXPORT_ICONDIR)
|
||||||
icon.files = $$ICON
|
icon.files = $$ICON
|
||||||
|
|
||||||
marbledir.path = /$(DATADIR)/subsurface/data
|
marbledir.path = /$(EXPORT_DATADIR)/subsurface/data
|
||||||
doc.path = /$(DOCDIR)
|
doc.path = /$(EXPORT_DOCDIR)
|
||||||
|
|
||||||
doc.CONFIG += no_check_exist
|
doc.CONFIG += no_check_exist
|
||||||
|
|
||||||
translation.path = /$(DATADIR)/subsurface/translations
|
translation.path = /$(EXPORT_DATADIR)/subsurface/translations
|
||||||
translation.CONFIG += no_check_exist
|
translation.CONFIG += no_check_exist
|
||||||
|
|
||||||
INSTALLS += target desktop manpage doc marbledir translation icon
|
INSTALLS += target desktop manpage doc marbledir translation icon
|
||||||
|
|
Loading…
Reference in a new issue