Moved get_sizeof_phonenumber to a subdirectory
This commit is contained in:
parent
4c6cd64194
commit
006063fe1d
8
Makefile
8
Makefile
|
@ -18,15 +18,15 @@ else
|
||||||
endif
|
endif
|
||||||
SHLIB_LINK := -lphonenumber -lstdc++
|
SHLIB_LINK := -lphonenumber -lstdc++
|
||||||
|
|
||||||
EXTRA_CLEAN := $(extension_script) get_sizeof_phone_number
|
EXTRA_CLEAN := $(extension_script) tools/get_sizeof_phone_number
|
||||||
|
|
||||||
PG_CONFIG := pg_config
|
PG_CONFIG := pg_config
|
||||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||||
include $(PGXS)
|
include $(PGXS)
|
||||||
|
|
||||||
$(extension_script): $(EXTENSION).sql.template get_sizeof_phone_number
|
$(extension_script): $(EXTENSION).sql.template tools/get_sizeof_phone_number
|
||||||
sed "s/SIZEOF_PHONE_NUMBER/$(shell ./get_sizeof_phone_number)/" $< > $@
|
sed "s/SIZEOF_PHONE_NUMBER/$(shell tools/get_sizeof_phone_number)/" $< > $@
|
||||||
|
|
||||||
get_sizeof_phone_number: get_sizeof_phone_number.cpp
|
tools/get_sizeof_phone_number: tools/get_sizeof_phone_number.cpp
|
||||||
$(CXX) -std=c++11 $< -o $@
|
$(CXX) -std=c++11 $< -o $@
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ CREATE FUNCTION phone_number_send(phone_number) RETURNS bytea
|
||||||
LANGUAGE c IMMUTABLE STRICT
|
LANGUAGE c IMMUTABLE STRICT
|
||||||
AS 'pg_libphonenumber', 'phone_number_send';
|
AS 'pg_libphonenumber', 'phone_number_send';
|
||||||
|
|
||||||
--SIZEOF_PHONE_NUMBER is replaced when generating the "real" script.
|
|
||||||
CREATE TYPE phone_number (
|
CREATE TYPE phone_number (
|
||||||
INTERNALLENGTH = SIZEOF_PHONE_NUMBER,
|
INTERNALLENGTH = SIZEOF_PHONE_NUMBER,
|
||||||
INPUT = phone_number_in,
|
INPUT = phone_number_in,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "short_phone_number.h"
|
#include "../short_phone_number.h"
|
||||||
|
|
||||||
int main(int argc, const char** argv) {
|
int main(int argc, const char** argv) {
|
||||||
std::cout << sizeof(ShortPhoneNumber) << std::endl;
|
std::cout << sizeof(ShortPhoneNumber) << std::endl;
|
Loading…
Reference in New Issue