diff options
author | Steve Hay <SteveHay@planit.com> | 2005-07-15 10:35:55 +0000 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2005-07-15 10:35:55 +0000 |
commit | 322fd6428c9575b8e35cb16655e86ca0378af1cf (patch) | |
tree | c2f30ec64c9f15ed0745a19ecd68659c950f20ee /win32 | |
parent | a44e5664a991fdadec2f1aada7ad25ce3323e639 (diff) | |
download | perl-322fd6428c9575b8e35cb16655e86ca0378af1cf.tar.gz |
Fix static extensions when building with nmake on Win32
They were broken because change 24806 forgot to add -DWITH_STATIC
to the recipe for compiling perllib.c which meant that perllibst.h
was not included and hence although they built OK, the static
extensions could not actually be used!
In fact, since perllibst.h is always created (it is more or less
empty when static extensions are not being used), there is no need
for -DWITH_STATIC at all. So rather than adding it to Makefile,
just drop it from makefile.mk and perllib.c.
Also add the missing cleanup of perllibst.h to Makefile.
p4raw-id: //depot/perl@25150
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile | 1 | ||||
-rw-r--r-- | win32/makefile.mk | 4 | ||||
-rw-r--r-- | win32/perllib.c | 6 |
3 files changed, 3 insertions, 8 deletions
diff --git a/win32/Makefile b/win32/Makefile index 22f2f447bf..a5bba57f91 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1184,6 +1184,7 @@ distclean: realclean -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new -del /f $(CONFIGPM) -del /f bin\*.bat + -del /f perllibst.h -del /f $(PERLEXE_ICO) perl.base -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib -cd $(EXTDIR) && del /s *.def Makefile Makefile.old diff --git a/win32/makefile.mk b/win32/makefile.mk index f06ca6fdf5..0a8bd5b838 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1062,9 +1062,9 @@ $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h .IF "$(USE_IMP_SYS)" == "define" - $(CC) -c -I. -DWITH_STATIC $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c + $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c .ELSE - $(CC) -c -I. -DWITH_STATIC $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c + $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c .ENDIF # 1. we don't want to rebuild miniperl.exe when config.h changes diff --git a/win32/perllib.c b/win32/perllib.c index 5bd7ee83d7..3acfca1204 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -17,19 +17,15 @@ char *staticlinkmodules[] = { "DynaLoader", /* other similar records will be included from "perllibst.h" */ -#ifdef WITH_STATIC #define STATIC1 #include "perllibst.h" -#endif NULL, }; EXTERN_C void boot_DynaLoader (pTHX_ CV* cv); /* other similar records will be included from "perllibst.h" */ -#ifdef WITH_STATIC #define STATIC2 #include "perllibst.h" -#endif static void xs_init(pTHX) @@ -38,10 +34,8 @@ xs_init(pTHX) dXSUB_SYS; newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); /* other similar records will be included from "perllibst.h" */ -#ifdef WITH_STATIC #define STATIC3 #include "perllibst.h" -#endif } #ifdef PERL_IMPLICIT_SYS |