-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #953 from alerque/less-auto-automake
- Loading branch information
Showing
5 changed files
with
110 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
SUPPORTED_LUAS = 5.3 5.2 5.1 | ||
|
||
LUAROCKS := luarocks --tree lua_modules --lua-version $(LUA_VERSION) | ||
|
||
if !SYSTEM_LUAROCKS | ||
nobase_nodist_pkgdata_DATA = $(LUAMODULES) | ||
LUAMODLOCK := sile-dev-1.rockslock | ||
LUAMODSPEC := sile-dev-1.rockspec | ||
genrockslock := $(LUAROCKS) $(LUAROCKSARGS) list --porcelain | awk '{print $$1 " " $$2}' | ||
rocksmatch := cmp -s $(LUAMODLOCK) <($(genrockslock)) | ||
endif | ||
|
||
.PHONY: installrocks disallow-dist-with-system-luarocks | ||
if !SYSTEM_LUAROCKS | ||
installrocks: $(LUAMODLOCK) $(shell $(rocksmatch) || echo lua_modules) | ||
|
||
lua_modules: $(LUAMODSPEC) $(shell $(rocksmatch) || echo force) | ||
if test -e .git; then | ||
$(LUAROCKS) $(LUAROCKSARGS) install --only-deps $< | ||
else | ||
rm -rf lua_modules | ||
cp -a lua_modules_dist lua_modules | ||
$(foreach LUA,$(filter-out $(LUA_VERSION),$(SUPPORTED_LUAS)), | ||
find lua_modules -maxdepth 3 -type d -name "*$(LUA)" -execdir rm -rf {} \;) | ||
fi | ||
|
||
$(LUAMODLOCK): lua_modules $(LUAMODSPEC) | ||
$(genrockslock) > $@ | ||
|
||
sile: installrocks | ||
|
||
disallow-dist-with-system-luarocks: ; | ||
else | ||
disallow-dist-with-system-luarocks: | ||
$(error In order to make dist you must configure --without-system-luarocks) | ||
exit 1 | ||
endif | ||
|
||
.PHONY: lua_modules_dist | ||
lua_modules_dist: LUAROCKS = luarocks --tree lua_modules_dist | ||
lua_modules_dist: $(LUAMODSPEC) force disallow-dist-with-system-luarocks | ||
$(foreach LUA,$(SUPPORTED_LUAS), | ||
$(LUAROCKS) $(LUAROCKSARGS) --lua-version $(LUA) install --only-deps $<) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
echo -n "nobase_dist_pkgdata_DATA =" | ||
find core classes languages packages lua-libraries -type f -name '*.lua' -printf ' %p' | ||
find classes -type f -name '*.sil' -printf ' %p' | ||
|
||
echo -ne "\nLUAMODULES =" | ||
find lua_modules -type f -not -name '*~' -printf ' %p' ||: | ||
|
||
echo -ne "\nLUAMODULESDIST =" | ||
find lua_modules_dist -type f -not -name '*~' -printf ' %p' ||: | ||
|
||
echo -ne "\nTESTSRCS ?=" | ||
find tests -maxdepth 1 -type f -name '*.sil' -printf ' %p' | ||
find tests -maxdepth 1 -type f -name '*.xml' -printf ' %p' | ||
|
||
echo -ne "\nTESTEXPECTS ?=" | ||
find tests -maxdepth 1 -type f -name '*.expected' -printf ' %p' | ||
|
||
echo -ne "\nEXAMPLESSRCS =" | ||
find examples -maxdepth 1 -type f -name '*.sil' -printf ' %p' | ||
find examples/docbook -maxdepth 1 -type f -name '*.xml' -printf ' %p' |