Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Unified Diff: gyp/pdfviewer.gyp

Issue 23163007: pdfviewer: make pdfviewer compile on mac Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gyp/pdfviewer.gyp
===================================================================
--- gyp/pdfviewer.gyp (revision 10716)
+++ gyp/pdfviewer.gyp (working copy)
@@ -7,6 +7,21 @@
'includes': [
'apptype_console.gypi',
],
+ # TODO(edisonn): Hack! on mack, SHARED_INTERMEDIATE_DIR can't be reliable used in a sources context
+ 'conditions' : [
+ [ 'skia_os != "mac"', {
+ 'variables': {
+ 'GENERATE_DIR%' : '<(SHARED_INTERMEDIATE_DIR)',
+ },
+ },
+ ],
+ [ 'skia_os == "mac"', {
+ 'variables': {
+ 'GENERATE_DIR%' : '../src/tmp_autogen',
+ },
+ },
+ ],
+ ],
'targets': [
{
'target_name': 'libpdfviewer',
@@ -22,18 +37,9 @@
'../experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp',
'../experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp',
'../experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp',
+ '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp',
+ '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp',
],
- 'copies': [
- {
- 'files': [
- '../experimental/PdfViewer/datatypes.py',
- '../experimental/PdfViewer/generate_code.py',
- ],
- 'destination': '<(SHARED_INTERMEDIATE_DIR)',
- },
- ],
'actions': [
{
'action_name': 'spec2def',
@@ -42,34 +48,49 @@
'../experimental/PdfViewer/PdfReference-okular-1.txt',
],
'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/pdfspec_autogen.py',
+ '<(GENERATE_DIR)/pdfspec_autogen.py',
],
- 'action': ['python', '../experimental/PdfViewer/spec2def.py', '../experimental/PdfViewer/PdfReference-okular-1.txt', '<(SHARED_INTERMEDIATE_DIR)/pdfspec_autogen.py'],
+ 'action': ['python', '../experimental/PdfViewer/spec2def.py', '../experimental/PdfViewer/PdfReference-okular-1.txt', '<(GENERATE_DIR)/pdfspec_autogen.py'],
},
{
+ 'action_name': 'copy_files',
+ 'variables': {
+ 'sources' : [
+ '../experimental/PdfViewer/datatypes.py',
+ '../experimental/PdfViewer/generate_code.py',
+ ]
+ },
+ 'inputs' : ['<(sources)'],
+ 'outputs': [
+ '<(GENERATE_DIR)/datatypes.py',
+ '<(GENERATE_DIR)/generate_code.py',
+ ],
+ 'action': ['python', '../experimental/PdfViewer/copy_files.py', '<(GENERATE_DIR)', '<@(sources)'],
+ },
+ {
'action_name': 'generate_code',
'inputs': [
- '<(SHARED_INTERMEDIATE_DIR)/datatypes.py',
- '<(SHARED_INTERMEDIATE_DIR)/generate_code.py',
- '<(SHARED_INTERMEDIATE_DIR)/pdfspec_autogen.py',
+ '<(GENERATE_DIR)/datatypes.py',
+ '<(GENERATE_DIR)/generate_code.py',
+ '<(GENERATE_DIR)/pdfspec_autogen.py',
],
'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfEnums_autogen.h',
- '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfMapper_autogen.h',
- '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfHeaders_autogen.h',
- '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp',
+ '<(GENERATE_DIR)/native/autogen/SkPdfEnums_autogen.h',
+ '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.h',
+ '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.h',
+ '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp',
+ '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp',
# TODO(edisonn): ok, there are many more files here, which we should list but since
# any change in the above should trigger a change here, we should be fine normally
],
- 'action': ['python', '<(SHARED_INTERMEDIATE_DIR)/generate_code.py', '<(SHARED_INTERMEDIATE_DIR)'],
+ 'action': ['python', '<(GENERATE_DIR)/generate_code.py', '<(GENERATE_DIR)'],
},
],
'include_dirs': [
'../experimental/PdfViewer',
'../experimental/PdfViewer/pdfparser',
'../experimental/PdfViewer/pdfparser/native',
- '<(SHARED_INTERMEDIATE_DIR)/native/autogen',
+ '<(GENERATE_DIR)/native/autogen',
],
'dependencies': [
'skia_lib.gyp:skia_lib',
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698