# make sure that we recompile perl.c if the git version changes
perl$(OBJ_EXT): git_version.h
-translators: $(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) FORCE
- @echo " "; echo " Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
-
!NO!SUBS!
+# Making utilities and translators require Cwd. If we have dynamic
+# loading, we only need miniperl and Cwd.$dlext. If we have static
+# loading, we need to build perl first.
+case "$usedl" in
+define)
+ util_deps='$(MINIPERL_EXE) $(CONFIGPM) lib/auto/Cwd/Cwd$(DLSUFFIX) FORCE'
+ x2p_deps='$(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) FORCE'
+ ;;
+*) util_deps='$(PERL_EXE) $(CONFIGPM) FORCE'
+ x2p_deps='$(PERL_EXE) $(CONFIGPM) FORCE'
+ ;;
+esac
+
$spitshell >>$Makefile <<!GROK!THIS!
-utilities: \$(MINIPERL_EXE) \$(CONFIGPM) FORCE lib/auto/Cwd/Cwd.$dlext
+translators: $x2p_deps
+ @echo " "; echo " Making x2p stuff"; cd x2p; \$(LDLIBPTH) \$(MAKE) all
+
+utilities: $util_deps
@echo " "; echo " Making utilities"; cd utils; \$(LDLIBPTH) \$(MAKE) all
!GROK!THIS!
+
$spitshell >>$Makefile <<'!NO!SUBS!'
# This is now done by installman only if you actually want the man pages.
+# Generated from utils/Makefile.SH. The generated file is
+# shipped with the source kit for systems such as win32
+# which don't do .SH extraction.
PERL = ../miniperl
REALPERL = ../perl
echo "Extracting utils/Makefile (with variable substitutions)"
rm -f Makefile
+# These use the Cwd extension. For statically-built perls, we
+# need perl, not just miniperl.
+case "$usedl" in
+ define) perl="../miniperl" ;;
+ *) perl="../perl" ;;
+esac
cat >Makefile <<!GROK!THIS!
+# Generated from utils/Makefile.SH. The generated file is
+# shipped with the source kit for systems such as win32
+# which don't do .SH extraction.
-PERL = ../miniperl
+PERL = $perl
REALPERL = ../perl
RUN = $run # Used mainly cross-compilation setups.
echo "Extracting x2p/Makefile (with variable substitutions)"
rm -f Makefile
+
+# The .PL extractions use the Cwd extension. For statically-built
+# perls, we need perl, not just miniperl.
+case "$usedl" in
+ define) perl="../miniperl" ;;
+ *) perl="../perl" ;;
+esac
+
cat >Makefile <<!GROK!THIS!
# $RCSfile: Makefile.SH,v $$Revision: 4.1 $$Date: 92/08/07 18:29:07 $
#
.SUFFIXES: .c \$(OBJ_EXT)
RUN = $run
+PERL = $perl
!GROK!THIS!
shlist:
echo $(sh) | tr ' ' $(TRNL) >.shlist
-# These should be automatically generated
-
$(plextract):
- $(RUN) ../miniperl -I../lib $@.PL
+ $(RUN) $(PERL) -I../lib $@.PL
find2perl: find2perl.PL