Skip to content
Snippets Groups Projects
Commit 0a065ad6 authored by rdubner's avatar rdubner
Browse files

Modify Makefile to behave in the expected way; 'make install' uploads to cobolworx.com

parent fa82a972
No related branches found
Tags v0.2338
No related merge requests found
VERSION_LINE=$(shell grep -e'"version"' package.json | head -n 1 )
VERSION=$(shell echo $(VERSION_LINE) | sed 's/^.* \([0-9.]\+\).*/\1/g')
OUTPUT_FILE=cbl-gdb-$(VERSION).vsix
.PHONY : all package clean
#
# The package is dependent on a zillion files, so a true dependency tree is
# not really feasible. Meanwhile, running vsce package causes the package
# contents to change, because they put a timestamp in there. So, to avoid
# having git go spastic thinking things have changed when they actually haven't,
# this makefile leans in the direction of not doing things until a knowlegeable
# developer tells it to do things.
#
# So, the basic process requires operator intervention. To update the
# distribution package, you need to
#
# make clean && make && make install
#
# Otherwise, make all won't do anything if it sees an existing package.
# and make install won't do anything until it sees a package here that is newer
# than the one in vsdistrib.
node_modules=$(wildcard node_modules)
package=$(wildcard *.vsix)
nopackage=
all:
ifeq ($(node_modules),$(nopackage))
npm install
endif
ifeq ($(package),$(nopackage))
vsce package
endif
INPUT_FILES:=LICENSE.txt package.json README.md Makefile
INPUT_FILES:=$(INPUT_FILES) $(shell find src -iname '*.ts')
#.PHONY : all clean install
all: $(OUTPUT_FILE)
$(OUTPUT_FILE) : $(INPUT_FILES)
# npm install
# npm install -g vsce
vsce package
clean:
rm -f *.vsix
install: ../../vsdistrib/$(package)
install:
scp -p $(OUTPUT_FILE) uploads@cobolworx.com:$(OUTPUT_FILE)
../../vsdistrib/$(package) : $(package)
cp $< $@
.PHONY : all clean install
all:
$(MAKE) -C CblGdb
$(MAKE) -C samples
clean:
$(MAKE) -C CblGdb clean
$(MAKE) -C samples clean
install:
$(MAKE) -C CblGdb install
.PHONY : all clean install
all:
$(MAKE) -C CblGdbExt
clean:
$(MAKE) -C CblGdbExt clean
install:
$(MAKE) -C CblGdbExt install
{
"lockfileVersion": 1
}
.PHONY : all install
all:
# do nothing
install:
./install_vsix
File deleted
File deleted
#! /bin/sh
set -e
#
# This script used to work, and then it stopped, apparently because
# Microsoft changed something in VSCode, or maybe because something
# changed in X, probably as a security measure. The error message
# is
# /usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
#
# So, until I can sort that out, the extension will have to be installed
# manually.
VSIX=`ls --sort=time cbl-gdb*.vsix | head -n1`
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo ""
echo "Please run the following command manually: (The X server won't"
echo "run it from a script.)"
echo ""
echo code --install-extension vsdistrib/$VSIX
echo ""
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
exit 0
SUDO=sudo
# For reasons I don't understand, this routine fails when run as part of
# a Debian package build. When it got tedious, I just decided to elmininate it.
if "X"$DESTDIR = "X" ; then
# Find the most recent VSIX package, and install it
if test -x `command -v code` ; then
if test "X"$VSIX != "X" ; then
echo "Installing $VSIX"
if test "X"$SUDO_USER != "X" ; then
# They must be running as 'sudo make install'
$SUDO -u $SUDO_USER code --force --install-extension $VSIX
else
# They must simply be running as 'make install', meaning that
# the user must've taken ownership of /usr/local/
code --force --install-extension $VSIX
fi
fi
fi
fi
{
"lockfileVersion": 1
}
  • Reporter

    Can you please partially revert this change? Most of this is most reasonable but make install is also something that is "expected to install locally". I therefore suggest the following changes:

    • rename current install target to upload
    • possibly use a make variable for the scp target (defaulting to the current version)
    • re-add the install target (maybe renamed to local-install) to install the previously created extension (which it depends on and therefore will create if missing)
    • use a make variable for CODE, defaulting to code (allowing people to specify a path to it and/or change it to codium)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment