Everywhere: Remove everything non-essential for "make clean all"

This commit removes everything not strictly necessary for running
"make clean all" inside jw-build.

packaging jw-devtest. This cuts the repo down from 24077 to 4725
lines of code.

The idea is to

1) Further remove bloat from the remaining bits

2) Re-add what's necessary to build and package other essential repos.

   The decision should be based on whether or not jw-build can also be
   useful in a non-janware context.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-14 15:02:56 +01:00
commit bc883deed4
199 changed files with 0 additions and 18851 deletions

View file

@ -1,54 +0,0 @@
SOURCE_FILES ?= $(filter-out CVS .git $(LOCAL_MKFILES) %.done, $(wildcard *))
TARGET_DIR ?= $(PREFIX)/share
SOURCE_BASE ?= .
RELPATHS = $(foreach f,$(SOURCE_FILES),$(shell realpath -s --relative-to "$(SOURCE_BASE)" "$f"))
INSTALLED_FILES = $(addprefix $(TARGET_DIR)/,$(RELPATHS))
include $(JWBDIR)/make/defs.mk
include $(JWBDIR)/make/dev-utils.mk
ifeq ($(DEVELOPMENT),true)
TARGET_OWNER ?= $(shell id -un)
TARGET_GROUP ?= $(shell id -gn)
else
TARGET_OWNER ?= root
TARGET_GROUP ?= root
endif
TARGET_DIR_OWNER ?= $(TARGET_OWNER)
TARGET_DIR_GROUP ?= $(TARGET_GROUP)
TARGET_MODE ?= 440
TARGET_DIR_MODE ?= 770
all:
install: install.done
clean: done.clean
distclean:
done.clean:
$(RM) -f *.done
$(TARGET_DIR)/%: $(SOURCE_BASE)/%
@if [ -L "$<" -o -f "$<" ]; then \
echo $(INSTALL) -p -D -m $(TARGET_MODE) -o $(TARGET_OWNER) -g $(TARGET_GROUP) "$<" "$@" ;\
$(INSTALL) -p -D -m $(TARGET_MODE) -o $(TARGET_OWNER) -g $(TARGET_GROUP) "$<" "$@" ;\
else \
echo $(INSTALL) -d -D -m $(TARGET_DIR_MODE) -o $(TARGET_DIR_OWNER) -g $(TARGET_DIR_GROUP) "$@" ;\
$(INSTALL) -d -D -m $(TARGET_DIR_MODE) -o $(TARGET_DIR_OWNER) -g $(TARGET_DIR_GROUP) "$@" ;\
fi
install.done: $(INSTALLED_FILES)
touch $@
# this used to work fine until an enormous $(SOURCE_FILES) was encountered
install-old.done:
for f in $(SOURCE_FILES); do \
relpath=`realpath -s --relative-to "$(SOURCE_BASE)" "$$f"` ;\
if [ -d "$$f" ]; then \
$(INSTALL) -d -D -m $(TARGET_DIR_MODE) -o $(TARGET_DIR_OWNER) -g $(TARGET_DIR_GROUP) "$(TARGET_DIR)/$$relpath" ;\
else \
$(INSTALL) -p -D -m $(TARGET_MODE) -o $(TARGET_OWNER) -g $(TARGET_GROUP) "$$f" "$(TARGET_DIR)/$$relpath" ;\
fi ;\
done
touch $@