Skip to content

Commit

Permalink
For microperl, prefix generateuudmap and the 3 generated headers with u.
Browse files Browse the repository at this point in the history
Without this, the main Makefile and Makefile.micro interfere with each other,
as they both generate the same 5 files, and both think that they can delete
them with their respective clean targets.
  • Loading branch information
nwc10 committed Aug 24, 2011
1 parent d8bc13f commit dde5ec2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
16 changes: 8 additions & 8 deletions Makefile.micro
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ O = uav$(_O) udeb$(_O) udoio$(_O) udoop$(_O) udump$(_O) \
microperl: $(O) microperl: $(O)
$(LD) -o $@ $(O) $(LDFLAGS) $(LIBS) $(LD) -o $@ $(O) $(LDFLAGS) $(LIBS)


generated_headers = uudmap.h bitcount.h mg_data.h generated_headers = uuudmap.h ubitcount.h umg_data.h
H = av.h uconfig.h cop.h cv.h embed.h embedvar.h form.h gv.h handy.h \ 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 \ 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 \ patchlevel.h perl.h perlsdio.h perlvars.h perly.h pp.h \
Expand All @@ -37,7 +37,7 @@ H = av.h uconfig.h cop.h cv.h embed.h embedvar.h form.h gv.h handy.h \
HE = $(H) EXTERN.h HE = $(H) EXTERN.h


clean: clean:
-rm -f $(O) microperl generate_uudmap$(_X) $(generated_headers) -rm -f $(O) microperl ugenerate_uudmap$(_X) $(generated_headers)


distclean: clean distclean: clean


Expand Down Expand Up @@ -178,16 +178,16 @@ uutil$(_O): $(HE) util.c
uperlapi$(_O): $(HE) perlapi.c perlapi.h uperlapi$(_O): $(HE) perlapi.c perlapi.h
$(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlapi.c $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlapi.c


uudmap.h mg_data.h: bitcount.h uuudmap.h umg_data.h: ubitcount.h


bitcount.h: generate_uudmap$(_X) ubitcount.h: ugenerate_uudmap$(_X)
$(RUN) ./generate_uudmap$(_X) $(generated_headers) $(RUN) ./ugenerate_uudmap$(_X) $(generated_headers)


generate_uudmap$(_O): generate_uudmap.c ugenerate_uudmap$(_O): generate_uudmap.c
$(CC) $(CCFLAGS) -o $@ $(CFLAGS) generate_uudmap.c $(CC) $(CCFLAGS) -o $@ $(CFLAGS) generate_uudmap.c


generate_uudmap$(_X): generate_uudmap$(_O) ugenerate_uudmap$(_X): ugenerate_uudmap$(_O)
$(LD) -o generate_uudmap $(LDFLAGS) generate_uudmap$(_O) $(LIBS) $(LD) -o ugenerate_uudmap $(LDFLAGS) ugenerate_uudmap$(_O) $(LIBS)


microtest: microperl microtest: microperl
- cd t && (rm -f perl; ln -s ../microperl perl) \ - cd t && (rm -f perl; ln -s ../microperl perl) \
Expand Down
18 changes: 15 additions & 3 deletions perl.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4292,10 +4292,18 @@ EXTCONST char PL_uuemap[65]


#ifdef DOINIT #ifdef DOINIT
EXTCONST char PL_uudmap[256] = EXTCONST char PL_uudmap[256] =
#include "uudmap.h" # ifdef PERL_MICRO
# include "uuudmap.h"
# else
# include "uudmap.h"
# endif
; ;
EXTCONST char PL_bitcount[256] = EXTCONST char PL_bitcount[256] =
# include "bitcount.h" # ifdef PERL_MICRO
# include "ubitcount.h"
#else
# include "bitcount.h"
# endif
; ;
EXTCONST char* const PL_sig_name[] = { SIG_NAME }; EXTCONST char* const PL_sig_name[] = { SIG_NAME };
EXTCONST int PL_sig_num[] = { SIG_NUM }; EXTCONST int PL_sig_num[] = { SIG_NUM };
Expand Down Expand Up @@ -5106,7 +5114,11 @@ EXTCONST runops_proc_t PL_runops_dbg


#ifdef DOINIT #ifdef DOINIT
EXTCONST U8 PL_magic_data[256] = EXTCONST U8 PL_magic_data[256] =
#include "mg_data.h" # ifdef PERL_MICRO
# include "umg_data.h"
# else
# include "mg_data.h"
# endif
; ;
#else #else
EXTCONST U8 PL_magic_data[256]; EXTCONST U8 PL_magic_data[256];
Expand Down

0 comments on commit dde5ec2

Please sign in to comment.