Skip to content

Commit

Permalink
build: Move the pnglibconf files and scripts to scripts/pnglibconf/
Browse files Browse the repository at this point in the history
Considering that pnglibconf is a whole mini-system for configuring and
building libpng, it should be placed in its own dedicated subdirectory.
Any future additions, including tests and documentation, should go into
this subdirectory.

One exception: pnglibconf.h.prebuilt is moved to the top-level source
directory, where pnglibconf.h would be. This follows the organization
pattern typically used with the "*.in" files, for example.

All references to the pnglibconf artifacts, found in machine-readable
code and in human-readable comments, are updated accordingly.
  • Loading branch information
ctruta committed Feb 2, 2025
1 parent c4780f3 commit f6aa448
Show file tree
Hide file tree
Showing 36 changed files with 305 additions and 254 deletions.
94 changes: 46 additions & 48 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,49 +178,47 @@ endif()

if(NOT AWK OR (ANDROID OR IOS))
# No awk available to generate sources; use pre-built pnglibconf.h
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pnglibconf.h.prebuilt
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
add_custom_target(png_genfiles)
else()
# Include the internal module PNGGenConfig.cmake
include(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/PNGGenConfig.cmake)

# Copy the awk scripts, converting their line endings to Unix (LF)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk
${CMAKE_CURRENT_BINARY_DIR}/scripts/checksym.awk
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/checksym.awk
${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/checksym.awk
@ONLY
NEWLINE_STYLE LF)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk
${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/options.awk
${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/options.awk
@ONLY
NEWLINE_STYLE LF)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/dfn.awk
${CMAKE_CURRENT_BINARY_DIR}/scripts/dfn.awk
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/dfn.awk
${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/dfn.awk
@ONLY
NEWLINE_STYLE LF)

# Generate scripts/pnglibconf.h
generate_source(OUTPUT "scripts/pnglibconf.c"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk"
# Generate pnglibconf.c and pnglibconf.h
generate_source(OUTPUT "scripts/pnglibconf/pnglibconf.c"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/options.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/pnglibconf.dfa"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
add_custom_target(png_scripts_pnglibconf_c
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c")

# Generate pnglibconf.c
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/pnglibconf.c")
generate_source(OUTPUT "pnglibconf.c"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/options.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/pnglibconf.dfa"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
add_custom_target(pnglibconf_c
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c")

if(PNG_PREFIX)
set(PNGLIBCONF_H_EXTRA_DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/prefix.out"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/macro.lst")
set(PNGPREFIX_H_EXTRA_DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out")
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/intprefix.out")
endif()

generate_out(INPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
Expand All @@ -236,61 +234,61 @@ else()
add_custom_target(pnglibconf_h
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")

generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/intprefix.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/intprefix.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/intprefix.out"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" pnglibconf_h)
add_custom_target(png_scripts_intprefix_out
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out")
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/intprefix.out")

generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/prefix.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/prefix.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/prefix.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" pnglibconf_out)
add_custom_target(png_scripts_prefix_out
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out")
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/prefix.out")

# Generate pngprefix.h
generate_source(OUTPUT "pngprefix.h"
DEPENDS ${PNGPREFIX_H_EXTRA_DEPENDS})
add_custom_target(pngprefix_h
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h")

generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/sym.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/sym.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/sym.out"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" pnglibconf_h)
add_custom_target(png_scripts_sym_out
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out")
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/sym.out")

generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/symbols.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/symbols.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt")
"${CMAKE_CURRENT_SOURCE_DIR}/pnglibconf.h.prebuilt")
add_custom_target(png_scripts_symbols_out
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out")
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/symbols.out")

generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/vers.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf/vers.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/vers.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" pnglibconf_h)
add_custom_target(png_scripts_vers_out
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out")
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/vers.out")

generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/symbols.out"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/symbols.chk"
DEPENDS png_scripts_symbols_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/checksym.awk"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/checksym.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.def")

add_custom_target(png_scripts_symbols_chk
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk")
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/symbols.chk")

generate_copy(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
generate_copy(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/sym.out"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym"
DEPENDS png_scripts_sym_out)
generate_copy(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
generate_copy(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/vers.out"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers"
DEPENDS png_scripts_vers_out)

Expand All @@ -301,7 +299,7 @@ else()

add_custom_target(png_genprebuilt
COMMAND "${CMAKE_COMMAND}"
"-DOUTPUT=scripts/pnglibconf.h.prebuilt"
"-DOUTPUT=pnglibconf.h.prebuilt"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

Expand All @@ -313,13 +311,13 @@ else()
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" pnglibconf_h
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" pnglibconf_out
"${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h" pngprefix_h
"${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out" png_scripts_intprefix_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c" png_scripts_pnglibconf_c
"${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" png_scripts_prefix_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" png_scripts_sym_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" png_scripts_symbols_chk
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" png_scripts_symbols_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out" png_scripts_vers_out)
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/intprefix.out" png_scripts_intprefix_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/pnglibconf.c" png_scripts_pnglibconf_c
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/prefix.out" png_scripts_prefix_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/sym.out" png_scripts_sym_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/symbols.chk" png_scripts_symbols_chk
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/symbols.out" png_scripts_symbols_out
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf/vers.out" png_scripts_vers_out)
endif(NOT AWK OR (ANDROID OR IOS))

# List the source code files.
Expand Down
76 changes: 43 additions & 33 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ EXTRA_DIST= \
$(TESTS) $(XFAIL_TESTS) tests/pngstest \
CMakeLists.txt example.c libpng-manual.txt

SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk
SCRIPT_CLEANFILES=scripts/pnglibconf/*.out scripts/pnglibconf/*.chk

CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@[email protected] \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
Expand Down Expand Up @@ -179,33 +179,35 @@ $(PNGLIB_BASENAME).pc: libpng.pc
$(PNGLIB_BASENAME)-config: libpng-config
cp libpng-config $@

scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h
scripts/prefix.out: png.h pngconf.h pnglibconf.out
scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt
scripts/intprefix.out: pnglibconf.h
scripts/pnglibconf/sym.out scripts/pnglibconf/vers.out: png.h pngconf.h pnglibconf.h
scripts/pnglibconf/prefix.out: png.h pngconf.h pnglibconf.out
scripts/pnglibconf/symbols.out: png.h pngconf.h $(srcdir)/pnglibconf.h.prebuilt
scripts/pnglibconf/intprefix.out: pnglibconf.h

libpng.sym: scripts/sym.out
libpng.sym: scripts/pnglibconf/sym.out
rm -f $@
cp $? $@
libpng.vers: scripts/vers.out
libpng.vers: scripts/pnglibconf/vers.out
rm -f $@
cp $? $@

if DO_PNG_PREFIX
# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix.
# Rename functions in scripts/pnglibconf/prefix.out with a PNG_PREFIX prefix.
# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual
# implementation of the macro).
pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst
pnglibconf.h: pnglibconf.out scripts/pnglibconf/prefix.out scripts/macro.lst
rm -f $@
$(AWK) 's==0 && NR>1{print prev}\
s==0{prev=$$0}\
s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\
s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\
END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\
s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8
END{print prev}'\
s=0 pnglibconf.out\
s=1 scripts/pnglibconf/prefix.out\
s=2 "${srcdir}/scripts/macro.lst" >pnglibconf.tf8
mv pnglibconf.tf8 $@

pngprefix.h: scripts/intprefix.out
pngprefix.h: scripts/pnglibconf/intprefix.out
rm -f pngprefix.tf1
$(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1
mv pngprefix.tf1 $@
Expand All @@ -218,11 +220,11 @@ pngprefix.h: # is empty
:>$@
endif

$(srcdir)/scripts/pnglibconf.h.prebuilt:
$(srcdir)/pnglibconf.h.prebuilt:
@echo "Attempting to build $@" >&2
@echo "This is a machine generated file, but if you want to make" >&2
@echo "a new one simply make 'scripts/pnglibconf.out', copy that" >&2
@echo "AND set PNG_ZLIB_VERNUM to 0 (you MUST do this)" >&2
@echo "a new one simply make 'scripts/pnglibconf/pnglibconf.out'," >&2
@echo "copy that AND set PNG_ZLIB_VERNUM to 0 (you MUST do this)" >&2
@exit 1

# The following is necessary to ensure that the local pnglibconf.h is used, not
Expand Down Expand Up @@ -260,52 +262,60 @@ endif
.c.out:
rm -f $@ $*.tf[12]
test -d scripts || mkdir scripts || test -d scripts
test -d scripts/pnglibconf || mkdir scripts/pnglibconf || test -d scripts/pnglibconf
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\
$(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2
$(AWK) -f "${srcdir}/scripts/pnglibconf/dfn.awk"\
out=$*.tf2 $*.tf1 1>&2
rm -f $*.tf1
mv $*.tf2 $@

# The .c file for pnglibconf.h is machine generated
pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
pnglibconf.c: scripts/pnglibconf/pnglibconf.dfa scripts/pnglibconf/options.awk pngconf.h \
pngusr.dfa $(DFA_XTRA)
rm -f $@ $*.tf[45]
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2
$(AWK) -f "${srcdir}/scripts/pnglibconf/options.awk"\
out=$*.tf4 version=search\
"${srcdir}/pngconf.h" "${srcdir}/scripts/pnglibconf/pnglibconf.dfa"\
"${srcdir}/pngusr.dfa" $(DFA_XTRA) 1>&2
$(AWK) -f "${srcdir}/scripts/pnglibconf/options.awk"\
out=$*.tf5 $*.tf4 1>&2
rm $*.tf4
mv $*.tf5 $@

# Symbol checks (.def and .out files should match)
scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
scripts/pnglibconf/symbols.chk: scripts/pnglibconf/checksym.awk scripts/pnglibconf/symbols.def \
scripts/pnglibconf/symbols.out

.out.chk:
rm -f $@ $*.new
$(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
of="$*.new" $< >&2
$(AWK) -f "${srcdir}/scripts/pnglibconf/checksym.awk"\
of=$*.new ${srcdir}/scripts/${*F}.def $*.out >&2
mv $*.new $@

# used on demand to regenerate the standard header, CPPFLAGS should
# be empty - no non-standard defines
scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
scripts/pnglibconf/pnglibconf.c: scripts/pnglibconf/pnglibconf.dfa scripts/pnglibconf/options.awk \
pngconf.h
rm -f $@ pnglibconf.tf[67]
test -z "$(CPPFLAGS)"
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
$(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\
logunsupported=1 version=search ${srcdir}/pngconf.h -\
${srcdir}/scripts/pnglibconf.dfa 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\
pnglibconf.tf6 1>&2
$(AWK) -f "${srcdir}/scripts/pnglibconf/options.awk"\
out=pnglibconf.tf6 logunsupported=1 version=search\
"${srcdir}/pngconf.h" -\
"${srcdir}/scripts/pnglibconf/pnglibconf.dfa" 1>&2
$(AWK) -f "${srcdir}/scripts/pnglibconf/options.awk"\
out=pnglibconf.tf7 pnglibconf.tf6 1>&2
rm pnglibconf.tf6
mv pnglibconf.tf7 $@

$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h pnglibconf.h pngpriv.h \
pngdebug.h pnginfo.h pngstruct.h pngprefix.h

test: check-am

# Extra checks
check: scripts/symbols.chk
check: scripts/pnglibconf/symbols.chk

# Don't distribute the generated script files
dist-hook:
Expand Down
8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ AC_ARG_VAR(AWK, [AWK language processor])
# Some awk implementations crash when confronted with pnglibconf.dfa.
# Run a test now, to make sure this doesn't happen.
AC_MSG_CHECKING([if awk ($AWK) works])
if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
${srcdir}/pngusr.dfa 1>&2
if ${AWK} -f "${srcdir}/scripts/pnglibconf/options.awk"\
out="/dev/null" version=search\
"${srcdir}/pngconf.h"\
"${srcdir}/scripts/pnglibconf/pnglibconf.dfa"\
"${srcdir}/pngusr.dfa" 1>&2
then
AC_MSG_RESULT([yes])
else
Expand Down
4 changes: 2 additions & 2 deletions contrib/conftest/README
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Examples:
${srcdir}/contrib/pngminim/*/pngusr.dfa

Documentation of the options:
${srcdir}/scripts/pnglibconf.dfa
${srcdir}/scripts/pnglibconf/pnglibconf.dfa

Documentation of the file format:
${srcdir}/scripts/options.awk
${srcdir}/scripts/pnglibconf/options.awk

FILE NAMING
===========
Expand Down
10 changes: 5 additions & 5 deletions contrib/pngminim/decoder/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ pngm2pnm$(E): $(OBJS)
# The CPP_FLAGS setting causes pngusr.h to be included in
# both the build of pnglibconf.h and, subsequently, when
# building libpng itself.
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak $(ZH)\
$(PNGSRC)/scripts/pnglibconf.dfa \
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf/pnglibconf.mak $(ZH) \
$(PNGSRC)/scripts/pnglibconf/pnglibconf.dfa \
$(PNGSRC)/scripts/pnglibconf/options.awk pngusr.h pngusr.dfa
$(RM) pnglibconf.h pnglibconf.dfn
$(MAKE) -f $(PNGSRC)/scripts/pnglibconf.mak $(MAKEFLAGS)\
$(MAKE) -f $(PNGSRC)/scripts/pnglibconf/pnglibconf.mak $(MAKEFLAGS)\
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG -I."\
DFA_XTRA="pngusr.dfa" $@

clean:
$(MAKE) -f $(PNGSRC)/scripts/pnglibconf.mak $(MAKEFLAGS)\
$(MAKE) -f $(PNGSRC)/scripts/pnglibconf/pnglibconf.mak $(MAKEFLAGS)\
srcdir=$(PNGSRC) clean
$(RM) pngm2pnm$(O)
$(RM) pngm2pnm$(E)
Expand Down
Loading

0 comments on commit f6aa448

Please sign in to comment.