all:
chmod +x cups-config
+ echo Using ARCHFLAGS="$(ARCHFLAGS)"
echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+ echo Using DSOFLAGS="$(DSOFLAGS)"
echo Using LDFLAGS="$(LDFLAGS)"
echo Using LIBS="$(LIBS)"
for dir in $(DIRS); do\
echo Making all in $$dir... ;\
- (cd $$dir ; $(MAKE) $(MFLAGS)) || exit 1;\
+ (cd $$dir ; $(MAKE) $(MFLAGS) all) || exit 1;\
+ done
+
+
+#
+# Make library targets...
+#
+
+libs:
+ echo Using ARCHFLAGS="$(ARCHFLAGS)"
+ echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
+ echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+ echo Using DSOFLAGS="$(DSOFLAGS)"
+ echo Using LDFLAGS="$(LDFLAGS)"
+ echo Using LIBS="$(LIBS)"
+ for dir in $(DIRS); do\
+ echo Making all in $$dir... ;\
+ (cd $$dir ; $(MAKE) $(MFLAGS) libs) || exit 1;\
done
# Install programs...
#
-install-exec:
+install-exec: all
for dir in $(DIRS); do\
echo Installing programs in $$dir... ;\
- (cd $$dir; $(MAKE) $(MFLAGS) all install-exec) || exit 1;\
+ (cd $$dir; $(MAKE) $(MFLAGS) install-exec) || exit 1;\
done
# Install libraries...
#
-install-libs:
+install-libs: libs
for dir in $(DIRS); do\
echo Installing libraries in $$dir... ;\
- (cd $$dir; $(MAKE) $(MFLAGS) all install-libs) || exit 1;\
+ (cd $$dir; $(MAKE) $(MFLAGS) install-libs) || exit 1;\
done
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all object files...
#
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all object files...
#
help.cgi \
jobs.cgi \
printers.cgi
-TARGETS = \
+LIBTARGETS = \
libcupscgi.a \
$(LIBCUPSCGI) \
$(LIB32CUPSCGI) \
$(LIB32CUPSCGI) \
- $(CGIS) \
testcgi \
- testhi \
+ testhi
+
+TARGETS = \
+ $(LIBTARGETS) \
+ $(CGIS) \
testtemplate
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs: $(LIBTARGETS)
+
+
#
# Clean all object files...
#
testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testcgi.o libcupscgi.a ../cups/libcups.a \
- $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcgi.o libcupscgi.a \
+ ../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
+ echo Testing CGI API...
+ ./testcgi
#
testhi: testhi.o ../Makedefs libcupscgi.a ../cups/libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testhi.o libcupscgi.a ../cups/libcups.a \
- $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhi.o libcupscgi.a \
+ ../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
+ echo Testing help index API...
+ ./testhi
#
all:
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all config and object files...
#
# Targets in this directory...
#
-TARGETS = \
+LIBTARGETS = \
$(LIBCUPS) \
$(LIB32CUPS) \
$(LIB64CUPS) \
libcups.a \
- testadmin \
testarray \
- testcups \
testfile \
testhttp \
testi18n \
testipp \
testlang \
- testppd \
+ testppd
+
+TARGETS = \
+ $(LIBTARGETS) \
+ testadmin \
+ testcups \
testsnmp
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs: $(LIBTARGETS)
+
+
#
# Remove object and target files...
#
testarray: testarray.o libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testarray.o libcups.a \
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testarray.o libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ echo Running array API tests...
+ ./testarray
#
testfile: testfile.o libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testfile.o libcups.a \
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testfile.o libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ echo Running file API tests...
+ ./testfile
#
testhttp: testhttp.o libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testhttp.o libcups.a \
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhttp.o libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ echo Running HTTP API tests...
+ ./testhttp
#
testipp: testipp.o libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testipp.o libcups.a \
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testipp.o libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ echo Running IPP API tests...
+ ./testipp
#
testi18n: testi18n.o libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testi18n.o libcups.a \
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testi18n.o libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ echo Running internationalization API tests...
+ ./testi18n || echo I18N test failed!
#
testlang: testlang.o libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testlang.o libcups.a \
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testlang.o libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ echo Running language API tests...
+ ./testlang
#
testppd: testppd.o libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testppd.o libcups.a \
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testppd.o libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ echo Running PPD API tests...
+ ./testppd
#
* preference so we have to look it up this way...
*/
- if (!language && (language = getenv("LANG")) == NULL)
- language = appleLangDefault();
+ if (!language)
+ {
+ if ((language = getenv("LANG")) == NULL)
+ language = appleLangDefault();
+
+ DEBUG_printf(("cupsLangGet: language=\"%s\"\n", language));
+ }
#else
/*
pthread_mutex_unlock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
+ DEBUG_printf(("cupsLangGet: Using cached copy of \"%s\"...\n", real));
+
return (lang);
}
*/
if ((a = cupsArrayNew((cups_array_func_t)cups_message_compare, NULL)) == NULL)
+ {
+ DEBUG_puts("_cupsMessageLoad: Unable to allocate array!");
return (NULL);
+ }
/*
* Open the message catalog file...
*/
if ((fp = cupsFileOpen(filename, "r")) == NULL)
+ {
+ DEBUG_printf(("_cupsMessageLoad: Unable to open file: %s\n",
+ strerror(errno)));
return (a);
+ }
/*
* Read messages from the catalog file until EOF...
cupsFileClose(fp);
+ DEBUG_printf(("_cupsMessageLoad: Returning %d messages...\n",
+ cupsArrayCount(a)));
+
return (a);
}
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll_CC, keyword);
if ((attr = ppdFindAttr(ppd, lkeyword, spec)) == NULL)
{
- snprintf(lkeyword, sizeof(lkeyword), "%2s.%s", ll_CC, keyword);
+ snprintf(lkeyword, sizeof(lkeyword), "%2.2s.%s", ll_CC, keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
if (!attr)
#include <stdio.h>
#include <stdlib.h>
#include <cups/string.h>
+#include <sys/stat.h>
#include <errno.h>
#include "ppd.h"
#ifdef WIN32
if (argc == 1)
{
+ /*
+ * Setup directories for locale stuff...
+ */
+
+ if (access("locale", 0))
+ {
+ mkdir("locale", 0777);
+ mkdir("locale/fr", 0777);
+ symlink("../../../locale/cups_fr.po", "locale/fr/cups_fr.po");
+ mkdir("locale/zh_TW", 0777);
+ symlink("../../../locale/cups_zh_TW.po", "locale/zh_TW/cups_zh_TW.po");
+ }
+
+ putenv("LOCALEDIR=locale");
+
+ /*
+ * Do tests with test.ppd...
+ */
+
fputs("ppdOpenFile: ", stdout);
if ((ppd = ppdOpenFile("test.ppd")) != NULL)
all:
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all config and object files...
#
all:
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Remove all generated files...
#
$(LIB32OBJS) \
$(LIB64OBJS)
-TARGETS = \
+LIBTARGETS = \
$(LIBCUPSDRIVER) \
$(LIB32CUPSDRIVER) \
$(LIB64CUPSDRIVER) \
libcupsdriver.a \
- commandtoescpx \
- commandtopclx \
- rastertoescpx \
- rastertopclx \
testcmyk \
testdither \
testrgb
+TARGETS = \
+ $(LIBTARGETS) \
+ commandtoescpx \
+ commandtopclx \
+ rastertoescpx \
+ rastertopclx
#
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs: $(LIBTARGETS)
+
+
#
# Clean everything...
#
testcmyk: testcmyk.o libcupsdriver.a ../cups/libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testcmyk.o libcupsdriver.a ../cups/libcups.a \
- $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcmyk.o libcupsdriver.a \
+ ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
if test ! -d test; then \
mkdir test; \
fi
- ./testcmyk > test/testcmyk.log 2>&1 || echo "CMYK tests failed!"
+ echo Running CMYK API tests...
+ ./testcmyk > test/testcmyk.log
#
testdither: testdither.o libcupsdriver.a ../cups/libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testdither.o libcupsdriver.a ../cups/libcups.a \
- $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testdither.o libcupsdriver.a \
+ ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
if test ! -d test; then \
mkdir test; \
fi
- ./testdither > test/0-255.pgm 2>test/0-255.log || echo "Dither 0-255 test failed!"
- ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log || echo "Dither 0-127-255 test failed!"
- ./testdither 0 85 170 255 > test/0-85-170-255.pgm 2>test/0-85-170-255.log || echo "Dither 0-85-170-255 test failed!"
- ./testdither 0 63 127 170 198 227 255 > test/0-63-127-170-198-227-255.pgm 2>test/0-63-127-170-198-227-255.log || echo "Dither 0-63-127-170-198-227-255 test failed!"
- ./testdither 0 210 383 > test/0-210-383.pgm 2>test/0-210-383.log || echo "Dither 0-210-383 test failed!"
- ./testdither 0 82 255 > test/0-82-255.pgm 2>test/0-82-255.log || echo "Dither 0-82-255 test failed!"
- ./testdither 0 510 > test/0-510.pgm 2>test/0-510.log || echo "Dither 0-510 test failed!"
- ./testdither 0 1020 > test/0-1020.pgm 2>test/0-1020.log || echo "Dither 0-1020 test failed!"
+ echo Running dither API tests...
+ ./testdither > test/0-255.pgm 2>test/0-255.log
+ ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log
+ ./testdither 0 85 170 255 > test/0-85-170-255.pgm 2>test/0-85-170-255.log
+ ./testdither 0 63 127 170 198 227 255 > test/0-63-127-170-198-227-255.pgm 2>test/0-63-127-170-198-227-255.log
+ ./testdither 0 210 383 > test/0-210-383.pgm 2>test/0-210-383.log
+ ./testdither 0 82 255 > test/0-82-255.pgm 2>test/0-82-255.log
+ ./testdither 0 510 > test/0-510.pgm 2>test/0-510.log
+ ./testdither 0 1020 > test/0-1020.pgm 2>test/0-1020.log
#
testrgb: testrgb.o libcupsdriver.a ../cups/libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testrgb.o libcupsdriver.a ../cups/libcups.a \
- $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testrgb.o libcupsdriver.a \
+ ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
if test ! -d test; then \
mkdir test; \
fi
+ echo Running RGB API tests...
./testrgb > test/testrgb.log 2>&1 || echo "RGB tests failed!"
include ../Makedefs
-FILTERS = commandtops gziptoany hpgltops texttops pstops $(IMGFILTERS) \
- $(PDFTOPS) rastertolabel rastertoepson rastertohp
-TARGETS = $(FILTERS) \
+FILTERS = \
+ commandtops \
+ gziptoany \
+ hpgltops \
+ texttops \
+ pstops \
+ $(IMGFILTERS) \
+ $(PDFTOPS) \
+ rastertolabel \
+ rastertoepson \
+ rastertohp
+LIBTARGETS = \
$(LIBCUPSIMAGE) \
libcupsimage.a \
$(LIB32CUPSIMAGE) \
$(LIB64CUPSIMAGE) \
- rasterbench \
- testimage \
testraster
+TARGETS = \
+ $(LIBTARGETS) \
+ $(FILTERS) \
+ rasterbench \
+ testimage
HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs: $(LIBTARGETS)
+
+
#
# Clean all object files...
#
testraster: testraster.o ../cups/libcups.a libcupsimage.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testraster.o libcupsimage.a ../cups/libcups.a \
- $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) $(SSLLIBS) $(LIBGSSAPI)
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
+ ../cups/libcups.a $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
+ $(SSLLIBS) $(LIBGSSAPI)
+ echo Running raster API tests...
+ ./testraster
#
all:
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all config and object files...
#
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all config and object files...
#
all: $(MAN1) $(MAN5) $(MAN7) $(MAN8) html
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all config and object files...
#
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all object files...
#
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all object files...
#
ppdi.o \
ppdmerge.o \
ppdpo.o
-TARGETS = \
+LIBTARGETS = \
$(LIBCUPSPPDC) \
$(LIB32CUPSPPDC) \
$(LIB64CUPSPPDC) \
libcupsppdc.a \
+ ppdc-static
+TARGETS = \
+ $(LIBTARGETS) \
drv \
- ppdc-static \
ppdc \
ppdhtml \
ppdi \
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs: $(LIBTARGETS)
+
+
#
# Clean everything...
#
ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
echo Linking $@...
- $(CXX) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a ../cups/libcups.a \
- $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
+ ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
echo Testing PPD compiler...
./ppdc-static -l en,fr -I ../data foo.drv
./ppdc-static -l en,fr -z -I ../data foo.drv
testspeed.o \
testsub.o \
util.o
+
+LIBTARGETS = \
+ $(LIBCUPSMIME) \
+ $(LIB32CUPSMIME) \
+ $(LIB64CUPSMIME) \
+ libcupsmime.a \
+ testmime
+
TARGETS = \
+ $(LIBTARGETS) \
cupsd \
cupsfilter \
cups-deviced \
cups-driverd \
cups-lpd \
cups-polld \
- $(LIBCUPSMIME) \
- $(LIB32CUPSMIME) \
- $(LIB64CUPSMIME) \
- libcupsmime.a \
testdirsvc \
testlpd \
- testmime \
testspeed \
testsub
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs: $(LIBTARGETS)
+
+
#
# Clean all object files...
#
testmime: testmime.o libcupsmime.a ../cups/libcups.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testmime.o libcupsmime.a ../cups/libcups.a \
- $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testmime.o libcupsmime.a \
+ ../cups/libcups.a $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
+ echo Running MIME tests...
+ ./testmime
#
all: rfctohtml $(RFCS:.txt=.html)
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all config and object files...
#
#
rfctohtml: rfctohtml.o ../cups/libcups.a
- $(CC) $(LDFLAGS) -o $@ rfctohtml.o ../cups/libcups.a \
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ rfctohtml.o ../cups/libcups.a \
$(SSLLIBS) $(COMMONLIBS) $(LIBZ)
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all object files...
#
all:
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all config and object files...
#
all: ipptest
+#
+# Make library targets...
+#
+
+libs:
+
+
#
# Clean all object files...
#