summaryrefslogtreecommitdiffstats
path: root/src/mxe-conf.mk
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2016-01-07 08:42:44 (GMT)
committerTony Theodore <tonyt@logyst.com>2016-01-12 04:17:21 (GMT)
commitdfec32636625636d85706a815dbb3f3efaab4aad (patch)
treec488e6efb4d8f9e3acbf367af3e9f1ed3ad47153 /src/mxe-conf.mk
parent01dc8941ec047644f8c4c749b6acdbc6a44cc61e (diff)
downloadmxe-dfec32636625636d85706a815dbb3f3efaab4aad.zip
mxe-dfec32636625636d85706a815dbb3f3efaab4aad.tar.gz
mxe-dfec32636625636d85706a815dbb3f3efaab4aad.tar.bz2
Makefile and mxe-conf: create basic non-empty directory hierarchy
https://github.com/mxe/mxe/pull/1061/files#r49049496 https://github.com/mxe/mxe/issues/1111#issuecomment-169280181
Diffstat (limited to 'src/mxe-conf.mk')
-rw-r--r--src/mxe-conf.mk19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mxe-conf.mk b/src/mxe-conf.mk
index 89ce4fb..11e49d8 100644
--- a/src/mxe-conf.mk
+++ b/src/mxe-conf.mk
@@ -7,15 +7,20 @@ $(PKG)_UPDATE := echo 1
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
define $(PKG)_BUILD
+ # create basic non-empty directory hierarchy
+ for d in bin include lib share; do \
+ mkdir -p "$(PREFIX)/$(TARGET)/$$d" && \
+ touch "$(PREFIX)/$(TARGET)/$$d/.gitkeep" ; \
+ done
+
# install target-specific autotools config file
- $(INSTALL) -d '$(PREFIX)/$(TARGET)/share'
# setting ac_cv_build bypasses the config.guess check in every package
echo "ac_cv_build=$(BUILD)" > '$(PREFIX)/$(TARGET)/share/config.site'
# create the CMake toolchain file
# individual packages (e.g. hdf5) should add their
# own files under CMAKE_TOOLCHAIN_DIR
- [ -d '$(CMAKE_TOOLCHAIN_DIR)' ] || mkdir -p '$(CMAKE_TOOLCHAIN_DIR)'
+ mkdir -p '$(CMAKE_TOOLCHAIN_DIR)'
touch '$(CMAKE_TOOLCHAIN_DIR)/.gitkeep'
(echo 'set(CMAKE_SYSTEM_NAME Windows)'; \
echo 'set(MSYS 1)'; \
@@ -67,7 +72,7 @@ define $(PKG)_BUILD
chmod 0755 '$(PREFIX)/bin/$(TARGET)-cmake'
# create pkg-config files for OpenGL/GLU
- $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
+ mkdir -p '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'Name: gl'; \
echo 'Version: 0'; \
echo 'Description: OpenGL'; \
@@ -83,11 +88,11 @@ endef
define $(PKG)_BUILD_$(BUILD)
# install config.guess for general use
- $(INSTALL) -d '$(PREFIX)/bin'
+ mkdir -p '$(PREFIX)/bin'
$(INSTALL) -m755 '$(EXT_DIR)/config.guess' '$(PREFIX)/bin/'
# install cmake modules
- $(INSTALL) -d '$(PREFIX)/share/cmake/modules'
+ mkdir -p '$(PREFIX)/share/cmake/modules'
$(INSTALL) -m644 '$(PWD)/src/cmake/modules/'* '$(PREFIX)/share/cmake/modules'
# fail early if autotools can't autoreconf
@@ -103,7 +108,9 @@ define $(PKG)_BUILD_$(BUILD)
cd '$(1)' && ./configure
#create readonly directory to force wine to fail
- $(INSTALL) -m444 -d "$$WINEPREFIX"
+ mkdir -p "$$WINEPREFIX"
+ touch "$$WINEPREFIX/.gitkeep"
+ chmod 0555 "$$WINEPREFIX"
#create script "wine" in a directory which is in PATH
mkdir -p '$(PREFIX)/$(BUILD)/bin/'