From cad62551c5fa9865dbe0841a0b3bc729c4fbe8fc Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Fri, 26 Jun 2009 20:36:45 +0300 Subject: Ugly hack to make it possible to use the thousand separator format character with snprintf() on POSIX systems but not on non-POSIX systems and still keep xgettext working. --- dos/Makefile | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'dos') diff --git a/dos/Makefile b/dos/Makefile index 67437cd6..9d563126 100644 --- a/dos/Makefile +++ b/dos/Makefile @@ -184,7 +184,7 @@ $(GETOPT_OBJS): %.o: %.c $(GETOPT_H) getopt.a: $(GETOPT_OBJS) $(RM) $@ $(AR) rcs $@ $(GETOPT_OBJS) - $(STRIP) --strip-unneeded $@ + $(STRIP) --strip-unneeded $@ getopt-clean: $(RM) $(GETOPT_H) $(GETOPT_OBJS) getopt.a @@ -233,16 +233,9 @@ XZ_SRCS = \ ../src/xz/suffix.c \ ../src/xz/util.c -XZ_SRCS_FIXED = $(XZ_SRCS:.c=-fixed.c) XZ_OBJS = $(XZ_SRCS:.c=.o) -$(XZ_SRCS_FIXED): %-fixed.c: %.c - $(SED) "s/%'/%/g" $< > $@ - -# We need to "fix" the source files which use ' as format character -# in printf() to get thousand separators. DJGPP doesn't support it. -# It's not in C89 or C99, but it is in POSIX. -$(XZ_OBJS): %.o: %-fixed.c +$(XZ_OBJS): %.o: %.c $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $< xz.exe: getopt.a liblzma.a $(XZ_OBJS) @@ -258,8 +251,5 @@ xz.exe: getopt.a liblzma.a $(XZ_OBJS) xz-clean: $(XZ_OBJS:.o=-clean) -$(RM) xz.exe xz -# FIXME: Deleting hardware-fixed.c may actually delete hardware.c -# on Dosemu 1.4.0 with its FreeDOS 1.0. Maybe it tries with -# truncated 8.3 name first. $(XZ_OBJS:.o=-clean): - -$(RM) $(@:-clean=.o) $(@:-clean=-fixed.c) + -$(RM) $(@:-clean=.o) -- cgit v1.2.3