Subject: Re: Re: Re: [ksh93-integration-discuss] Re: ksh88->ksh93 migration plan
--------
Joerg Schilling <schilling at fokus.fraunhofer.de> wrote:
> David Korn <dgk at research.att.com> wrote:
>
> > Thats nonsense. Who really understands the GNU Makefiles? They
>
> Noboty likes them and the real problem is that people believe that
> they are portable by force of automake, while this does not prevent
> them from introducing GNUisms.
>
> > are mostly generated and look like an intermediate language
> > not a specification on how to build.
>
>
>
> How about this which is a part of my makefilesystem that allows compilation
> on even more platforms than currently supported by GNU automake:
>
> #ident @(#)Makefile 1.32 06/01/12 Copyr 1995-2006 J. Schilling
> ###########################################################################
> SRCROOT= ..
> RULESDIR= RULES
> include $(SRCROOT)/$(RULESDIR)/rules.top
> ###########################################################################
> INSDIR= bin
> TARGET= cdrecord
> CPPOPTS += -DDRV_DVD
> CPPOPTS += -DFIFO -DAUINFO
> CPPOPTS += -DHAVE_LIB_EDC_ECC
> CPPOPTS += -DCLONE_WRITE
> CPPOPTS += -DUSE_LARGEFILES
> CPPOPTS += -DGCONF # MMC-3 getconf code
> CFILES= cdrecord.c \
> cd_misc.c fifo.c isosize.c audiosize.c auinfo.c \
> cue.c \
> diskid.c \
> wm_session.c wm_track.c wm_packet.c \
> sector.c clone.c \
> movesect.c subchan.c cdtext.c \
> defaults.c \
> cdr_drv.c \
> drv_philips.c drv_sony.c drv_jvc.c drv_7501.c drv_mmc.c \
> drv_dvd.c drv_dvdplus.c \
> drv_simul.c \
> scsi_scan.c scsi_cdr.c scsi_cdr_mmc4.c scsi_mmc.c scsi_mmc4.c
> \
> scsilog.c \
> modes.c misc.c getnum.c crc16.c xio.c
> HFILES= cdrecord.h iso9660.h auheader.h cdtext.h \
> crc16.h movesect.h mmcvendor.h scsi_scan.h \
> scsimmc.h \
> scsilog.h adip.h \
> xio.h \
> defaults.h \
> ../include/scg/scgio.h ../include/scg/scsidefs.h \
> ../include/scg/scsireg.h ../include/scg/scsitransp.h
> LIBS= -lrscg -lscg $(LIB_VOLMGT) -ledc_ecc -ldeflt -lschily
> $(SCSILIB)
> $(LIB_SOCKET)
> XMK_FILE= Makefile.man Makefile.dfl
>
> ###########################################################################
> include $(SRCROOT)/$(RULESDIR)/rules.cmd
> ###########################################################################
> J?rg
>
I make a first pass of converting this makefile into an nmake makefile.
As you can see, it doesn't look to hard to do this conversion.
Note, that nmake will generate the -I and -D options based on
.SOURCE.h and on variables with ==. Moreover, it scans source files looking
both includes and variables whose names match the == names and generates
the subset that is needed. If the value of any of these change,
only modules that use the specific variable get recompiled.
There is no need to list headers since this will be found automatically.
=====================cut here=============================
/*
#ident @(#)Nmakefile 1.32 06/01/12 Copyr 1995-2006 David Korn
*/
LIB_VOLMGT = /* set to whatever value is needed*/
SCSILIB = /* set to whatever value is needed*/
LIB_SOCKET = /* set to whatever value is needed*
DRV_DVD == 1
FIFO == 1
AUINFO == 1
HAVE_LIB_EDC_ECC == 1
CLONE_WRITE == 1
USE_LARGEFILES == 1
GCONF == 1 /* MMC-3 getconf code */
.SOURCE.h: ../include/scg
cdrecord:: cdrecord.c \
cd_misc.c fifo.c isosize.c audiosize.c auinfo.c \
cue.c \
diskid.c \
wm_session.c wm_track.c wm_packet.c \
sector.c clone.c \
movesect.c subchan.c cdtext.c \
defaults.c \
cdr_drv.c \
drv_philips.c drv_sony.c drv_jvc.c drv_7501.c drv_mmc.c \
drv_dvd.c drv_dvdplus.c \
drv_simul.c \
scsi_scan.c scsi_cdr.c scsi_cdr_mmc4.c scsi_mmc.c scsi_mmc4.c \
scsilog.c \
modes.c misc.c getnum.c crc16.c xio.c \
-lrscg -lscg $(LIB_VOLMGT) -ledc_ecc -ldeflt -lschily $(SCSILIB)
$(LIB_SOCKET)
:: Makefile.man Makefile.dfl
/* I don't know what these are the :: will add them to the tar
or pax file with nmake pax or nmake tar */
=====================cut here=============================
David Korn
dgk at research.att.com