-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now a Makefile is provided for simply building and installation of shellex. A hopefully flexible enough config-scheme is implemented at the same time.
- Loading branch information
Showing
18 changed files
with
183 additions
and
48 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
preload/shellex_preload.so | ||
shellex | ||
urxvt/shellex |
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,23 @@ | ||
TOPDIR=$(shell pwd) | ||
|
||
include $(TOPDIR)/common.mk | ||
|
||
ALL_TARGETS = | ||
INSTALL_TARGETS = | ||
CLEAN_TARGETS = | ||
DISTCLEAN_TARGETS = | ||
|
||
all: real-all | ||
|
||
include preload/preload.mk | ||
include shellex.mk | ||
include urxvt/urxvt_shellex.mk | ||
include conf.mk | ||
|
||
real-all: $(ALL_TARGETS) | ||
|
||
install: $(INSTALL_TARGETS) | ||
|
||
clean: $(CLEAN_TARGETS) | ||
|
||
distclean: clean $(DISTCLEAN_TARGETS) |
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,32 @@ | ||
INSTALL=install | ||
SED=sed | ||
ifndef PREFIX | ||
PREFIX=/usr | ||
endif | ||
ifndef SYSCONFDIR | ||
ifeq ($(PREFIX),/usr) | ||
SYSCONFDIR=/etc | ||
else | ||
SYSCONFDIR=$(PREFIX)/etc | ||
endif | ||
endif | ||
LIBDIR ?= /lib | ||
|
||
SHELLEX_CFLAGS = -std=c99 | ||
SHELLEX_CFLAGS += -Wall | ||
SHELLEX_CFLAGS += -Wunused-value | ||
|
||
sed_replace_vars := -e 's,@DESTDIR@,$(DESTDIR),g' \ | ||
-e 's,@PREFIX@,$(PREFIX),g' \ | ||
-e 's,@LIBDIR@,$(LIBDIR),g' \ | ||
-e 's,@SYSCONFDIR@,$(SYSCONFDIR),g' | ||
|
||
V ?= 0 | ||
ifeq ($(V),0) | ||
# Don't print command lines which are run | ||
.SILENT: | ||
|
||
endif | ||
|
||
# always remake the following targets | ||
.PHONY: install clean dist distclean |
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,15 @@ | ||
INSTALL_TARGETS += install-conf | ||
|
||
default_confs := 10-autoexec 40-escape 40-setprompt 40-sigint 99-clear | ||
|
||
install-conf: | ||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)$(LIBDIR)/shellex/conf | ||
for file in $(wildcard conf/*); \ | ||
do \ | ||
$(INSTALL) -m 0644 $${file} $(DESTDIR)$(PREFIX)$(LIBDIR)/shellex/conf/; \ | ||
done | ||
$(INSTALL) -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/shellex | ||
for link in $(default_confs); \ | ||
do \ | ||
ln -s $(DESTDIR)$(PREFIX)$(LIBDIR)/shellex/conf/$${link} $(DESTDIR)$(SYSCONFDIR)/shellex; \ | ||
done |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
ALL_TARGETS += preload/shellex_preload.so | ||
INSTALL_TARGETS += install-shellex_preload | ||
CLEAN_TARGETS += clean-shellex_preload | ||
|
||
SHELLEX_CFLAGS=-fPIC | ||
SHELLEX_PRELOAD_LDFLAGS=-shared | ||
|
||
preload/shellex_preload.so: preload/main.c | ||
echo "[CC] $@" | ||
$(CC) $(SHELLEX_CPPFLAGS) $(CPPFLAGS) $(SHELLEX_CFLAGS) $(CFLAGS) $(SHELLEX_PRELOAD_CFLAGS) $(LDFLAGS) $(SHELLEX_LDFLAGS) $(SHELLEX_PRELOAD_LDFLAGS) -o $@ $< | ||
|
||
install-shellex_preload: preload/shellex_preload.so | ||
echo "[INSTALL] $<" | ||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)$(LIBDIR)/shellex | ||
$(INSTALL) -m 0755 $< $(DESTDIR)$(PREFIX)$(LIBDIR)/shellex/ | ||
|
||
clean-shellex_preload: | ||
echo "[CLEAN] shellex_preload" | ||
rm -f preload/shellex_preload.so |
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,4 @@ | ||
#!/bin/sh | ||
|
||
export LD_PRELOAD="@DESTDIR@@PREFIX@@LIBDIR@/shellex/shellex_preload.so" | ||
exec urxvt -perl-lib @DESTDIR@@PREFIX@@LIBDIR@/shellex/urxvt -pe shellex -override-redirect -name shellex -e env -u LD_PRELOAD zsh -f |
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,19 @@ | ||
ALL_TARGETS += shellex | ||
INSTALL_TARGETS += install-shellex | ||
CLEAN_TARGETS += clean-shellex | ||
|
||
SHELLEX_CFLAGS=-fPIC | ||
SHELLEX_PRELOAD_LDFLAGS=-shared | ||
|
||
shellex: shellex.in | ||
echo "[SED] $@" | ||
$(SED) $(sed_replace_vars) $< > $@ | ||
|
||
install-shellex: shellex | ||
echo "[INSTALL] $<" | ||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin | ||
$(INSTALL) -m 0755 shellex $(DESTDIR)$(PREFIX)/bin/ | ||
|
||
clean-shellex: | ||
echo "[CLEAN] shellex" | ||
rm -f shellex |
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,16 @@ | ||
ALL_TARGETS += urxvt/shellex | ||
INSTALL_TARGETS += install-urxvt_shellex | ||
CLEAN_TARGETS += clean-urxvt_shellex | ||
|
||
urxvt/shellex: urxvt/shellex.in | ||
echo "[SED] $@" | ||
$(SED) $(sed_replace_vars) $< > $@ | ||
|
||
install-urxvt_shellex: urxvt/shellex | ||
echo "[INSTALL] $<" | ||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)$(LIBDIR)/shellex/urxvt | ||
$(INSTALL) -m 0644 urxvt/shellex $(DESTDIR)$(PREFIX)$(LIBDIR)/shellex/urxvt/ | ||
|
||
clean-urxvt_shellex: | ||
echo "[CLEAN] urxvt/shellex" | ||
rm -f urxvt/shellex |