Skip to content

Commit

Permalink
Simplify Makefile generation for cygwin
Browse files Browse the repository at this point in the history
The rule to generate cygwin.c with a symbolic link from cygwin/cygwin.c can
actually be written to the generated Makefile on all platforms, as it causes
no problems if not used. It only "triggers" when a cygwin.o is part of the
Makefile macro ARCHOBJS, at which point suffix rules permit make to infer
that cygwin.o can be generated from cygwin.c, and cygwin.c from
cygwin/cygwin.c

The rule to generate LIBPERL_NONSHR is not used. It seems that it was never
used. It was added in July 2008 as part of commit 5f9145a:
    Cygwin build harmonization, remove cygwin/Makefile.SHs

but the rule added to the top level Makefile.SH doesn't seem to correspond
to any rule in the removed file cygwin/Makefile.SHs
  • Loading branch information
nwc10 authored and Nicholas Clarck committed Oct 4, 2021
1 parent 619c007 commit c693b67
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions Makefile.SH
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,9 @@ done

$spitshell >>$Makefile <<'!NO!SUBS!'
cygwin.c: cygwin/cygwin.c
$(LNS) cygwin/cygwin.c
globals$(OBJ_EXT): $(generated_headers)
uudmap.h mg_data.h: bitcount.h
Expand Down Expand Up @@ -856,19 +859,6 @@ MINIPERLEXP = miniperl
perl5.def: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) miniperl.map
$(MINIPERL) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
!NO!SUBS!
;;
cygwin)
$spitshell >>$Makefile <<'!NO!SUBS!'
cygwin.c: cygwin/cygwin.c
$(LNS) cygwin/cygwin.c
LIBPERL_NONSHR = libperl$(LIB_EXT)
$(LIBPERL_NONSHR): $(perllib_objs)
$(RMS) $(LIBPERL_NONSHR)
$(AR) rc $(LIBPERL_NONSHR) $(perllib_objs)
!NO!SUBS!
;;
esac
Expand Down

0 comments on commit c693b67

Please sign in to comment.