mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Add functionality for generating autocompletion scripts, allowing for tab completion of tool options for bash and zsh. This functionality relies on reading the available options from the util_opt struct at runtime. The script generation happens on the build system. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Szabina Korbai <szkorbai@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
25 lines
455 B
Makefile
25 lines
455 B
Makefile
include ../common.mak
|
|
include ../common_autocomp.mak
|
|
|
|
lib := libutil.a
|
|
|
|
sources := $(filter-out %_example.c %_host.c, $(wildcard *.c))
|
|
objects := $(patsubst %.c,%.o,$(sources))
|
|
|
|
autocomp-object := util_autocomp_host.o
|
|
|
|
examples := $(patsubst %.c,%,$(wildcard *_example.c))
|
|
|
|
all: $(lib) $(autocomp-object)
|
|
examples: $(examples)
|
|
|
|
$(examples): %: %.o $(lib)
|
|
|
|
$(lib): $(objects)
|
|
$(lib): ALL_CFLAGS += -fPIC
|
|
|
|
install: all
|
|
|
|
clean:
|
|
rm -f *.o $(lib) $(examples)
|