Cygwin: revamp localtime.o build rule
Rename localtime.c.patched to localtime.patched.c to keep the correct language suffix. Create localtime.patched.c in the build dir rather than in the source dir. Decouple the build rule for creating localtime.patched.c from the rule to build localtime.o, so we don't have to rebuild the patched source file all the time. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -670,7 +670,7 @@ uninstall-man:
|
||||
done
|
||||
|
||||
clean distclean realclean:
|
||||
-rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h
|
||||
-rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h localtime.patched.c
|
||||
-@$(MAKE) -C ${cygserver_blddir} libclean
|
||||
|
||||
maintainer-clean: clean
|
||||
@ -734,9 +734,12 @@ dcrt0.o sigproc.o: child_info_magic.h
|
||||
|
||||
shared.o: shared_info_magic.h
|
||||
|
||||
localtime.o: $(srcdir)/tzcode/localtime_wrapper.c $(srcdir)/tzcode/localtime.c.patch
|
||||
(cd $(srcdir)/tzcode && \
|
||||
patch -u -o localtime.c.patched localtime.c localtime.c.patch)
|
||||
localtime.patched.c: tzcode/localtime.c tzcode/localtime.c.patch
|
||||
patch -u -o localtime.patched.c \
|
||||
$(srcdir)/tzcode/localtime.c \
|
||||
$(srcdir)/tzcode/localtime.c.patch
|
||||
|
||||
localtime.o: tzcode/localtime_wrapper.c localtime.patched.c
|
||||
$(CC) ${COMMON_CFLAGS} ${localtime_CFLAGS} \
|
||||
-I$(target_builddir)/winsup/cygwin \
|
||||
-I$(srcdir) -I$(srcdir)/tzcode -c -o $@ $<
|
||||
|
@ -122,7 +122,7 @@ tzgetwintzi (char *wildabbr, char *outbuf)
|
||||
(2) add conditional call to Cygwin's tzgetwintzi() from tzsetlcl()
|
||||
(3) add Cygwin's historical "posixrules" support to tzloadbody()
|
||||
*/
|
||||
#include "localtime.c.patched"
|
||||
#include "localtime.patched.c"
|
||||
|
||||
// Don't forget these Cygwin-specific additions from this point to EOF
|
||||
EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked)
|
||||
|
Reference in New Issue
Block a user