Skip to content
This repository has been archived by the owner on Apr 14, 2019. It is now read-only.

Win32 makefile in release tarball #7

Open
kmx opened this issue May 10, 2010 · 4 comments
Open

Win32 makefile in release tarball #7

kmx opened this issue May 10, 2010 · 4 comments

Comments

@kmx
Copy link

kmx commented May 10, 2010

Hi,

would it be possible to include build/win32/Makefile.mingw into the tidyp release tarball?

Thanks.

kmx

@kmx
Copy link
Author

kmx commented May 10, 2010

According to my tests the file build/win32/Makefile.mingw does not work well with release tarball.

The following patch is needed:

-OBJS     =src/charsets.o src/iconvtc.o src/win32tc.o src/access.o src/attrs.o src/istack.o src/parser.o src/tags.o src/entities.o src/lexer.o src/pprint.o src/clean.o src/localize.o src/config.o src/alloc.o src/attrask.o src/attrdict.o src/attrget.o src/buffio.o src/fileio.o src/streamio.o src/tagask.o src/tmbstr.o src/utf8.o src/tidyplib.o src/mappedio.o
+OBJS     =src/access.o src/attrs.o src/istack.o src/parser.o src/tags.o src/entities.o src/lexer.o src/pprint.o src/clean.o src/localize.o src/config.o src/alloc.o src/attrask.o src/attrdict.o src/attrget.o src/buffio.o src/fileio.o src/streamio.o src/tagask.o src/tmbstr.o src/utf8.o src/tidyplib.o src/mappedio.o

If you put the patched Makefile.mingw to the root of the release tarball it should work.

kmx

@kmx
Copy link
Author

kmx commented May 10, 2010

I am just not sure if it is correct to leave out src/win32tc.c on MS Windows platform (it is not included in the release tarball).

@kmx
Copy link
Author

kmx commented May 10, 2010

I have ended up with the following Win32 makefile that should go to the release tarball root:

#PLEASE NOTE: this Makefile was designed to be compatible with GNU make and dmake

CFLAGS   = -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -Wunused-parameter -DSUPPORT_ACCESSIBILITY_CHECKS -DSUPPORT_ASIAN_ENCODINGS -DSUPPORT_UTF16_ENCODINGS
OBJS     = src/access.o src/alloc.o src/attrask.o src/attrdict.o src/attrget.o src/attrs.o src/buffio.o src/clean.o src/config.o src/entities.o src/fileio.o src/istack.o src/lexer.o src/localize.o src/mappedio.o src/parser.o src/pprint.o src/streamio.o src/tagask.o src/tags.o src/tidyplib.o src/tmbstr.o src/utf8.o
EXE1     = tidyp.exe
EXE1OBJS = src/tidyp.o

RANLIB   = ranlib
CC       = gcc
STRIP    = strip
AR       = ar
ARFLAGS  = csr
PERL     = perl

ifeq ($(NOPERL), 1)
  CP     = cp
  MV     = mv
  RM_F   = rm -f
  RM_RF  = rm -rf
  MKPATH = mkdir -p
else
  CP     = $(PERL) -MExtUtils::Command -e cp --
  MV     = $(PERL) -MExtUtils::Command -e mv --
  RM_F   = $(PERL) -MExtUtils::Command -e rm_f --
  RM_RF  = $(PERL) -MExtUtils::Command -e rm_rf --
  MKPATH = $(PERL) -MExtUtils::Command -e mkpath --
endif

PREFIX   = ./_output_
BINDIR   = $(PREFIX)/bin
INCDIR   = $(PREFIX)/include
LIBDIR   = $(PREFIX)/lib
STATIC_LIB = libtidyp.a
TARGETS  = $(STATIC_LIB) $(SHARED_LIB) $(EXE1OBJS) $(EXE1)

all: $(TARGETS)

clean:
    $(RM_F) $(OBJS) $(TARGETS)

$(STATIC_LIB): $(OBJS)
    $(AR) $(ARFLAGS) $@ $^
    $(RANLIB) $@

$(EXE1): $(EXE1OBJS) $(STATIC_LIB)
    $(CC) -o $@ $^

%.o : %.c ; $(CC) $(CFLAGS) -c $< -o $@

install: all
    $(MKPATH) "$(BINDIR)"
    $(MKPATH) "$(LIBDIR)"
    $(MKPATH) "$(INCDIR)/tidyp"
    $(STRIP) -S $(EXE1)
    $(CP) $(STATIC_LIB) "$(LIBDIR)"
    $(CP) $(EXE1) "$(BINDIR)"
    $(CP) include/buffio.h include/platform.h include/tidyp.h include/tidypenum.h "$(INCDIR)/tidyp"

.PHONY: install all clean

and also should replace build/win32/Makefile.mingw in github repo

kmx

@kmx
Copy link
Author

kmx commented May 10, 2010

to properly handle tabs get the this file from

http://github.com/kmx/alien-tidyp/raw/master/patches/Makefile.mingw

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant