mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
run.mk: Clean up shortcut target
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
eac123833a
commit
38ded5c4b1
2 changed files with 10 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
PREREQ_INSTALLED_TARGETS += run gdb valgrind attach attach-strace libpath valgrind strace debug lldb echo-prereq
|
||||
PREREQ_INSTALLED_TARGETS += run gdb valgrind attach attach-strace libpath valgrind strace debug lldb echo-prereq shortcut
|
||||
|
||||
ifneq ($(filter $(PREREQ_INSTALLED_TARGETS),$(MAKECMDGOALS)),)
|
||||
PREREQ_BUILD += $(shell ls /etc/ld.so.conf.d | sed '/ld-.*.conf/ !d; s/ld-\(.*\).conf/\1/')
|
||||
|
|
|
|||
22
make/run.mk
22
make/run.mk
|
|
@ -16,14 +16,15 @@ endif
|
|||
ifneq ($(EXE_BASENAME),)
|
||||
ifneq ($(TARGET),mingw)
|
||||
EXE ?= $(EXE_BASENAME)
|
||||
SHORTCUT_SCRIPT ?= ./run.sh
|
||||
else
|
||||
EXE ?= $(EXE_BASENAME).exe
|
||||
SHORTCUT_SCRIPT ?= run.bat
|
||||
endif
|
||||
endif
|
||||
|
||||
EXE_PATH ?= ./$(EXE)
|
||||
CHECK_CONF_EXE ?= $(firstword $(wildcard $(CVS_PROJ_DIR)/valdi/bin/checkconf) checkconf)
|
||||
SHORTCUT_SCRIPT ?= ./run.sh
|
||||
|
||||
LOCAL_CFLAGS += -DEXE_NAME=\"$(EXE)\"
|
||||
LOCAL_CPPFLAGS += -DEXE_NAME=\"$(EXE)\"
|
||||
|
|
@ -58,11 +59,6 @@ start: run-prereq
|
|||
@echo -e "set PATH=%PATH;$(DLL_PATH)\n" \
|
||||
"$(EXE_PATH) $(EXE_ARGS)" | wine cmd &
|
||||
|
||||
clean: winrunclean
|
||||
|
||||
winrunclean:
|
||||
rm -f start.bat
|
||||
|
||||
else
|
||||
run test: run-prereq
|
||||
rm -f core.*
|
||||
|
|
@ -71,11 +67,16 @@ start: run-prereq
|
|||
rm -f core.*
|
||||
$(EXE_PATH) $(EXE_ARGS) &
|
||||
|
||||
shortcut: $(SHORTCUT_SCRIPT)
|
||||
$(SHORTCUT_SCRIPT):
|
||||
echo -e "#!/bin/bash\n\nexport LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)\nexport PATH=$(PATH)\n$(EXE_PATH) $(EXE_ARGS)" > $@.tmp
|
||||
ifeq ($(TARGET),mingw)
|
||||
echo "set PATH=%PATH;$(DLL_PATH)" > $@.tmp
|
||||
echo "$(EXE_PATH) $(EXE_ARGS)" >> $@.tmp
|
||||
else
|
||||
echo -e "#!/bin/bash\n\nrm -f core.*\nexport LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)\nexport PATH=$(PATH)\n$(EXE_PATH) $(EXE_ARGS)" > $@.tmp
|
||||
chmod 755 $@.tmp
|
||||
endif
|
||||
mv $@.tmp $@
|
||||
shortcut: $(SHORTCUT_SCRIPT)
|
||||
distclean.shortcut:
|
||||
rm -f $(SHORTCUT_SCRIPT)
|
||||
distclean: distclean.shortcut
|
||||
|
|
@ -167,8 +168,3 @@ kcg:
|
|||
|
||||
clean: runclean localclean
|
||||
|
||||
start.bat:
|
||||
echo "set PATH=%PATH;$(DLL_PATH)" > $@.tmp
|
||||
echo "$(EXE_PATH) $(EXE_ARGS)" >> $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue