From 6ce0d5b84b597b5b95ae1124c4bc1d719c1edecf Mon Sep 17 00:00:00 2001 From: Geert Stappers Date: Sat, 5 Feb 2022 22:19:00 +0100 Subject: [PATCH] Reuse the tio_SOURCES variable in src/Makefile.am The only difference between `tio` and `tionc` is the compile time flag 'TIO_NOCOLOR'. --- src/Makefile.am | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 1e76394..6550197 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,26 +14,14 @@ tio_SOURCES = tty.c \ include/tio/log.h \ include/tio/error.h -tionc_SOURCES = tty.c \ - options.c \ - time.c \ - main.c \ - log.c \ - error.c \ - include/tio/tty.h \ - include/tio/options.h \ - include/tio/time.h \ - include/tio/print.h \ - include/tio/log.h \ - include/tio/error.h - -tionc_CFLAGS = -D TIO_NOCOLOR - if ADD_SETSPEED2 tio_SOURCES += setspeed2.c -tionc_SOURCES += setspeed2.c endif +tionc_SOURCES = $(tio_SOURCES) + +tionc_CFLAGS = -D TIO_NOCOLOR + if ENABLE_BASH_COMPLETION bashcompletiondir=@BASH_COMPLETION_DIR@ bashcompletion_DATA=bash-completion/tio