summaryrefslogtreecommitdiff
path: root/rvs/wrapper/main.mk.in
diff options
context:
space:
mode:
authorLuke Shumaker <luke@HP-dv6246us-u910.(none)>2010-03-28 12:25:08 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:19 -0600
commit98f2efbe20e2d9d03e5296293cc8f52c95af72f5 (patch)
treedf5ab79539c7a4b5bc5a056dc14a4f7a4c5be665 /rvs/wrapper/main.mk.in
parentd4a42ee34928970141b8299c104d47c0f3faecd0 (diff)
Rework rvs a lot (no longer needs complex C dependency tracker!)
Rework ./configure, and how it uses `srcdir'. Probably broke all the other packages. Oh well, everything only half-works right now.
Diffstat (limited to 'rvs/wrapper/main.mk.in')
-rw-r--r--rvs/wrapper/main.mk.in57
1 files changed, 23 insertions, 34 deletions
diff --git a/rvs/wrapper/main.mk.in b/rvs/wrapper/main.mk.in
index ecc6cc6..0f24d6b 100644
--- a/rvs/wrapper/main.mk.in
+++ b/rvs/wrapper/main.mk.in
@@ -17,59 +17,48 @@ ver = 0.9
# along with this program; see the file COPYING.
# If not, see <http://www.gnu.org/licenses>.
-rvs = @name@
-dirs += $(libexecdir)/$(rvs)
-
-CFLAGS = -g \
- -DNAME=\"$(name)\" \
- -DVER=\"$(ver)\" \
- -Dlibexecdir=\"$(libexecdir)/$(rvs)\" \
- -Dplugin_conf=\"plugin.conf\"
+sysconfdir ?= @sysconfdir@
+BINDIR ?= @BINDIR@
+TMPDIR ?= @TMPDIR@
+LIBDIR ?= @LIBDIR@
+ETCDIR ?= @ETCDIR@
+dirs += $(sysconfdir) $(BINDIR) $(TMPDIR) $(LIBDIR) $(ETCDIR)
# phony targets ####################################################
-all : Makefiles rvs runcom
-.PHONY : install uninstall clean distclean dist install-runcom
-.SUFFIXES : .c .o
-VPATH = $(srcdir)/wrapper
-filelist=$(patsubst $(srcdir)/wrapper/%,%,$(shell find $(srcdir)/wrapper/* -type f))
+.PHONY : all
+all : Makefiles rvs
+VPATH = $(srcdir)
+filelist=$(patsubst $(srcdir)/%,%,$(shell find $(srcdir)/* -type f))
# most everything ##################################################
-RUNCOM = $(DESTDIR)$(libexecdir)/$(rvs)/runcom
-install : $(RVS) $(RUNCOM)
-$(RVS) : rvs $(dir $(RVS))
- $(INSTALL_PROGRAM) $< $@
-
-OBJ = runcom.o rvs.o plugins.o \
- plugin-depend.o \
- plugin-find.o \
- plugin-load.o \
- plugin-parse.o \
- plugin-run.o \
-runcom: $(OBJ)
- $(CC) -o $@ $^
-
-$(RUNCOM): runcom $(dir $(RUNCOM))
+# the installed wrapper
+$(RVS) : rvs $(dir $(RVS))
$(INSTALL_PROGRAM) $< $@
+# build the wrapper
b := @
-# build shell scripts
rvs : rvs.sh
$(INSTALL_PROGRAM) $< $@
$(SED) -i \
-e 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' \
- -e 's/$bname@/$(rvs)/g' \
- -e 's/$blibexecdir@/$(subst /,\/,$(libexecdir))/g' \
+ -e 's/$bname@/$(subst /,\/,$(rvs))/g' \
+ -e 's/$bBINDIR@/$(subst /,\/,$(BINDIR))/' \
+ -e 's/$bTMPDIR@/$(subst /,\/,$(TMPDIR))/' \
+ -e 's/$bLIBDIR@/$(subst /,\/,$(LIBDIR))/' \
+ -e 's/$bETCDIR@/$(subst /,\/,$(ETCDIR))/' \
$@
+# standard targes ####################################################
+.PHONY : install uninstall clean distclean
+install : $(RVS)
+
uninstall :
$(RM) $(RVS)
- $(RM) $(DESTDIR)$(libexecdir)/$(rvs)/runcom
clean :
- $(RM) *.o *.d
distclean : clean
$(RM) rvs
- $(RM) Makefile
+ $(RM) Makefile *.mk