summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--package/info2
-rw-r--r--package/targets.mak40
-rwxr-xr-xtools/install-bins2
-rwxr-xr-xtools/link-bins9
-rwxr-xr-xtools/rename-bins5
-rwxr-xr-xtools/symlink-bins12
7 files changed, 42 insertions, 38 deletions
diff --git a/Makefile b/Makefile
index 182b7c7..1310b12 100644
--- a/Makefile
+++ b/Makefile
@@ -61,7 +61,7 @@ ALL_INCLUDES := $(wildcard src/include/$(package)/*.h)
all: .built
.built: $(ALL_LIBS) $(ALL_BINS) $(ALL_INCLUDES)
- exec ./tools/rename-bins && touch .built
+ exec ./tools/link-bins && touch .built
clean:
@exec rm -f $(ALL_LIBS) $(ALL_BINS) $(wildcard src/*/*.o src/*/*.lo) $(EXTRA_TARGETS)
@@ -89,7 +89,7 @@ install: install-dynlib install-libexec install-bin install-lib install-include
install-dynlib: $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(dynlibdir)/lib%.so)
install-libexec: $(LIBEXEC_TARGETS:%=$(DESTDIR)$(libexecdir)/%)
-install-bin: .installed
+install-bin: .installed $(REAL_TARGETS:%=$(DESTDIR)$(bindir)/%)
.installed: .built
exec ./tools/install-bins $(INSTALL) $(bindir) $(DESTDIR) && touch .installed
@@ -105,10 +105,10 @@ $(DESTDIR)$(exthome): $(DESTDIR)$(home)
update: $(DESTDIR)$(exthome)
-global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M)) .linked
+global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M)) .linked $(REAL_TARGETS:%=$(DESTDIR)$(sproot)/command/%)
-.linked: .installed
- exec ./tools/link-bins $(INSTALL) $(bindir) x$(sproot) x$(home) x$(exthome) $(DESTDIR) && touch .linked
+.linked: .installed
+ exec ./tools/symlink-bins $(INSTALL) $(bindir) x$(sproot) x$(home) x$(exthome) $(DESTDIR) && touch .linked
$(DESTDIR)$(sproot)/command/%: $(DESTDIR)$(home)/command/%
exec $(INSTALL) -D -l ..$(subst $(sproot),,$(exthome))/command/$(<F) $@
diff --git a/package/info b/package/info
index 6bfc977..8fd600f 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=execline
-version=2.3.0.4
+version=2.4.0.0
category=admin
package_macro_name=EXECLINE
diff --git a/package/targets.mak b/package/targets.mak
index 04eb36d..c4aee33 100644
--- a/package/targets.mak
+++ b/package/targets.mak
@@ -1,42 +1,25 @@
-BIN_TARGETS := \
-background \
-backtick \
+REAL_TARGETS := \
cd \
-define \
-dollarat \
elgetopt \
elgetpositionals \
-elglob \
emptyenv \
exec \
execlineb \
exit \
export \
fdblock \
-fdclose \
-fdmove \
-fdswap \
-fdreserve \
forbacktickx \
-foreground \
forstdin \
forx \
getcwd \
-getpid \
-heredoc \
-homeof \
-if \
ifelse \
ifte \
ifthenelse \
import \
-importas \
loopwhilex \
multidefine \
multisubstitute \
-pipeline \
piperw \
-redirfd \
runblock \
shift \
trap \
@@ -46,6 +29,27 @@ unexport \
wait \
withstdinas
+CHANGED_TARGETS := \
+background \
+backtick \
+define \
+dollarat \
+elglob \
+fdclose \
+fdmove \
+fdswap \
+fdreserve \
+foreground \
+getpid \
+heredoc \
+homeof \
+if \
+importas \
+pipeline \
+redirfd
+
+BIN_TARGETS := $(REAL_TARGETS) $(CHANGED_TARGETS)
+
LIBEXEC_TARGETS :=
LIB_DEFS := EXECLINE=execline
diff --git a/tools/install-bins b/tools/install-bins
index 143843a..db262da 100755
--- a/tools/install-bins
+++ b/tools/install-bins
@@ -5,5 +5,5 @@ bindir="$2"
destdir="$3"
while read old new html ; do
- "$install" -D -m 600 "$new" "$destdir/$bindir/$new"
+ "$install" -D -m 0755 "$new" "$destdir/$bindir/$new"
done < ./tools/name-table
diff --git a/tools/link-bins b/tools/link-bins
index 5e45ec5..50e7981 100755
--- a/tools/link-bins
+++ b/tools/link-bins
@@ -1,12 +1,5 @@
#!/bin/sh -e
-install="$1"
-bindir="$2"
-sproot="${3#x}"
-home="${4#x}"
-exthome="${5#x}"
-destdir="$6"
-
while read old new html ; do
- "$install" -D -m 600 "$new" "$destdir/$bindir/$new"
+ ln -f "./$old" "./$new"
done < ./tools/name-table
diff --git a/tools/rename-bins b/tools/rename-bins
deleted file mode 100755
index a613278..0000000
--- a/tools/rename-bins
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh -e
-
-while read old new html ; do
- mv -f "./$old" "./$new"
-done < ./tools/name-table
diff --git a/tools/symlink-bins b/tools/symlink-bins
new file mode 100755
index 0000000..2e8f790
--- /dev/null
+++ b/tools/symlink-bins
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+install="$1"
+bindir="$2"
+sproot="${3#x}"
+home="${4#x}"
+exthome="${5#x}"
+destdir="$6"
+
+while read old new html ; do
+ "$install" -D -l "../package/admin/execline/command/$new" "$destdir/command/$new"
+done < ./tools/name-table