LD = $(CC)
+CCFLAGS = -c
DEFINES = -DPERL_CORE -DPERL_MICRO -DSTANDARD_C -DPERL_USE_SAFE_PUTENV
OPTIMIZE =
CFLAGS = $(DEFINES) $(OPTIMIZE)
+LDFLAGS =
LIBS = -lm
_O = .o
ENV = env
PERL = perl
+_X =
+RUN =
all: microperl
uuniversal$(_O) uutf8$(_O) uutil$(_O) uperlapi$(_O) uxsutils$(_O)
microperl: $(O)
- $(LD) -o $@ $(O) $(LIBS)
+ $(LD) -o $@ $(O) $(LDFLAGS) $(LIBS)
H = av.h uconfig.h cop.h cv.h embed.h embedvar.h form.h gv.h handy.h \
hv.h intrpvar.h iperlsys.h mg.h op.h opcode.h opnames.h pad.h \
patchlevel.h perl.h perlsdio.h perlvars.h perly.h pp.h \
pp_proto.h proto.h reentr.h regexp.h scope.h sv.h \
- thread.h unixish.h utf8.h util.h warnings.h
+ thread.h unixish.h utf8.h util.h uudmap.h warnings.h
HE = $(H) EXTERN.h
clean:
- -rm -f $(O) microperl
+ -rm -f $(O) microperl generate_uudmap$(_X) uudmap.h
distclean: clean
# The microperl objects.
uav$(_O): $(HE) av.c
- $(CC) -c -o $@ $(CFLAGS) av.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) av.c
udeb$(_O): $(HE) deb.c
- $(CC) -c -o $@ $(CFLAGS) deb.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) deb.c
udoio$(_O): $(HE) doio.c
- $(CC) -c -o $@ $(CFLAGS) doio.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) doio.c
udoop$(_O): $(HE) doop.c
- $(CC) -c -o $@ $(CFLAGS) doop.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) doop.c
udump$(_O): $(HE) dump.c regcomp.h regnodes.h
- $(CC) -c -o $@ $(CFLAGS) dump.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) dump.c
uglobals$(_O): $(H) globals.c INTERN.h perlapi.h
- $(CC) -c -o $@ $(CFLAGS) globals.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) globals.c
ugv$(_O): $(HE) gv.c
- $(CC) -c -o $@ $(CFLAGS) gv.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) gv.c
umro$(_O): $(HE) mro.c
- $(CC) -c -o $@ $(CFLAGS) mro.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) mro.c
uhv$(_O): $(HE) hv.c
- $(CC) -c -o $@ $(CFLAGS) hv.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) hv.c
umg$(_O): $(HE) mg.c
- $(CC) -c -o $@ $(CFLAGS) mg.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) mg.c
uperlmain$(_O): $(HE) miniperlmain.c
- $(CC) -c -o $@ $(CFLAGS) miniperlmain.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) miniperlmain.c
uop$(_O): $(HE) op.c keywords.h
- $(CC) -c -o $@ $(CFLAGS) -DPERL_EXTERNAL_GLOB op.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) -DPERL_EXTERNAL_GLOB op.c
ureentr$(_O): $(HE) reentr.c
- $(CC) -c -o $@ $(CFLAGS) reentr.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) reentr.c
upad$(_O): $(HE) pad.c
- $(CC) -c -o $@ $(CFLAGS) pad.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pad.c
uperl$(_O): $(HE) perl.c
- $(CC) -c -o $@ $(CFLAGS) perl.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perl.c
uperlio$(_O): $(HE) perlio.c
- $(CC) -c -o $@ $(CFLAGS) perlio.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlio.c
uperly$(_O): $(HE) perly.c
- $(CC) -c -o $@ $(CFLAGS) perly.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perly.c
upp$(_O): $(HE) pp.c
- $(CC) -c -o $@ $(CFLAGS) pp.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp.c
upp_ctl$(_O): $(HE) pp_ctl.c
- $(CC) -c -o $@ $(CFLAGS) pp_ctl.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_ctl.c
upp_hot$(_O): $(HE) pp_hot.c
- $(CC) -c -o $@ $(CFLAGS) pp_hot.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_hot.c
upp_sys$(_O): $(HE) pp_sys.c
- $(CC) -c -o $@ $(CFLAGS) pp_sys.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_sys.c
upp_pack$(_O): $(HE) pp_pack.c
- $(CC) -c -o $@ $(CFLAGS) pp_pack.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_pack.c
upp_sort$(_O): $(HE) pp_sort.c
- $(CC) -c -o $@ $(CFLAGS) pp_sort.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_sort.c
uregcomp$(_O): $(HE) regcomp.c regcomp.h regnodes.h INTERN.h
- $(CC) -c -o $@ $(CFLAGS) regcomp.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) regcomp.c
uregexec$(_O): $(HE) regexec.c regcomp.h regnodes.h
- $(CC) -c -o $@ $(CFLAGS) regexec.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) regexec.c
urun$(_O): $(HE) run.c
- $(CC) -c -o $@ $(CFLAGS) run.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) run.c
uscope$(_O): $(HE) scope.c
- $(CC) -c -o $@ $(CFLAGS) scope.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) scope.c
usv$(_O): $(HE) sv.c
- $(CC) -c -o $@ $(CFLAGS) sv.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) sv.c
utaint$(_O): $(HE) taint.c
- $(CC) -c -o $@ $(CFLAGS) taint.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) taint.c
utoke$(_O): $(HE) toke.c keywords.h
- $(CC) -c -o $@ $(CFLAGS) toke.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) toke.c
ulocale$(_O): $(HE) locale.c
- $(CC) -c -o $@ $(CFLAGS) locale.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) locale.c
unumeric$(_O): $(HE) numeric.c
- $(CC) -c -o $@ $(CFLAGS) numeric.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) numeric.c
umathoms$(_O): $(HE) mathoms.c
- $(CC) -c -o $@ $(CFLAGS) mathoms.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) mathoms.c
uuniversal$(_O): $(HE) universal.c XSUB.h
- $(CC) -c -o $@ $(CFLAGS) universal.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) universal.c
uutf8$(_O): $(HE) utf8.c
- $(CC) -c -o $@ $(CFLAGS) utf8.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) utf8.c
uutil$(_O): $(HE) util.c
- $(CC) -c -o $@ $(CFLAGS) util.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) util.c
uperlapi$(_O): $(HE) perlapi.c perlapi.h
- $(CC) -c -o $@ $(CFLAGS) perlapi.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlapi.c
uxsutils$(_O): $(HE) xsutils.c
- $(CC) -c -o $@ $(CFLAGS) xsutils.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) xsutils.c
+
+uudmap.h: generate_uudmap$(_X)
+ $(RUN) ./generate_uudmap$(_X) >uudmap.h
+
+generate_uudmap$(_O): generate_uudmap.c
+ $(CC) $(CCFLAGS) -o $@ $(CFLAGS) generate_uudmap.c
+
+generate_uudmap$(_X): generate_uudmap$(_O)
+ $(LD) -o generate_uudmap $(LDFLAGS) generate_uudmap$(_O) $(LIBS)
# That's it, folks!
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define ARCHLIB "/opt/perl/lib/5.9.4/i686-linux" /**/
-#define ARCHLIB_EXP "/opt/perl/lib/5.9.4/i686-linux" /**/
+#define ARCHLIB "/opt/perl/lib/5.10.0/i686-linux" /**/
+#define ARCHLIB_EXP "/opt/perl/lib/5.10.0/i686-linux" /**/
/* ARCHNAME:
* This symbol holds a string representing the architecture name.
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "/opt/perl/lib/5.9.4" /**/
-#define PRIVLIB_EXP "/opt/perl/lib/5.9.4" /**/
+#define PRIVLIB "/opt/perl/lib/5.10.0" /**/
+#define PRIVLIB_EXP "/opt/perl/lib/5.10.0" /**/
/* PTRSIZE:
* This symbol contains the size of a pointer, so that the C preprocessor
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "/opt/perl/lib/site_perl/5.9.4/i686-linux" /**/
-#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.9.4/i686-linux" /**/
+#define SITEARCH "/opt/perl/lib/site_perl/5.10.0/i686-linux" /**/
+#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.10.0/i686-linux" /**/
/* SITELIB:
* This symbol contains the name of the private library for this package.
* removed. The elements in inc_version_list (inc_version_list.U) can
* be tacked onto this variable to generate a list of directories to search.
*/
-#define SITELIB "/opt/perl/lib/site_perl/5.9.4" /**/
-#define SITELIB_EXP "/opt/perl/lib/site_perl/5.9.4" /**/
+#define SITELIB "/opt/perl/lib/site_perl/5.10.0" /**/
+#define SITELIB_EXP "/opt/perl/lib/site_perl/5.10.0" /**/
#define SITELIB_STEM "/opt/perl/lib/site_perl" /**/
/* Size_t_size:
* script to make sure (one hopes) that it runs with perl and not
* some shell.
*/
-#define STARTPERL "#!/opt/perl/bin/perl5.9.4" /**/
+#define STARTPERL "#!/opt/perl/bin/perl5.10.0" /**/
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
#
# To build:
#
-# sh Configure -des -Dusedevel
+# sh Configure -des
# make perl
#
-# The -Dusedevel is required for Perl 5.9, it is not required for the Perl
-# 5.10 sources, once they come out. "make install" won't work since it
-# assumes file globbing (see above). You can try the following manually:
+# "make install" won't work since it assumes file globbing (see above).
+# You can try the following manual way:
#
# mkdir -p /opt/perl-catamount
# mkdir -p /opt/perl-catamount/include
# mkdir -p /opt/perl-catamount/lib
-# mkdir -p /opt/perl-catamount/lib/perl5/5.9.5
+# mkdir -p /opt/perl-catamount/lib/perl5/5.10.0
# mkdir -p /opt/perl-catamount/bin
# cp *.h /opt/perl-catamount/include
# cp libperl.a /opt/perl-catamount/lib
-# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.9.5
+# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.10.0
# cp miniperl perl run.sh cc.sh /opt/perl-catamount/lib
#
-# (For Perl 5.10.0 do the obvious renaming above.)
# With the headers and the libperl.a you can embed Perl to your Catamount
# application, see pod/perlembed.pod. You can do for example:
#
# $0
#
# This is essentially a frontend driver for the Catamount cc.
-# We arrange for (1) the main(), exit(), _exit() being wrapped (cpp-defined)
-# catamain(), cataexit(), and _cataexit() (2) the actual main() etc. are in
-# cata.c, and cata*.o are linked in when needed (3) signals being caught
+# We arrange for
+# (1) the main(), exit(), _exit() being wrapped (cpp-defined)
+# catamain(), cataexit(), and _cataexit()
+# (2) the actual main() etc. are in cata.c, and cata*.o are
+# linked in when needed
+# (3) signals being caught
# All this mostly for being able to catch the exit status (or crash cause).
#
argv=''
exe=''
defs='-Dmain=catamain -Dexit=cataexit -D_exit=_cataexit'
argv=''
-BUILD=/wrk/jhi/perl-5.9.x@31393+cata
+BUILD=$BUILD
__EOF3a__
cat >> $cc <<'__EOF3b__'
case "$1" in