harfbuzz/win32/generate-msvc.mak
fanc999 ad52e044bc Win32/NMake builds: Support builds from GIT (#498)
Add Python scripts to generate the full win32/config.h.win32 and
src/hb-version.h which can be used to build directly from a GIT
checkout.  Since the scripts are currently intended for building from a
GIT checkout, these are not distributed in the release tarballs.

Also, support the re-build of Ragel-generated .hh headers using the NMake
build system, and allow one to specify the path of the Ragel executable
if a suitable one cannot be found in the PATH.

Update the Win32/NMake build documentation to let people know about how
these mechanisms can be utilized.
2017-06-21 18:49:57 +04:30

33 lines
1.1 KiB
Makefile

# NMake Makefile portion for code generation and
# intermediate build directory creation
# Items in here should not need to be edited unless
# one is maintaining the NMake build files.
# Copy the pre-defined config.h.win32
config.h: config.h.win32
@-copy $@.win32 $@
# Generate the enumeration sources and headers
# sed is not normally available on Windows, but since
# we are already using PERL, use PERL one-liners.
!if "$(GOBJECT)" == "1"
$(HB_GOBJECT_ENUM_GENERATED_SOURCES): ..\src\hb-gobject-enums.h.tmpl ..\src\hb-gobject-enums.cc.tmpl $(HB_ACTUAL_HEADERS)
$(PERL) $(PREFIX)\bin\glib-mkenums \
--identifier-prefix hb_ --symbol-prefix hb_gobject \
--template ..\src\$(@F).tmpl $(HB_ACTUAL_HEADERS) > $@
$(PERL) -p -i.tmp1 -e "s/_t_get_type/_get_type/g" $@
$(PERL) -p -i.tmp2 -e "s/_T \(/ (/g" $@
@-del $@.tmp1
@-del $@.tmp2
!endif
# Create the build directories
$(CFG)\$(PLAT)\harfbuzz $(CFG)\$(PLAT)\harfbuzz-gobject $(CFG)\$(PLAT)\util:
@-md $@
.SUFFIXES: .c .cc .hh .rl
# Generate headers from Ragel sources
{..\src\}.rl{..\src\}.hh:
$(RAGEL) -e -F1 -o $@ $<