From 119c96b9da93e99e0e382ea0a5755eb3f3bfeefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Tue, 14 Jun 2022 22:09:07 +0100 Subject: [PATCH] Rebuild false.c in coreutils 5. This was spotted in #176. Note that coreutils 8.32 does not need to rebuild false.c as it implements it via compile-time #defines. --- sysa/coreutils-5.0/coreutils-5.0.kaem | 3 +++ sysa/coreutils-5.0/coreutils-5.0.sh | 3 +++ sysa/coreutils-5.0/mk/main.mk | 7 +++++++ sysa/coreutils-5.0/mk/pass2.mk | 7 +++++++ 4 files changed, 20 insertions(+) diff --git a/sysa/coreutils-5.0/coreutils-5.0.kaem b/sysa/coreutils-5.0/coreutils-5.0.kaem index b53323b..476592e 100755 --- a/sysa/coreutils-5.0/coreutils-5.0.kaem +++ b/sysa/coreutils-5.0/coreutils-5.0.kaem @@ -24,6 +24,9 @@ cp lib/ftw_.h lib/ftw.h cp lib/search_.h lib/search.h catm config.h +# We will rebuild it +rm src/false.c + patch -Np0 -i ../../patches/modechange.patch patch -Np0 -i ../../patches/mbstate.patch patch -Np0 -i ../../patches/ls-strcmp.patch diff --git a/sysa/coreutils-5.0/coreutils-5.0.sh b/sysa/coreutils-5.0/coreutils-5.0.sh index 55473a1..55ccb6e 100755 --- a/sysa/coreutils-5.0/coreutils-5.0.sh +++ b/sysa/coreutils-5.0/coreutils-5.0.sh @@ -12,6 +12,9 @@ src_prepare() { cp lib/search_.h lib/search.h touch config.h + # Rebuild pregenerated file + rm -f src/false.c + # Bison pre-generated file rm lib/getdate.c diff --git a/sysa/coreutils-5.0/mk/main.mk b/sysa/coreutils-5.0/mk/main.mk index 7306f0f..b2c31a0 100644 --- a/sysa/coreutils-5.0/mk/main.mk +++ b/sysa/coreutils-5.0/mk/main.mk @@ -86,6 +86,13 @@ LIB_SRC = acl posixtm posixver strftime getopt getopt1 hash hash-pjw addext argm LIB_OBJECTS = $(addprefix $(LIB_DIR)/, $(addsuffix .o, $(LIB_SRC))) +$(SRC_DIR)/false.c: $(SRC_DIR)/true.c + cp $< $@ + sed -i -e s/true/false/g \ + -e s/success/failure/g \ + -e 's/(EXIT_SUCCESS)/(EXIT_FAILURE)/g' \ + $@ + $(LIB_DIR)/libfettish.a: $(LIB_OBJECTS) $(AR) cr $@ $^ diff --git a/sysa/coreutils-5.0/mk/pass2.mk b/sysa/coreutils-5.0/mk/pass2.mk index 06012a6..128aace 100644 --- a/sysa/coreutils-5.0/mk/pass2.mk +++ b/sysa/coreutils-5.0/mk/pass2.mk @@ -96,6 +96,13 @@ LIB_SRC = acl alloca posixtm posixver strftime getopt getopt1 hash hash-pjw adde LIB_OBJECTS = $(addprefix $(LIB_DIR)/, $(addsuffix .o, $(LIB_SRC))) +$(SRC_DIR)/false.c: $(SRC_DIR)/true.c + cp $< $@ + sed -i -e s/true/false/g \ + -e s/success/failure/g \ + -e 's/(EXIT_SUCCESS)/(EXIT_FAILURE)/g' \ + $@ + $(LIB_DIR)/libfettish.a: $(LIB_OBJECTS) $(AR) cr $@ $^