-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
234 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
###################################### | ||
# CUSTOM | ||
###################################### | ||
|
||
configure.in | ||
Makefile.in | ||
|
||
|
||
###################################### | ||
# GENERIC | ||
###################################### | ||
|
||
###### std ###### | ||
.lock | ||
*.log | ||
|
||
###### patches/diffs ###### | ||
*.patch | ||
*.diff | ||
*.orig | ||
*.rej | ||
|
||
|
||
###################################### | ||
# Operating Systems | ||
###################################### | ||
|
||
###### OSX ###### | ||
._* | ||
.DS* | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
###### Windows ###### | ||
Thumbs.db | ||
ehthumbs.db | ||
Desktop.ini | ||
$RECYCLE.BIN/ | ||
*.lnk | ||
|
||
|
||
###################################### | ||
# Editors | ||
###################################### | ||
|
||
###### Sublime ###### | ||
*.sublime-workspace | ||
*.sublime-project | ||
|
||
###### Eclipse ###### | ||
.classpath | ||
.buildpath | ||
.project | ||
.settings/ | ||
|
||
###### Netbeans ###### | ||
nbproject/private/ | ||
|
||
###### Intellij IDE ###### | ||
.idea/ | ||
.idea_modules/ | ||
|
||
###### vim ###### | ||
*.swp | ||
*.swo | ||
*~ | ||
|
||
###### TextMate ###### | ||
.tm_properties | ||
*.tmproj | ||
|
||
###### BBEdit ###### | ||
*.bbprojectd | ||
*.bbproject |
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,62 @@ | ||
# Unix Makefile | ||
|
||
# Configuration | ||
SHELL = /bin/sh | ||
|
||
MKDIR_P = mkdir -p | ||
|
||
# Check if './configure' has been run | ||
ifneq ("$(wildcard configure.in)","") | ||
CONFIGURED = 1 | ||
include configure.in | ||
else | ||
CONFIGURED = 0 | ||
endif | ||
|
||
|
||
all: | ||
|
||
ifeq ($(CONFIGURED),0) | ||
$(error Not configured, run ./configure) | ||
endif | ||
|
||
|
||
@echo "Nothing to make." | ||
@echo "Type 'make install'" | ||
|
||
|
||
help: | ||
@echo Options | ||
@echo " make install" | ||
@echo " Install everthing (requires sudo or root)" | ||
@echo "" | ||
@echo " make clean" | ||
@echo " Clean build" | ||
@echo "" | ||
@echo " make help" | ||
@echo " Show this help screen" | ||
|
||
|
||
install: | ||
|
||
|
||
@echo "Installing files" | ||
@echo "" | ||
|
||
@# Create directories | ||
${MKDIR_P} $(BINDIR) | ||
|
||
@# Install binary | ||
install -m 0755 dependencies/* $(BINDIR)/ | ||
install -m 0755 bin/* $(BINDIR)/ | ||
|
||
|
||
@echo "Installation complete:" | ||
@echo "----------------------------------------------------------------------" | ||
@echo "" | ||
|
||
|
||
clean: | ||
|
||
rm -f configure.in | ||
|
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,70 @@ | ||
#!/bin/sh | ||
|
||
# This is a leight-weight self-styled configure script | ||
|
||
|
||
PREFIX="" | ||
|
||
print_help() { | ||
|
||
echo "Usage: configure [--prefix]" | ||
echo "" | ||
echo "--prefix Specify custom install prefix." | ||
echo " e.g. --prefix=/usr/local" | ||
echo "" | ||
} | ||
|
||
|
||
while [ $# -gt 0 ]; do | ||
|
||
case "$1" in | ||
|
||
--help) | ||
print_help | ||
exit 0 | ||
;; | ||
|
||
--prefix*) | ||
CUSTOM_PREFIX="$(echo "$1" | $(which sed) 's/^--prefix=//g')" | ||
# Remove trailing slash | ||
CUSTOM_PREFIX="/$(echo "${CUSTOM_PREFIX}" | $(which sed) 's#/*$##;s#^/*##')" | ||
PREFIX="${CUSTOM_PREFIX}" | ||
;; | ||
|
||
*) | ||
echo "Invalid argument: '${1}'" | ||
echo "Type '${0} --help' for available options." | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
|
||
if [ -z "${PREFIX}" ]; then | ||
BINDIR="/usr/bin" | ||
else | ||
BINDIR="${PREFIX}/bin" | ||
fi | ||
|
||
|
||
|
||
# Write configure configuration file | ||
echo "PREFIX = ${PREFIX}" > configure.in | ||
echo "ETCDIR = ${ETCDIR}" >> configure.in | ||
echo "BINDIR = ${BINDIR}" >> configure.in | ||
echo "MANDIR = ${MANDIR}" >> configure.in | ||
|
||
echo "" | ||
echo "Configure run successfully" | ||
echo "" | ||
if [ -z "${PREFIX}" ]; then | ||
echo " Install prefix: /" | ||
else | ||
echo " Install prefix: ${PREFIX}" | ||
fi | ||
echo "" | ||
echo " ${BINDIR}/" | ||
echo "" | ||
echo "Run 'make install' to install" | ||
exit 0 |