Обсуждение: Re: [HACKERS] New psql compile problem.

Поиск
Список
Период
Сортировка

Re: [HACKERS] New psql compile problem.

От
Keith Parks
Дата:
>From: Bruce Momjian <maillist@candle.pha.pa.us>
>
>> make[2]: Entering directory `/export/home/pgsql/src/bin/psql'
>> make -C ../../interfaces/libpq libpq.a
>> make[3]: Entering directory `/export/home/pgsql/src/interfaces/libpq'
>> make[3]: `libpq.a' is up to date.
>> make[3]: Leaving directory `/export/home/pgsql/src/interfaces/libpq'
>> gcc -I../../interfaces/libpq -I../../include -I../../backend    -Wall 
>> -Wmissing-prototypes -g -O2 -DLOCK_MGR_DEBUG -DDEADLOCK_DEBUG   -c command.c 
-o 
>> command.o
>> gcc -I../../interfaces/libpq -I../../include -I../../backend    -Wall 
>> -Wmissing-prototypes -g -O2 -DLOCK_MGR_DEBUG -DDEADLOCK_DEBUG   -c common.c 
-o 
>> common.o
>> make[2]: *** No rule to make target `../../../doc/src/sgml/ref/*.sgml', 
needed 
>> by `sql_help.h'.  Stop.
>> make[2]: Leaving directory `/export/home/pgsql/src/bin/psql'
>
>Do you have sgml files in that directory?  You should.

Plenty of them...

It seems a strange sort of dependancy though, with a '*', sort
of saying we're dependant on anything that happens to be in the
directory. Not the usual sort of thing you see in makefiles.

Keith.

mtcc:[/export/home/pgsql/src/bin/psql](42)% pwd
/export/home/pgsql/src/bin/psql
mtcc:[/export/home/pgsql/src/bin/psql](43)% ls ../../../doc/src/sgml/ref/*.sgml
../../../doc/src/sgml/ref/abort.sgml
../../../doc/src/sgml/ref/allfiles.sgml
../../../doc/src/sgml/ref/alter_table.sgml
../../../doc/src/sgml/ref/alter_user.sgml
../../../doc/src/sgml/ref/begin.sgml
../../../doc/src/sgml/ref/close.sgml
.
.
.
../../../doc/src/sgml/ref/vacuum.sgml
../../../doc/src/sgml/ref/vacuumdb.sgml
mtcc:[/export/home/pgsql/src/bin/psql](44)% 



Re: [HACKERS] New psql compile problem.

От
Tom Lane
Дата:
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
>>> make[2]: *** No rule to make target `../../../doc/src/sgml/ref/*.sgml', 
>>> needed 
>>> by `sql_help.h'.  Stop.
>>> make[2]: Leaving directory `/export/home/pgsql/src/bin/psql'

>> Do you have sgml files in that directory?  You should.

> Plenty of them...
>
> It seems a strange sort of dependancy though, with a '*', sort
> of saying we're dependant on anything that happens to be in the
> directory. Not the usual sort of thing you see in makefiles.

But it's just the right thing in this case, since Peter doesn't want
psql to be dependent on exactly what set of ref .sgml files there are.

This makefile coding does depend on wildcard expansion in dependency
lists, which is a GNU-make ism that probably doesn't get a lot of
testing.  What version of make are you running?

It might be worth changing the rule to use explicit wildcard expansion,

sql_help.h: $(wildcard ../../../doc/src/sgml/ref/*.sgml) create_help.pl

in case some versions of make need that extra cue to do the right thing...
        regards, tom lane