Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to build in openwrt #122

Open
firmwarecostum opened this issue Nov 14, 2023 · 3 comments
Open

failed to build in openwrt #122

firmwarecostum opened this issue Nov 14, 2023 · 3 comments

Comments

@firmwarecostum
Copy link

failed to build in openwrt. i want to add dbd-pq in openwrt but i get an error. I have tried postgresql-15.1 and postgresql-16.1

SHELL= flock /home/open/wrt/tmp/.DBD-Pg-3.17.0.tar.gz.flock -c '        /home/open/wrt/scripts/download.pl "/home/open/wrt/dl" "DBD-Pg-3.17.0.tar.gz" "skip" "" "https://cpan.metacpan.org/authors/id/T/TU/TURNSTEP/"    '
+ curl -f --connect-timeout 20 --retry 5 --location https://cpan.metacpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-3.17.0.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  281k  100  281k    0     0  2998k      0 --:--:-- --:--:-- --:--:-- 2998k
touch /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/.prepared_f7d8bd15bf3af99516efdd8f4a756dab_6664517399ebbbc92a37c5bb081b5c53_check
. /home/open/wrt/include/shell.sh; /home/open/wrt/staging_dir/host/bin/libdeflate-gzip
-dc /home/open/wrt/dl/DBD-Pg-3.17.0.tar.gz | tar -C /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/. /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0
touch /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/.prepared_f7d8bd15bf3af99516efdd8f4a756dab_6664517399ebbbc92a37c5bb081b5c53
rm -f /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/.configured_*
rm -f /home/open/wrt/staging_dir/target-aarch64_generic_musl/stamp/.perl-dbd-pg_installed
(cd /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0; /home/open/wrt/staging_dir/host/bin/flock -s -w 300 9 || { echo perlmod/Configure: failed to acquire lock; exit 1; }; (echo -e 'use Config;\n\n${tied %Config::Config}{cpprun}="aarch64-openwrt-linux-cpp -E";\n' ; cat Makefile.PL) | PERL_MM_USE_DEFAULT=1  /home/open/wrt/staging_dir/hostpkg/usr/bin/perl5.38.0 -I. -- -  AR=ar CC=aarch64-openwrt-linux-gcc CCFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0=DBD-Pg-3.17.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/include -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include/fortify -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE" CCCDLFLAGS=-fPIC CCDLFLAGS=-Wl,-E DLEXT=so DLSRC=dl_dlopen.xs EXE_EXT=" " FULL_AR=aarch64-openwrt-linux-ar LD=aarch64-openwrt-linux-gcc LDDLFLAGS="-shared -rdynamic -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/lib -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/lib -znow -zrelro" LDFLAGS="  " LIBC=" " LIB_EXT=.a OBJ_EXT=.o OSNAME=linux OSVERS=2.4.30 RANLIB=: SITELIBEXP=" " SITEARCHEXP=" " SO=so VENDORARCHEXP=" " VENDORLIBEXP=" " SITEPREFIX=/usr INSTALLPRIVLIB=/usr/lib/perl5/5.38 INSTALLSITELIB=/usr/lib/perl5/5.38 INSTALLVENDORLIB=" " INSTALLARCHLIB=/usr/lib/perl5/5.38 INSTALLSITEARCH=/usr/lib/perl5/5.38 INSTALLVENDORARCH=" " INSTALLBIN=/usr/bin INSTALLSITEBIN=/usr/bin INSTALLVENDORBIN=" " INSTALLSCRIPT=/usr/bin INSTALLSITESCRIPT=/usr/bin INSTALLVENDORSCRIPT=" " INSTALLMAN1DIR=/usr/man/man1 INSTALLSITEMAN1DIR=/usr/man/man1 INSTALLVENDORMAN1DIR=" " INSTALLMAN3DIR=/usr/man/man3 INSTALLSITEMAN3DIR=/usr/man/man3 INSTALLVENDORMAN3DIR=" " LINKTYPE=dynamic DESTDIR=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/ipkg-install ) 9> /home/open/wrt/tmp/.perlmod-perl.flock
Configuring DBD::Pg 3.17.0
PostgreSQL version: 160001 (default port: 5432)
POSTGRES_HOME: (not set)
POSTGRES_INCLUDE: /home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include
POSTGRES_LIB: /home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib
OS: linux
Checking if your kit is complete...
Looks good
Using DBI 1.643 (for perl 5.038000 on x86_64-linux-thread-multi) installed in /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::Pg
Writing MYMETA.yml and MYMETA.json
sed -i -e 's!^PERL_INC = .*!PERL_INC = /home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/!' /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/Makefile
touch /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/.built
touch /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/.built_check
(/home/open/wrt/staging_dir/host/bin/flock -s -w 300 9 || { echo perlmod/Compile: failed to acquire lock; exit 1; }; PERL5LIB=  make -C /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0  install ) 9> /home/open/wrt/tmp/.perlmod-perl.flock
make[3]: Entering directory '/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0'
cp Pg.pm blib/lib/DBD/Pg.pm
cp lib/Bundle/DBD/Pg.pm blib/lib/Bundle/DBD/Pg.pm
Running Mkbootstrap for Pg ()
chmod 644 "Pg.bs"
"/home/open/wrt/staging_dir/hostpkg/usr/bin/perl5.38.0" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644
"/home/open/wrt/staging_dir/hostpkg/usr/bin/perl5.38.0" -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/" /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBI/Driver.xst > Pg.xsi
"/home/open/wrt/staging_dir/hostpkg/usr/bin/perl5.38.0" "/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.0/ExtUtils/xsubpp"  -typemap '/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.0/ExtUtils/typemap'  Pg.xs > Pg.xsc
mv Pg.xsc Pg.c
aarch64-openwrt-linux-gcc -c  -I/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include -I/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBI -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0=DBD-Pg-3.17.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/include -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include/fortify -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -O2  -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.17.0\" -DXS_VERSION=\"3.17.0\" -fPIC "-I/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/"   Pg.c
./Pg.xsi: In function 'XS_DBD__Pg__db_selectrow_arrayref':
./Pg.xsi:234:9: warning: 'Perl_dowantarray' is deprecated [-Wdeprecated-declarations]
  234 |         if (GIMME == G_SCALAR)
      |         ^~
In file included from /home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/perl.h:6188,
                 from /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBI/DBIXS.h:23,
                 from Pg.h:58,
                 from Pg.xs:14:
/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/proto.h:1019:1: note: declared here
 1019 | Perl_dowantarray(pTHX)
      | ^~~~~~~~~~~~~~~~
./Pg.xsi:240:9: warning: 'Perl_dowantarray' is deprecated [-Wdeprecated-declarations]
  240 |         if (GIMME == G_SCALAR)
      |         ^~
/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/proto.h:1019:1: note: declared here
 1019 | Perl_dowantarray(pTHX)
      | ^~~~~~~~~~~~~~~~
aarch64-openwrt-linux-gcc -c  -I/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include -I/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBI -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0=DBD-Pg-3.17.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/include -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include/fortify -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -O2  -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.17.0\" -DXS_VERSION=\"3.17.0\" -fPIC "-I/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/"   dbdimp.c
dbdimp.c:23:5: error: conflicting types for 'lo_truncate'; have 'Oid(PGconn *, int,  size_t)' {aka 'unsigned int(struct pg_conn *, int,  long unsigned int)'}
   23 | Oid lo_truncate (PGconn *conn, int fd, size_t len);
      |     ^~~~~~~~~~~
In file included from Pg.h:35,
                 from dbdimp.c:14:
/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include/libpq-fe.h:628:17: note: previous declaration of 'lo_truncate' with type 'int(PGconn *, int,  size_t)' {aka 'int(struct pg_conn *, int,  long unsigned int)'}
  628 | extern int      lo_truncate(PGconn *conn, int fd, size_t len);
      |                 ^~~~~~~~~~~
dbdimp.c:24:5: error: conflicting types for 'lo_truncate'; have 'Oid(PGconn *, int,  size_t)' {aka 'unsigned int(struct pg_conn *, int,  long unsigned int)'}
   24 | Oid lo_truncate (PGconn *conn, int fd, size_t len) {
      |     ^~~~~~~~~~~
/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include/libpq-fe.h:628:17: note: previous declaration of 'lo_truncate' with type 'int(PGconn *, int,  size_t)' {aka 'int(struct pg_conn *, int,  long unsigned int)'}
  628 | extern int      lo_truncate(PGconn *conn, int fd, size_t len);
      |                 ^~~~~~~~~~~
dbdimp.c:31:5: error: conflicting types for 'lo_import_with_oid'; have 'Oid(PGconn *, char *, unsigned int)' {aka 'unsigned int(struct pg_conn *, char *, unsigned int)'}
   31 | Oid lo_import_with_oid (PGconn *conn, char *filename, unsigned int lobjId);
      |     ^~~~~~~~~~~~~~~~~~
/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include/libpq-fe.h:632:17: note: previous declaration of 'lo_import_with_oid' with type 'Oid(PGconn *, const char *, Oid)' {aka 'unsigned int(struct pg_conn *, const char *, unsigned int)'}
  632 | extern Oid      lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId);
      |                 ^~~~~~~~~~~~~~~~~~
dbdimp.c:32:5: error: conflicting types for 'lo_import_with_oid'; have 'Oid(PGconn *, char *, unsigned int)' {aka 'unsigned int(struct pg_conn *, char *, unsigned int)'}
   32 | Oid lo_import_with_oid (PGconn *conn, char *filename, unsigned int lobjId) {
      |     ^~~~~~~~~~~~~~~~~~
/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include/libpq-fe.h:632:17: note: previous declaration of 'lo_import_with_oid' with type 'Oid(PGconn *, const char *, Oid)' {aka 'unsigned int(struct pg_conn *, const char *, unsigned int)'}
  632 | extern Oid      lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId);
      |                 ^~~~~~~~~~~~~~~~~~
In file included from /home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/perl.h:6227,
                 from /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBI/DBIXS.h:23,
                 from Pg.h:58:
dbdimp.c: In function 'pg_db_FETCH_attrib':
dbdimp.c:823:34: error: 'PGDEFPORT' undeclared (first use in this function)
  823 |             retsv = newSViv((IV) PGDEFPORT );
      |                                  ^~~~~~~~~
/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/embed.h:435:68: note: in definition of macro 'newSViv'
  435 | # define newSViv(a)                             Perl_newSViv(aTHX_ a)
      |                                                                    ^
dbdimp.c:823:34: note: each undeclared identifier is reported only once for each function it appears in
  823 |             retsv = newSViv((IV) PGDEFPORT );
      |                                  ^~~~~~~~~
/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/embed.h:435:68: note: in definition of macro 'newSViv'
  435 | # define newSViv(a)                             Perl_newSViv(aTHX_ a)
      |                                                                    ^
make[3]: *** [Makefile:361: dbdimp.o] Error 1
make[3]: Leaving directory '/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0'
make[2]: *** [Makefile:67: /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/.built] Error 2
make[2]: Leaving directory '/home/open/wrt/feeds/packages/lang/perl-dbd-pg'
time: package/feeds/packages/perl-dbd-pg/compile#3.39#0.31#3.73
    ERROR: package/feeds/packages/perl-dbd-pg failed to build.
make[1]: *** [package/Makefile:120: package/feeds/packages/perl-dbd-pg/compile] Error 1make[1]: Leaving directory '/home/open/wrt'
@turnstep
Copy link
Contributor

Can you verify what version of Postgres your are compiling against? That lo_truncate warning should not even show up unless you are trying to compile against a version 8.2 or older, which is not supported. It may be that PGLIBVERSION is not set

Since it is also failing to pick up a valid PGDEFPORT, it would seem your compiler is not getting the flags it should be. Can you show us the Makefile that is generated?

@predators46
Copy link

@turnstep

openwrt builds postgresql using this Makefile

https://github.com/openwrt/packages/blob/openwrt-23.05/libs/postgresql/Makefile

@predators46
Copy link

@turnstep

makefile generated DBD-Pg

# This Makefile is for the DBD::Pg extension to perl.
#
# It was generated automatically by MakeMaker version
# 7.70 (Revision: 77000) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
#       ANY CHANGES MADE HERE WILL BE LOST!
#
#   MakeMaker ARGV: (q[AR=ar], q[CC=aarch64-openwrt-linux-gcc], q[CCFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0=DBD-Pg-3.17.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/include -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include/fortify -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE], q[CCCDLFLAGS=-fPIC], q[CCDLFLAGS=-Wl,-E], q[DLEXT=so], q[DLSRC=dl_dlopen.xs], q[EXE_EXT= ], q[FULL_AR=aarch64-openwrt-linux-ar], q[LD=aarch64-openwrt-linux-gcc], q[LDDLFLAGS=-shared -rdynamic -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/lib -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/lib -znow -zrelro], q[LDFLAGS=  ], q[LIBC= ], q[LIB_EXT=.a], q[OBJ_EXT=.o], q[OSNAME=linux], q[OSVERS=2.4.30], q[RANLIB=:], q[SITELIBEXP= ], q[SITEARCHEXP= ], q[SO=so], q[VENDORARCHEXP= ], q[VENDORLIBEXP= ], q[SITEPREFIX=/usr], q[INSTALLPRIVLIB=/usr/lib/perl5/5.38], q[INSTALLSITELIB=/usr/lib/perl5/5.38], q[INSTALLVENDORLIB= ], q[INSTALLARCHLIB=/usr/lib/perl5/5.38], q[INSTALLSITEARCH=/usr/lib/perl5/5.38], q[INSTALLVENDORARCH= ], q[INSTALLBIN=/usr/bin], q[INSTALLSITEBIN=/usr/bin], q[INSTALLVENDORBIN= ], q[INSTALLSCRIPT=/usr/bin], q[INSTALLSITESCRIPT=/usr/bin], q[INSTALLVENDORSCRIPT= ], q[INSTALLMAN1DIR=/usr/man/man1], q[INSTALLSITEMAN1DIR=/usr/man/man1], q[INSTALLVENDORMAN1DIR= ], q[INSTALLMAN3DIR=/usr/man/man3], q[INSTALLSITEMAN3DIR=/usr/man/man3], q[INSTALLVENDORMAN3DIR= ], q[LINKTYPE=dynamic], q[DESTDIR=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/ipkg-install])
#

#   MakeMaker Parameters:

#     ABSTRACT => q[PostgreSQL database driver for the DBI module]
#     AUTHOR => [q[Greg Sabino Mullane]]
#     BUILD_REQUIRES => {  }
#     CCFLAGS => q[-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DPGLIBVERSION=150001 -DPGDEFPORT=5432 -DHAS64BITLO]
#     CONFIGURE_REQUIRES => {  }
#     INC => q[-I/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include -I/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.2/x86_64-linux-thread-multi/auto/DBI]
#     LIBS => [q[-L/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib -lpq -lm]]
#     LINKTYPE => q[static]
#     NAME => q[DBD::Pg]
#     NEEDS_LINKING => q[1]
#     NORECURS => q[1]
#     NO_META => q[1]
#     OBJECT => q[Pg$(OBJ_EXT) dbdimp$(OBJ_EXT) quote$(OBJ_EXT) types$(OBJ_EXT)]
#     PERL_MALLOC_OK => q[1]
#     PM => { Pg.pm=>q[$(INST_LIBDIR)/Pg.pm], lib/Bundle/DBD/Pg.pm=>q[$(INST_LIB)/Bundle/DBD/Pg.pm] }
#     PREREQ_PM => { DBI=>q[1.614], ExtUtils::MakeMaker=>q[6.58], File::Temp=>q[0], Test::More=>q[0.88], Time::HiRes=>q[0], version=>q[0] }
#     TEST_REQUIRES => {  }
#     VERSION_FROM => q[Pg.pm]
#     clean => { FILES=>q[trace Pg.xsi README.testdatabase cover_db *.tst] }
#     realclean => { FILES=>q[dbdpg_test_database/] }

# --- MakeMaker post_initialize section:


# --- MakeMaker const_config section:

# These definitions are from config.sh (via /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/x86_64-linux-thread-multi/Config.pm).
# They may have been overridden via Makefile.PL or on the command line.
AR = ar
CC = aarch64-openwrt-linux-gcc
CCCDLFLAGS = -fPIC
CCDLFLAGS = -Wl,-E
CPPRUN = cc  -E
DLEXT = so
DLSRC = dl_dlopen.xs
EXE_EXT =  
FULL_AR = aarch64-openwrt-linux-ar
LD = aarch64-openwrt-linux-gcc
LDDLFLAGS = -shared -rdynamic -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/lib -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/lib -znow -zrelro
LDFLAGS =   
LIBC =  
LIB_EXT = .a
OBJ_EXT = .o
OSNAME = linux
OSVERS = 2.4.30
RANLIB = :
SITELIBEXP =  
SITEARCHEXP =  
SO = so
VENDORARCHEXP =  
VENDORLIBEXP =  


# --- MakeMaker constants section:
AR_STATIC_ARGS = cr
DIRFILESEP = /
DFSEP = $(DIRFILESEP)
NAME = DBD::Pg
NAME_SYM = DBD_Pg
VERSION = 3.17.0
VERSION_MACRO = VERSION
VERSION_SYM = 3_17_0
DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
XS_VERSION = 3.17.0
XS_VERSION_MACRO = XS_VERSION
XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
INST_ARCHLIB = blib/arch
INST_SCRIPT = blib/script
INST_BIN = blib/bin
INST_LIB = blib/lib
INST_MAN1DIR = blib/man1
INST_MAN3DIR = blib/man3
MAN1EXT = 1
MAN3EXT = 3
MAN1SECTION = 1
MAN3SECTION = 3
INSTALLDIRS = site
DESTDIR = /home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/ipkg-install
PREFIX = $(SITEPREFIX)
PERLPREFIX = /home/open/wrt/staging_dir/hostpkg/usr/bin/..
SITEPREFIX = /usr
VENDORPREFIX = 
INSTALLPRIVLIB = /usr/lib/perl5/5.38
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
INSTALLSITELIB = /usr/lib/perl5/5.38
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
INSTALLVENDORLIB =  
DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
INSTALLARCHLIB = /usr/lib/perl5/5.38
DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
INSTALLSITEARCH = /usr/lib/perl5/5.38
DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
INSTALLVENDORARCH =  
DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
INSTALLBIN = /usr/bin
DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
INSTALLSITEBIN = /usr/bin
DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
INSTALLVENDORBIN =  
DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
INSTALLSCRIPT = /usr/bin
DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
INSTALLSITESCRIPT = /usr/bin
DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
INSTALLVENDORSCRIPT =  
DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
INSTALLMAN1DIR = /usr/man/man1
DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
INSTALLSITEMAN1DIR = /usr/man/man1
DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
INSTALLVENDORMAN1DIR =  
DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
INSTALLMAN3DIR = /usr/man/man3
DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
INSTALLSITEMAN3DIR = /usr/man/man3
DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
INSTALLVENDORMAN3DIR =  
DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
PERL_LIB = /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2
PERL_ARCHLIB = /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/x86_64-linux-thread-multi
PERL_ARCHLIBDEP = /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/x86_64-linux-thread-multi
LIBPERL_A = libperl.a
FIRST_MAKEFILE = Makefile
MAKEFILE_OLD = Makefile.old
MAKE_APERL_FILE = Makefile.aperl
PERLMAINCC = $(CC)
PERL_INC = /home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib/perl5/5.38/CORE/
PERL_INCDEP = /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/x86_64-linux-thread-multi/CORE
PERL = "/home/open/wrt/staging_dir/hostpkg/usr/bin/perl5.38.2"
FULLPERL = "/home/open/wrt/staging_dir/hostpkg/usr/bin/perl5.38.2"
ABSPERL = $(PERL)
PERLRUN = $(PERL)
FULLPERLRUN = $(FULLPERL)
ABSPERLRUN = $(ABSPERL)
PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
PERL_CORE = 0
PERM_DIR = 755
PERM_RW = 644
PERM_RWX = 755

MAKEMAKER   = /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/ExtUtils/MakeMaker.pm
MM_VERSION  = 7.70
MM_REVISION = 77000

# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
# DLBASE  = Basename part of dynamic library. May be just equal BASEEXT.
MAKE = make
FULLEXT = DBD/Pg
BASEEXT = Pg
PARENT_NAME = DBD
DLBASE = $(BASEEXT)
VERSION_FROM = Pg.pm
INC = -I/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include -I/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.2/x86_64-linux-thread-multi/auto/DBI
OBJECT = Pg$(OBJ_EXT) dbdimp$(OBJ_EXT) quote$(OBJ_EXT) types$(OBJ_EXT)
LDFROM = $(OBJECT)
LINKTYPE = dynamic
BOOTDEP = 

# Handy lists of source code files:
XS_FILES = Pg.xs
C_FILES  = Pg.c \
	dbdimp.c \
	quote.c \
	types.c
O_FILES  = Pg.o \
	dbdimp.o \
	quote.o \
	types.o
H_FILES  = Pg.h \
	dbdimp.h \
	dbivport.h \
	quote.h \
	types.h
MAN1PODS = 
MAN3PODS = Pg.pm \
	lib/Bundle/DBD/Pg.pm

# Where is the Config information that we are using/depend on
CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_INCDEP)$(DFSEP)config.h

# Where to build things
INST_LIBDIR      = $(INST_LIB)/DBD
INST_ARCHLIBDIR  = $(INST_ARCHLIB)/DBD

INST_AUTODIR     = $(INST_LIB)/auto/$(FULLEXT)
INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)

INST_STATIC      = $(INST_ARCHAUTODIR)/$(BASEEXT)$(LIB_EXT)
INST_DYNAMIC     = $(INST_ARCHAUTODIR)/$(DLBASE).$(DLEXT)
INST_BOOT        = $(INST_ARCHAUTODIR)/$(BASEEXT).bs

# Extra linker info
EXPORT_LIST        = 
PERL_ARCHIVE       = 
PERL_ARCHIVEDEP    = 
PERL_ARCHIVE_AFTER = 


TO_INST_PM = Pg.pm \
	lib/Bundle/DBD/Pg.pm


# --- MakeMaker platform_constants section:
MM_Unix_VERSION = 7.70
PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc


# --- MakeMaker tool_autosplit section:
# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
AUTOSPLITFILE = $(ABSPERLRUN)  -e 'use AutoSplit;  autosplit($$$$ARGV[0], $$$$ARGV[1], 0, 1, 1)' --



# --- MakeMaker tool_xsubpp section:

XSUBPPDIR = /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/ExtUtils
XSUBPP = "$(XSUBPPDIR)$(DFSEP)xsubpp"
XSUBPPRUN = $(PERLRUN) $(XSUBPP)
XSPROTOARG = 
XSUBPPDEPS = /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/ExtUtils/typemap /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/ExtUtils$(DFSEP)xsubpp
XSUBPPARGS = -typemap '/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/ExtUtils/typemap'
XSUBPP_EXTRA_ARGS =


# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
MV = mv
NOOP = $(TRUE)
NOECHO = @
RM_F = rm -f
RM_RF = rm -rf
TEST_F = test -f
TOUCH = touch
UMASK_NULL = umask 0
DEV_NULL = > /dev/null 2>&1
MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
FALSE = false
TRUE = true
ECHO = echo
ECHO_N = echo -n
UNINST = 0
VERBINST = 0
MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
MACROSTART = 
MACROEND = 
USEMAKEFILE = -f
FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
CP_NONEMPTY = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'cp_nonempty' --


# --- MakeMaker makemakerdflt section:
makemakerdflt : all
	$(NOECHO) $(NOOP)


# --- MakeMaker dist section:
TAR = tar
TARFLAGS = cvf
ZIP = zip
ZIPFLAGS = -r
COMPRESS = gzip --best
SUFFIX = .gz
SHAR = shar
PREOP = $(NOECHO) $(NOOP)
POSTOP = $(NOECHO) $(NOOP)
TO_UNIX = $(NOECHO) $(NOOP)
CI = ci -u
RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
DIST_CP = best
DIST_DEFAULT = tardist
DISTNAME = DBD-Pg
DISTVNAME = DBD-Pg-3.17.0


# --- MakeMaker macro section:


# --- MakeMaker depend section:


# --- MakeMaker cflags section:

CCFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0=DBD-Pg-3.17.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/include -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include/fortify -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
OPTIMIZE = -O2
PERLTYPE = 
MPOLLUTE = $(PERL_MALLOC_DEF)


# --- MakeMaker const_loadlibs section:

# DBD::Pg might depend on some other libraries:
# See ExtUtils::Liblist for details
#
EXTRALIBS = -L/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib -lpq
LDLOADLIBS = -L/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib -lpq -lm
BSLOADLIBS = 
LD_RUN_PATH = /home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/lib


# --- MakeMaker const_cccmd section:
CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \
	$(CCFLAGS) $(OPTIMIZE) \
	$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
	$(XS_DEFINE_VERSION)

# --- MakeMaker post_constants section:


# --- MakeMaker pasthru section:

PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
	LINKTYPE="$(LINKTYPE)"\
	OPTIMIZE="$(OPTIMIZE)"\
	PREFIX="$(PREFIX)"\
	PASTHRU_DEFINE='$(DEFINE) $(PASTHRU_DEFINE)'\
	PASTHRU_INC='-I/home/open/wrt/staging_dir/target-aarch64_generic_musl/usr/include -I/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.2/x86_64-linux-thread-multi/auto/DBI $(PASTHRU_INC)'


# --- MakeMaker special_targets section:
.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)

.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir pure_all subdirs clean_subdirs makemakerdflt manifypods realclean_subdirs subdirs_dynamic subdirs_pure_nolink subdirs_static subdirs-test_dynamic subdirs-test_static test_dynamic test_static



# --- MakeMaker c_o section:

.c.i:
	$(CPPRUN) -c $(PASTHRU_INC) $(INC) \
	$(CCFLAGS) $(OPTIMIZE) \
	$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
	$(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i

.c.s :
	$(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c 

.c$(OBJ_EXT) :
	$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c

.cpp$(OBJ_EXT) :
	$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp

.cxx$(OBJ_EXT) :
	$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx

.cc$(OBJ_EXT) :
	$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc

.C$(OBJ_EXT) :
	$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C


# --- MakeMaker xs_c section:

.xs.c:
	$(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc
	$(MV) $*.xsc $*.c


# --- MakeMaker xs_o section:
.xs$(OBJ_EXT) :
	$(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc
	$(MV) $*.xsc $*.c
	$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c 


# --- MakeMaker top_targets section:
all :: pure_all manifypods
	$(NOECHO) $(NOOP)

pure_all :: config pm_to_blib subdirs linkext
	$(NOECHO) $(NOOP)

subdirs :: $(MYEXTLIB)
	$(NOECHO) $(NOOP)

config :: $(FIRST_MAKEFILE) blibdirs
	$(NOECHO) $(NOOP)

$(O_FILES) : $(H_FILES)

help :
	perldoc ExtUtils::MakeMaker


# --- MakeMaker blibdirs section:
blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
	$(NOECHO) $(NOOP)

# Backwards compat with 6.18 through 6.25
blibdirs.ts : blibdirs
	$(NOECHO) $(NOOP)

$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
	$(NOECHO) $(MKPATH) $(INST_LIBDIR)
	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
	$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists

$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
	$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
	$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists

$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
	$(NOECHO) $(MKPATH) $(INST_AUTODIR)
	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
	$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists

$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
	$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
	$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists

$(INST_BIN)$(DFSEP).exists :: Makefile.PL
	$(NOECHO) $(MKPATH) $(INST_BIN)
	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
	$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists

$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
	$(NOECHO) $(MKPATH) $(INST_SCRIPT)
	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
	$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists

$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
	$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
	$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists

$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
	$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
	$(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
	$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists



# --- MakeMaker linkext section:

linkext :: dynamic
	$(NOECHO) $(NOOP)


# --- MakeMaker dlsyms section:


# --- MakeMaker dynamic_bs section:
BOOTSTRAP = $(BASEEXT).bs

# As Mkbootstrap might not write a file (if none is required)
# we use touch to prevent make continually trying to remake it.
# The DynaLoader only reads a non-empty file.
$(BASEEXT).bs : $(FIRST_MAKEFILE) $(BOOTDEP)
	$(NOECHO) $(ECHO) "Running Mkbootstrap for $(BASEEXT) ($(BSLOADLIBS))"
	$(NOECHO) $(PERLRUN) \
		"-MExtUtils::Mkbootstrap" \
		-e "Mkbootstrap('$(BASEEXT)','$(BSLOADLIBS)');"
	$(NOECHO) $(TOUCH) "$(BASEEXT).bs"
	$(CHMOD) $(PERM_RW) "$(BASEEXT).bs"

$(INST_ARCHAUTODIR)/$(BASEEXT).bs : $(BASEEXT).bs $(INST_ARCHAUTODIR)$(DFSEP).exists
	$(NOECHO) $(RM_RF) $(INST_ARCHAUTODIR)/$(BASEEXT).bs
	- $(CP_NONEMPTY) $(BASEEXT).bs $(INST_ARCHAUTODIR)/$(BASEEXT).bs $(PERM_RW)


# --- MakeMaker dynamic section:

dynamic :: $(FIRST_MAKEFILE) config $(INST_BOOT) $(INST_DYNAMIC)
	$(NOECHO) $(NOOP)


# --- MakeMaker dynamic_lib section:
# This section creates the dynamically loadable objects from relevant
# objects and possibly $(MYEXTLIB).
ARMAYBE = :
OTHERLDFLAGS = 
INST_DYNAMIC_DEP = 
INST_DYNAMIC_FIX = 

$(INST_DYNAMIC) : $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVEDEP) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP) 
	$(RM_F) $@
	LD_RUN_PATH="$(LD_RUN_PATH)" $(LD)  $(LDDLFLAGS)  $(LDFROM) $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) \
	  $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST) \
	  $(INST_DYNAMIC_FIX)
	$(CHMOD) $(PERM_RWX) $@


# --- MakeMaker static section:

## $(INST_PM) has been moved to the all: target.
## It remains here for awhile to allow for old usage: "make static"
static :: $(FIRST_MAKEFILE) $(INST_STATIC)
	$(NOECHO) $(NOOP)


# --- MakeMaker static_lib section:
$(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists
	$(RM_F) "$@"
	$(AR) $(AR_STATIC_ARGS) "$@" $(OBJECT)
	$(RANLIB) "$@"
	$(CHMOD) $(PERM_RWX) $@
	$(NOECHO) $(ECHO) "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)$(DFSEP)extralibs.ld


# --- MakeMaker manifypods section:

POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
POD2MAN = $(POD2MAN_EXE)


manifypods : pure_all config  \
	Pg.pm \
	lib/Bundle/DBD/Pg.pm
	$(NOECHO) $(POD2MAN) --section=$(MAN3SECTION) --perm_rw=$(PERM_RW) -u \
	  Pg.pm $(INST_MAN3DIR)/DBD::Pg.$(MAN3EXT) \
	  lib/Bundle/DBD/Pg.pm $(INST_MAN3DIR)/Bundle::DBD::Pg.$(MAN3EXT) 




# --- MakeMaker processPL section:


# --- MakeMaker installbin section:


# --- MakeMaker subdirs section:

# none

# --- MakeMaker clean_subdirs section:
clean_subdirs :
	$(NOECHO) $(NOOP)


# --- MakeMaker clean section:

# Delete temporary files but do not touch installed files. We don't delete
# the Makefile here so a later make realclean still has a makefile to use.

clean :: clean_subdirs
	- $(RM_F) \
	  $(BASEEXT).bso $(BASEEXT).def \
	  $(BASEEXT).exp $(BASEEXT).x \
	  $(BOOTSTRAP) $(INST_ARCHAUTODIR)/extralibs.all \
	  $(INST_ARCHAUTODIR)/extralibs.ld $(MAKE_APERL_FILE) \
	  *$(LIB_EXT) *$(OBJ_EXT) \
	  *perl.core MYMETA.json \
	  MYMETA.yml Pg.base \
	  Pg.bs Pg.bso \
	  Pg.c Pg.def \
	  Pg.exp Pg.o \
	  Pg_def.old blibdirs.ts \
	  core core.*perl.*.? \
	  core.[0-9] core.[0-9][0-9] \
	  core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9] \
	  core.[0-9][0-9][0-9][0-9][0-9] lib$(BASEEXT).def \
	  mon.out perl \
	  perl$(EXE_EXT) perl.exe \
	  perlmain.c pm_to_blib \
	  pm_to_blib.ts so_locations \
	  tmon.out 
	- $(RM_RF) \
	  *.tst Pg.xsi \
	  README.testdatabase blib \
	  cover_db trace 
	  $(NOECHO) $(RM_F) $(MAKEFILE_OLD)
	- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)


# --- MakeMaker realclean_subdirs section:
# so clean is forced to complete before realclean_subdirs runs
realclean_subdirs : clean
	$(NOECHO) $(NOOP)


# --- MakeMaker realclean section:
# Delete temporary files (via clean) and also delete dist files
realclean purge :: realclean_subdirs
	- $(RM_F) \
	  $(FIRST_MAKEFILE) $(MAKEFILE_OLD) \
	  $(OBJECT) 
	- $(RM_RF) \
	  $(DISTVNAME) dbdpg_test_database/ 


# --- MakeMaker metafile section:
metafile :
	$(NOECHO) $(NOOP)


# --- MakeMaker signature section:
signature :
	cpansign -s


# --- MakeMaker dist_basics section:
distclean :: realclean distcheck
	$(NOECHO) $(NOOP)

distcheck :
	$(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck

skipcheck :
	$(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck

manifest :
	$(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest

veryclean : realclean
	$(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old



# --- MakeMaker dist_core section:

dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
	$(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
	  -e '    if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --

tardist : $(DISTVNAME).tar$(SUFFIX)
	$(NOECHO) $(NOOP)

uutardist : $(DISTVNAME).tar$(SUFFIX)
	uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
	$(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)_uu'

$(DISTVNAME).tar$(SUFFIX) : distdir
	$(PREOP)
	$(TO_UNIX)
	$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
	$(RM_RF) $(DISTVNAME)
	$(COMPRESS) $(DISTVNAME).tar
	$(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)'
	$(POSTOP)

zipdist : $(DISTVNAME).zip
	$(NOECHO) $(NOOP)

$(DISTVNAME).zip : distdir
	$(PREOP)
	$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
	$(RM_RF) $(DISTVNAME)
	$(NOECHO) $(ECHO) 'Created $(DISTVNAME).zip'
	$(POSTOP)

shdist : distdir
	$(PREOP)
	$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
	$(RM_RF) $(DISTVNAME)
	$(NOECHO) $(ECHO) 'Created $(DISTVNAME).shar'
	$(POSTOP)


# --- MakeMaker distdir section:
create_distdir :
	$(RM_RF) $(DISTVNAME)
	$(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
		-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"

distdir : create_distdir  
	$(NOECHO) $(NOOP)



# --- MakeMaker dist_test section:
disttest : distdir
	cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL "AR=ar" "CC=aarch64-openwrt-linux-gcc" "CCFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0=DBD-Pg-3.17.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/include -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include/fortify -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE" "CCCDLFLAGS=-fPIC" "CCDLFLAGS=-Wl,-E" "DLEXT=so" "DLSRC=dl_dlopen.xs" "EXE_EXT= " "FULL_AR=aarch64-openwrt-linux-ar" "LD=aarch64-openwrt-linux-gcc" "LDDLFLAGS=-shared -rdynamic -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/lib -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/lib -znow -zrelro" "LDFLAGS=  " "LIBC= " "LIB_EXT=.a" "OBJ_EXT=.o" "OSNAME=linux" "OSVERS=2.4.30" "RANLIB=:" "SITELIBEXP= " "SITEARCHEXP= " "SO=so" "VENDORARCHEXP= " "VENDORLIBEXP= " "SITEPREFIX=/usr" "INSTALLPRIVLIB=/usr/lib/perl5/5.38" "INSTALLSITELIB=/usr/lib/perl5/5.38" "INSTALLVENDORLIB= " "INSTALLARCHLIB=/usr/lib/perl5/5.38" "INSTALLSITEARCH=/usr/lib/perl5/5.38" "INSTALLVENDORARCH= " "INSTALLBIN=/usr/bin" "INSTALLSITEBIN=/usr/bin" "INSTALLVENDORBIN= " "INSTALLSCRIPT=/usr/bin" "INSTALLSITESCRIPT=/usr/bin" "INSTALLVENDORSCRIPT= " "INSTALLMAN1DIR=/usr/man/man1" "INSTALLSITEMAN1DIR=/usr/man/man1" "INSTALLVENDORMAN1DIR= " "INSTALLMAN3DIR=/usr/man/man3" "INSTALLSITEMAN3DIR=/usr/man/man3" "INSTALLVENDORMAN3DIR= " "LINKTYPE=dynamic" "DESTDIR=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/ipkg-install"
	cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
	cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)



# --- MakeMaker dist_ci section:
ci :
	$(ABSPERLRUN) -MExtUtils::Manifest=maniread -e '@all = sort keys %{ maniread() };' \
	  -e 'print(qq{Executing $(CI) @all\n});' \
	  -e 'system(qq{$(CI) @all}) == 0 or die $$!;' \
	  -e 'print(qq{Executing $(RCS_LABEL) ...\n});' \
	  -e 'system(qq{$(RCS_LABEL) @all}) == 0 or die $$!;' --


# --- MakeMaker distmeta section:
distmeta : create_distdir metafile
	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -e q{META.yml};' \
	  -e 'eval { maniadd({q{META.yml} => q{Module YAML meta-data (added by MakeMaker)}}) }' \
	  -e '    or die "Could not add META.yml to MANIFEST: $${'\''@'\''}"' --
	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -f q{META.json};' \
	  -e 'eval { maniadd({q{META.json} => q{Module JSON meta-data (added by MakeMaker)}}) }' \
	  -e '    or die "Could not add META.json to MANIFEST: $${'\''@'\''}"' --



# --- MakeMaker distsignature section:
distsignature : distmeta
	$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }' \
	  -e '    or die "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}"' --
	$(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
	cd $(DISTVNAME) && cpansign -s



# --- MakeMaker install section:

install :: pure_install doc_install
	$(NOECHO) $(NOOP)

install_perl :: pure_perl_install doc_perl_install
	$(NOECHO) $(NOOP)

install_site :: pure_site_install doc_site_install
	$(NOECHO) $(NOOP)

install_vendor :: pure_vendor_install doc_vendor_install
	$(NOECHO) $(NOOP)

pure_install :: pure_$(INSTALLDIRS)_install
	$(NOECHO) $(NOOP)

doc_install :: doc_$(INSTALLDIRS)_install
	$(NOECHO) $(NOOP)

pure__install : pure_site_install
	$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site

doc__install : doc_site_install
	$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site

pure_perl_install :: all
	$(NOECHO) $(MOD_INSTALL) \
		read "$(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist" \
		write "$(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist" \
		"$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \
		"$(INST_ARCHLIB)" "$(DESTINSTALLARCHLIB)" \
		"$(INST_BIN)" "$(DESTINSTALLBIN)" \
		"$(INST_SCRIPT)" "$(DESTINSTALLSCRIPT)" \
		"$(INST_MAN1DIR)" "$(DESTINSTALLMAN1DIR)" \
		"$(INST_MAN3DIR)" "$(DESTINSTALLMAN3DIR)"
	$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
		"$(SITEARCHEXP)/auto/$(FULLEXT)"


pure_site_install :: all
	$(NOECHO) $(MOD_INSTALL) \
		read "$(SITEARCHEXP)/auto/$(FULLEXT)/.packlist" \
		write "$(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist" \
		"$(INST_LIB)" "$(DESTINSTALLSITELIB)" \
		"$(INST_ARCHLIB)" "$(DESTINSTALLSITEARCH)" \
		"$(INST_BIN)" "$(DESTINSTALLSITEBIN)" \
		"$(INST_SCRIPT)" "$(DESTINSTALLSITESCRIPT)" \
		"$(INST_MAN1DIR)" "$(DESTINSTALLSITEMAN1DIR)" \
		"$(INST_MAN3DIR)" "$(DESTINSTALLSITEMAN3DIR)"
	$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
		"$(PERL_ARCHLIB)/auto/$(FULLEXT)"

pure_vendor_install :: all
	$(NOECHO) $(MOD_INSTALL) \
		read "$(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist" \
		write "$(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist" \
		"$(INST_LIB)" "$(DESTINSTALLVENDORLIB)" \
		"$(INST_ARCHLIB)" "$(DESTINSTALLVENDORARCH)" \
		"$(INST_BIN)" "$(DESTINSTALLVENDORBIN)" \
		"$(INST_SCRIPT)" "$(DESTINSTALLVENDORSCRIPT)" \
		"$(INST_MAN1DIR)" "$(DESTINSTALLVENDORMAN1DIR)" \
		"$(INST_MAN3DIR)" "$(DESTINSTALLVENDORMAN3DIR)"


doc_perl_install :: all
	$(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
	-$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
	-$(NOECHO) $(DOC_INSTALL) \
		"Module" "$(NAME)" \
		"installed into" "$(INSTALLPRIVLIB)" \
		LINKTYPE "$(LINKTYPE)" \
		VERSION "$(VERSION)" \
		EXE_FILES "$(EXE_FILES)" \
		>> "$(DESTINSTALLARCHLIB)/perllocal.pod"

doc_site_install :: all
	$(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
	-$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
	-$(NOECHO) $(DOC_INSTALL) \
		"Module" "$(NAME)" \
		"installed into" "$(INSTALLSITELIB)" \
		LINKTYPE "$(LINKTYPE)" \
		VERSION "$(VERSION)" \
		EXE_FILES "$(EXE_FILES)" \
		>> "$(DESTINSTALLARCHLIB)/perllocal.pod"

doc_vendor_install :: all
	$(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod"
	-$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)"
	-$(NOECHO) $(DOC_INSTALL) \
		"Module" "$(NAME)" \
		"installed into" "$(INSTALLVENDORLIB)" \
		LINKTYPE "$(LINKTYPE)" \
		VERSION "$(VERSION)" \
		EXE_FILES "$(EXE_FILES)" \
		>> "$(DESTINSTALLARCHLIB)/perllocal.pod"


uninstall :: uninstall_from_$(INSTALLDIRS)dirs
	$(NOECHO) $(NOOP)

uninstall_from_perldirs ::
	$(NOECHO) $(UNINSTALL) "$(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist"

uninstall_from_sitedirs ::
	$(NOECHO) $(UNINSTALL) "$(SITEARCHEXP)/auto/$(FULLEXT)/.packlist"

uninstall_from_vendordirs ::
	$(NOECHO) $(UNINSTALL) "$(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist"


# --- MakeMaker force section:
# Phony target to force checking subdirectories.
FORCE :
	$(NOECHO) $(NOOP)


# --- MakeMaker perldepend section:
PERL_HDRS = \
        $(PERL_INCDEP)/EXTERN.h            \
        $(PERL_INCDEP)/INTERN.h            \
        $(PERL_INCDEP)/XSUB.h            \
        $(PERL_INCDEP)/av.h            \
        $(PERL_INCDEP)/bitcount.h            \
        $(PERL_INCDEP)/charclass_invlists.h            \
        $(PERL_INCDEP)/config.h            \
        $(PERL_INCDEP)/cop.h            \
        $(PERL_INCDEP)/cv.h            \
        $(PERL_INCDEP)/dosish.h            \
        $(PERL_INCDEP)/ebcdic_tables.h            \
        $(PERL_INCDEP)/embed.h            \
        $(PERL_INCDEP)/embedvar.h            \
        $(PERL_INCDEP)/fakesdio.h            \
        $(PERL_INCDEP)/feature.h            \
        $(PERL_INCDEP)/form.h            \
        $(PERL_INCDEP)/git_version.h            \
        $(PERL_INCDEP)/gv.h            \
        $(PERL_INCDEP)/handy.h            \
        $(PERL_INCDEP)/hv.h            \
        $(PERL_INCDEP)/hv_func.h            \
        $(PERL_INCDEP)/hv_macro.h            \
        $(PERL_INCDEP)/inline.h            \
        $(PERL_INCDEP)/intrpvar.h            \
        $(PERL_INCDEP)/invlist_inline.h            \
        $(PERL_INCDEP)/iperlsys.h            \
        $(PERL_INCDEP)/keywords.h            \
        $(PERL_INCDEP)/l1_char_class_tab.h            \
        $(PERL_INCDEP)/malloc_ctl.h            \
        $(PERL_INCDEP)/metaconfig.h            \
        $(PERL_INCDEP)/mg.h            \
        $(PERL_INCDEP)/mg_data.h            \
        $(PERL_INCDEP)/mg_raw.h            \
        $(PERL_INCDEP)/mg_vtable.h            \
        $(PERL_INCDEP)/mydtrace.h            \
        $(PERL_INCDEP)/nostdio.h            \
        $(PERL_INCDEP)/op.h            \
        $(PERL_INCDEP)/op_reg_common.h            \
        $(PERL_INCDEP)/opcode.h            \
        $(PERL_INCDEP)/opnames.h            \
        $(PERL_INCDEP)/overload.h            \
        $(PERL_INCDEP)/pad.h            \
        $(PERL_INCDEP)/parser.h            \
        $(PERL_INCDEP)/patchlevel.h            \
        $(PERL_INCDEP)/perl.h            \
        $(PERL_INCDEP)/perl_inc_macro.h            \
        $(PERL_INCDEP)/perl_langinfo.h            \
        $(PERL_INCDEP)/perl_siphash.h            \
        $(PERL_INCDEP)/perlapi.h            \
        $(PERL_INCDEP)/perlio.h            \
        $(PERL_INCDEP)/perliol.h            \
        $(PERL_INCDEP)/perlsdio.h            \
        $(PERL_INCDEP)/perlstatic.h            \
        $(PERL_INCDEP)/perlvars.h            \
        $(PERL_INCDEP)/perly.h            \
        $(PERL_INCDEP)/pp.h            \
        $(PERL_INCDEP)/pp_proto.h            \
        $(PERL_INCDEP)/proto.h            \
        $(PERL_INCDEP)/reentr.h            \
        $(PERL_INCDEP)/regcharclass.h            \
        $(PERL_INCDEP)/regcomp.h            \
        $(PERL_INCDEP)/regcomp_internal.h            \
        $(PERL_INCDEP)/regexp.h            \
        $(PERL_INCDEP)/reginline.h            \
        $(PERL_INCDEP)/regnodes.h            \
        $(PERL_INCDEP)/sbox32_hash.h            \
        $(PERL_INCDEP)/scope.h            \
        $(PERL_INCDEP)/scope_types.h            \
        $(PERL_INCDEP)/sv.h            \
        $(PERL_INCDEP)/sv_inline.h            \
        $(PERL_INCDEP)/thread.h            \
        $(PERL_INCDEP)/time64.h            \
        $(PERL_INCDEP)/time64_config.h            \
        $(PERL_INCDEP)/uconfig.h            \
        $(PERL_INCDEP)/uni_keywords.h            \
        $(PERL_INCDEP)/unicode_constants.h            \
        $(PERL_INCDEP)/unixish.h            \
        $(PERL_INCDEP)/utf8.h            \
        $(PERL_INCDEP)/utfebcdic.h            \
        $(PERL_INCDEP)/util.h            \
        $(PERL_INCDEP)/uudmap.h            \
        $(PERL_INCDEP)/vutil.h            \
        $(PERL_INCDEP)/warnings.h            \
        $(PERL_INCDEP)/zaphod32_hash.h            

$(OBJECT) : $(PERL_HDRS)

Pg.c : $(XSUBPPDEPS)


# --- MakeMaker makefile section:

$(OBJECT) : $(FIRST_MAKEFILE)

# We take a very conservative approach here, but it's worth it.
# We move Makefile to Makefile.old here to avoid gnu make looping.
$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
	$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
	$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
	-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
	-$(NOECHO) $(MV)   $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
	- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
	$(PERLRUN) Makefile.PL "AR=ar" "CC=aarch64-openwrt-linux-gcc" "CCFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0=DBD-Pg-3.17.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/include -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include/fortify -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE" "CCCDLFLAGS=-fPIC" "CCDLFLAGS=-Wl,-E" "DLEXT=so" "DLSRC=dl_dlopen.xs" "EXE_EXT= " "FULL_AR=aarch64-openwrt-linux-ar" "LD=aarch64-openwrt-linux-gcc" "LDDLFLAGS=-shared -rdynamic -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/lib -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/lib -znow -zrelro" "LDFLAGS=  " "LIBC= " "LIB_EXT=.a" "OBJ_EXT=.o" "OSNAME=linux" "OSVERS=2.4.30" "RANLIB=:" "SITELIBEXP= " "SITEARCHEXP= " "SO=so" "VENDORARCHEXP= " "VENDORLIBEXP= " "SITEPREFIX=/usr" "INSTALLPRIVLIB=/usr/lib/perl5/5.38" "INSTALLSITELIB=/usr/lib/perl5/5.38" "INSTALLVENDORLIB= " "INSTALLARCHLIB=/usr/lib/perl5/5.38" "INSTALLSITEARCH=/usr/lib/perl5/5.38" "INSTALLVENDORARCH= " "INSTALLBIN=/usr/bin" "INSTALLSITEBIN=/usr/bin" "INSTALLVENDORBIN= " "INSTALLSCRIPT=/usr/bin" "INSTALLSITESCRIPT=/usr/bin" "INSTALLVENDORSCRIPT= " "INSTALLMAN1DIR=/usr/man/man1" "INSTALLSITEMAN1DIR=/usr/man/man1" "INSTALLVENDORMAN1DIR= " "INSTALLMAN3DIR=/usr/man/man3" "INSTALLSITEMAN3DIR=/usr/man/man3" "INSTALLVENDORMAN3DIR= " "LINKTYPE=dynamic" "DESTDIR=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/ipkg-install"
	$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
	$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command.  <=="
	$(FALSE)



# --- MakeMaker staticmake section:

# --- MakeMaker makeaperl section ---
MAP_TARGET    = perl
FULLPERL      = "/home/open/wrt/staging_dir/hostpkg/usr/bin/perl5.38.2"
MAP_PERLINC   = "-Iblib/arch" "-Iblib/lib" "-I/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2/x86_64-linux-thread-multi" "-I/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/5.38.2"

$(MAP_TARGET) :: $(MAKE_APERL_FILE)
	$(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@

$(MAKE_APERL_FILE) : static $(FIRST_MAKEFILE) pm_to_blib
	$(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
	$(NOECHO) $(PERLRUNINST) \
		Makefile.PL DIR="" \
		MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
		MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= \
		AR=ar \
		CC=aarch64-openwrt-linux-gcc \
		CCFLAGS='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0=DBD-Pg-3.17.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/include -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include/fortify -I/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/include -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE' \
		CCCDLFLAGS=-fPIC \
		CCDLFLAGS=-Wl,-E \
		DLEXT=so \
		DLSRC=dl_dlopen.xs \
		EXE_EXT=' ' \
		FULL_AR=aarch64-openwrt-linux-ar \
		LD=aarch64-openwrt-linux-gcc \
		LDDLFLAGS='-shared -rdynamic -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/usr/lib -L/home/open/wrt/staging_dir/toolchain-aarch64_generic_gcc-12.3.0_musl/lib -znow -zrelro' \
		LDFLAGS='  ' \
		LIBC=' ' \
		LIB_EXT=.a \
		OBJ_EXT=.o \
		OSNAME=linux \
		OSVERS=2.4.30 \
		RANLIB=: \
		SITELIBEXP=' ' \
		SITEARCHEXP=' ' \
		SO=so \
		VENDORARCHEXP=' ' \
		VENDORLIBEXP=' ' \
		SITEPREFIX=/usr \
		INSTALLPRIVLIB=/usr/lib/perl5/5.38 \
		INSTALLSITELIB=/usr/lib/perl5/5.38 \
		INSTALLVENDORLIB=' ' \
		INSTALLARCHLIB=/usr/lib/perl5/5.38 \
		INSTALLSITEARCH=/usr/lib/perl5/5.38 \
		INSTALLVENDORARCH=' ' \
		INSTALLBIN=/usr/bin \
		INSTALLSITEBIN=/usr/bin \
		INSTALLVENDORBIN=' ' \
		INSTALLSCRIPT=/usr/bin \
		INSTALLSITESCRIPT=/usr/bin \
		INSTALLVENDORSCRIPT=' ' \
		INSTALLMAN1DIR=/usr/man/man1 \
		INSTALLSITEMAN1DIR=/usr/man/man1 \
		INSTALLVENDORMAN1DIR=' ' \
		INSTALLMAN3DIR=/usr/man/man3 \
		INSTALLSITEMAN3DIR=/usr/man/man3 \
		INSTALLVENDORMAN3DIR=' ' \
		LINKTYPE=dynamic \
		DESTDIR=/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/ipkg-install


# --- MakeMaker test section:
HARNESS_OPTIONS=j1
TEST_VERBOSE=0
TEST_TYPE=test_$(LINKTYPE)
TEST_FILE = test.pl
TEST_FILES = t/*.t
TESTDB_SW = -d

testdb :: testdb_$(LINKTYPE)
	$(NOECHO) $(NOOP)

test :: $(TEST_TYPE)
	$(NOECHO) $(NOOP)

# Occasionally we may face this degenerate target:
test_ : test_static
	$(NOECHO) $(NOOP)

subdirs-test_dynamic :: dynamic pure_all

test_dynamic :: subdirs-test_dynamic
	PGINITDB="" PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)

testdb_dynamic :: dynamic pure_all
	PGINITDB="" PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)

subdirs-test_static :: static pure_all

test_static :: subdirs-test_static $(MAP_TARGET)
	PGINITDB="" PERL_DL_NONLAZY=1 "/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/$(MAP_TARGET)" $(MAP_PERLINC) "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)

testdb_static :: static pure_all $(MAP_TARGET)
	PGINITDB="" PERL_DL_NONLAZY=1 "/home/open/wrt/build_dir/target-aarch64_generic_musl/perl/DBD-Pg-3.17.0/$(MAP_TARGET)" $(MAP_PERLINC) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)



# --- MakeMaker ppd section:
# Creates a PPD (Perl Package Description) for a binary distribution.
ppd :
	$(NOECHO) $(ECHO) '<SOFTPKG NAME="DBD-Pg" VERSION="3.17.0">' > DBD-Pg.ppd
	$(NOECHO) $(ECHO) '    <ABSTRACT>PostgreSQL database driver for the DBI module</ABSTRACT>' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '    <AUTHOR>Greg Sabino Mullane</AUTHOR>' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '    <IMPLEMENTATION>' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '        <REQUIRE NAME="DBI::" VERSION="1.614" />' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '        <REQUIRE NAME="ExtUtils::MakeMaker" VERSION="6.58" />' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '        <REQUIRE NAME="File::Temp" />' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '        <REQUIRE NAME="Test::More" VERSION="0.88" />' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '        <REQUIRE NAME="Time::HiRes" />' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '        <REQUIRE NAME="version::" />' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '        <ARCHITECTURE NAME="x86_64-linux-thread-multi-5.38" />' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '        <CODEBASE HREF="" />' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '    </IMPLEMENTATION>' >> DBD-Pg.ppd
	$(NOECHO) $(ECHO) '</SOFTPKG>' >> DBD-Pg.ppd


# --- MakeMaker pm_to_blib section:

pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
	$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
	  'Pg.pm' '$(INST_LIBDIR)/Pg.pm' \
	  'lib/Bundle/DBD/Pg.pm' '$(INST_LIB)/Bundle/DBD/Pg.pm' 
	$(NOECHO) $(TOUCH) pm_to_blib


# --- MakeMaker selfdocument section:

# here so even if top_targets is overridden, these will still be defined
# gmake will silently still work if any are .PHONY-ed but nmake won't

static ::
	$(NOECHO) $(NOOP)

dynamic ::
	$(NOECHO) $(NOOP)

config ::
	$(NOECHO) $(NOOP)


# --- MakeMaker postamble section:

# --- This section was generated by DBI::DBD::dbd_postamble()
DBI_INSTARCH_DIR=/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.2/x86_64-linux-thread-multi/auto/DBI
DBI_DRIVER_XST=/home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.2/x86_64-linux-thread-multi/auto/DBI/Driver.xst

# The main dependency (technically correct but probably not used)
$(BASEEXT).c: $(BASEEXT).xsi

# This dependency is needed since MakeMaker uses the .xs.o rule
$(BASEEXT)$(OBJ_EXT): $(BASEEXT).xsi

$(BASEEXT).xsi: $(DBI_DRIVER_XST) /home/open/wrt/staging_dir/hostpkg/usr/lib/perl5/site_perl/5.38.2/x86_64-linux-thread-multi/auto/DBI/Driver_xst.h
	$(PERL) -p -e "s/~DRIVER~/$(BASEEXT)/g; s/^do\(/dontdo\(/" $(DBI_DRIVER_XST) > $(BASEEXT).xsi

# ---

.PHONY: tags

tags:
	ctags -f tags --recurse --totals \
		--exclude=blib \
		--exclude=.git \
		--exclude='*~' \
		--languages=Perl,C --langmap=c:+.h,Perl:+.t \



## This must be version 3.2.1 or better: earlier versions have many 
## problems parsing the DBI header files
SPLINT = splint

## Temp directory, for use with +keep
SPLINT_TMP = $(TMP)/splint_dbdpg

SPLINTFLAGS =            \
  -message-stream-stdout \
  -linelen 90            \
  -boolops               \
  -tmpdir $(SPLINT_TMP)  \
  +posixstrictlib        \
  +ignoresigns           \
  +showdeephistory       \
  -predboolint           \
  -nullpass              \
  +charint               \
  +boolint               \
  +allglobals            \

SPLINTFLAGS_TEST = 

SDEFINES = -DPGLIBVERSION=150001 -DPGDEFPORT=5432 -DHAS64BITLO

splint: $(H_FILES) $(C_FILES)
	$(MKPATH) $(SPLINT_TMP)
	$(SPLINT) $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) $(SDEFINES) -I$(PERL_INC) $(INC) $(C_FILES)



# End.

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

No branches or pull requests

3 participants